Я пытаюсь связать BugSense с Monotouch. Но у меня есть некоторые проблемы, и теперь я слышу, кто-нибудь здесь проверит мои привязки?
Заголовок BugSense выглядит так:
#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
Затем я добавил связывающий проект и в своем ApiDefinition.cs написал:
[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);
}
Моя проблема - "UIAlertViewDelegate" в заголовке. Я не могу сделать «[BaseType (typeof (NSObject))]» в Monotouch.
Кто-нибудь как может помочь?
Проблема в том, чтобы привязать BugSense к Monotouch. Я создал библиотеку привязки Monotouch, взял бинарный файл из BugSenseiOS.Framework, назвал его bugsense.a и добавил в проект привязки. Но это не работает.
Мой "LinkWith":
[assembly: LinkWith ("libBugSense-iOS.a", LinkTarget.ArmV6 | LinkTarget.Thumb | LinkTarget.Simulator, ForceLoad = true, Frameworks="SystemConfiguration", LinkerFlags = "-lz")]
BugSense нужны SystemConfiguration.framework и libz.dylib.
Ссылка на BugSense http://www.bugsense.com/docs/ios
My problem is the .
- person jonathanpeppers   schedule 26.09.2012