Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Objective Sharpie binding error for Mixpanel library

$
0
0

Hi, I want to integrate my app with Mixpanel for its analytics and iOS push notifications (Details here: https://mixpanel.com/docs/people-analytics/ios-push-notifications), so I'm trying to generate a binding for Mixpanel's Objective-C library using Objective Sharpie.

I've followed the steps outlined in the documentation as well as http://pierceboggan.com/post/51671827932/binding-third-party-objective-c-libraries-in, but when I was generating the binding for a header file, I ran into the following error:

Cannot be negative. Parameter name: length System.ArgumentOutOfRangeException: Cannot be negative. Parameter name: length at System.String.Substring (Int32 startIndex, Int32 length) [0x00000] in :0 at Sharpie.ObjC.ObjCExtensions.ToGetAccessorSelectorFromSetAccessor (System.String selector) [0x00000] in :0 at Sharpie.ObjC.CodeDomMassager.MassageMethod (Sharpie.CodeDom.TypeDeclaration type, Sharpie.CodeDom.MethodDeclaration method) [0x00000] in :0 at Sharpie.ObjC.CodeDomMassager.MassageTypeMembers[MethodDeclaration] (Sharpie.CodeDom.TypeDeclaration type, System.Action`2 massager) [0x00000] in :0 at Sharpie.ObjC.CodeDomMassager.MassageType (Sharpie.CodeDom.TypeDeclaration type) [0x00000] in :0 at Sharpie.ObjC.CodeDomMassager.MassageAll () [0x00000] in :0 at Sharpie.ObjC.Parser.Parse (System.IO.TextWriter sexpWriter, System.Collections.Generic.List`1 stderrLines) [0x00000] in :0 at Sharpie.Mac.MainWindowController+c__AnonStorey3.<>m__B (System.Object o) [0x00000] in :0

The line that triggered this error was in the Mixpanel.h file: (Complete file is here: https://github.com/mixpanel/mixpanel-iphone/blob/master/Mixpanel/Mixpanel.h)

@interface MixpanelPeople : NSObject
...
- (void)set:(NSDictionary *)properties;
...
@end

If anyone can give me some pointers as to how to solve this that would be greatly appreciated! Thank you.

Mixpanel library zip: https://github.com/mixpanel/mixpanel-iphone/archive/master.zip

Version of Objective Sharpie: 0.4.9p 3f150a4


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>