【问题标题】:Monotouch binding单点触控绑定
【发布时间】:2012-09-18 02:17:08
【问题描述】:

我正在尝试将 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”。我不能在 Monotouch 中执行“[BaseType (typeof (NSObject))]”。

谁能帮忙?

问题是将 BugSense 绑定到 Monotouch。我创建了一个 Monotouch 绑定库,从 BugSenseiOS.Framework 获取二进制文件,将其命名为 bugsense.a 并将其添加到绑定项目中。但它不起作用。

我的“链接”:

[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 .
  • 嗯你有什么问题??
  • 对不起,我的问题的某些部分丢失了。已经更新了。

标签: iphone binding xamarin.ios bugsense


【解决方案1】:

如果这是一个崩溃报告器,请记住崩溃报告器会干扰 Mono 自己的异常处理,因此即使您绑定它们,它们也不起作用。

【讨论】:

  • 好的,所以你不能使用任何带有单点触控的崩溃报告器吗?如果他们有自己的,你现在有吗?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多