I'm trying to bind BugSense to Monotouch. But I have some problems, and now I will hear if someone here will check my bindings?
The BugSense Header look like this:
#define BUGSENSE_LOG(__EXCEPTION, __TAG) [BugSenseCrashController logException:__EXCEPTION withTag:__TAG]
OBJC_EXPORT @interface BugSenseCrashController : NSObject <UIAlertViewDelegate>
+ (BugSenseCrashController *) sharedInstanceWithBugSenseAPIKey:(NSString *)APIKey;
+ (BugSenseCrashController *) sharedInstanceWithBugSenseAPIKey:(NSString *)APIKey
userDictionary:(NSDictionary *)userDictionary;
+ (BugSenseCrashController *) sharedInstanceWithBugSenseAPIKey:(NSString *)APIKey
userDictionary:(NSDictionary *)userDictionary
sendImmediately:(BOOL)immediately;
+ (BOOL) logException:(NSException *)exception withTag:(NSString *)tag;
@end
I have then added an binding projekt and in my ApiDefinition.cs wrote:
[BaseType (typeof (NSObject))]
interface BugSenseCrashController
{
[Static]
[Export ("sharedInstanceWithBugSenseAPIKey:")]
BugSenseCrashController SharedInstanceWithBugSenseAPIKey(String APIKey);
[Static]
[Export ("sharedInstanceWithBugSenseAPIKey:userDictionary:")]
BugSenseCrashController SharedInstanceWithBugSenseAPIKey(String APIKey, [NullAllowed] NSDictionary userDictionary);
[Static]
[Export ("sharedInstanceWithBugSenseAPIKey:userDictionary:sendImmediately:")]
BugSenseCrashController SharedInstanceWithBugSenseAPIKey(string APIKey, [NullAllowed] NSDictionary userDictionary, bool immediately);
[Static]
[Export ("sharedInstance")]
BugSenseCrashController SharedInstance();
[Static]
[Export ("logException:withTag:")]
bool LogException (NSException exception, string tag);
}
My problem is the "UIAlertViewDelegate" in the Header. I can’t do a “[BaseType (typeof (NSObject))]” in Monotouch.
Anyone how can help?
The problem is to bind BugSense to Monotouch. I created a Monotouch binding library, took the binary file from BugSenseiOS.Framework, named it bugsense.a and added it to the binding project. But it dosn't work.
My "LinkWith":
[assembly: LinkWith ("libBugSense-iOS.a", LinkTarget.ArmV6 | LinkTarget.Thumb | LinkTarget.Simulator, ForceLoad = true, Frameworks="SystemConfiguration", LinkerFlags = "-lz")]
BugSense need SystemConfiguration.framework and libz.dylib.
Link to BugSense http://www.bugsense.com/docs/ios
My problem is the .
– jonathanpeppers