gpt4 book ai didi

ios - Facebook SDK [FBAppEvents activateApp]随机崩溃

转载 作者:行者123 更新时间:2023-12-03 11:57:49 24 4
gpt4 key购买 nike

我使用Facebook SDK v3.14。而且我发现方法[FBAppEvents activateApp]随机崩溃。因为[FBAppEvents activateApp]应该写在- (void)applicationDidBecomeActive:(UIApplication *)application

我们的applicationDidBecomeActive应该每天调用约100M,约10天[FBAppEvents activateApp]崩溃约1000次。

崩溃日志在这里,任何人都可以帮助我,谢谢。

type: signal
subtype: SIGSEGV
shavalue: 1ebce91b2b00be8084bb4cae3b666f4c
content:
• Crashed thread 0x00000000
• 0 Weibo 0x00718df5 -[WBRecordCrashLog p_updateBacktraceToDictionary:fromSigalCode:] + 408
• 1 Weibo 0x00718757 signalHandler + 298
• 2 libsystem_platform.dylib 0x38317f8b _sigtramp + 34
• 3 CoreFoundation 0x2d4e1105 + 76
• 4 UIKit 0x3016d039 + 236
• 5 Weibo 0x00a0d349 +[FBUtility attributionID] + 44
• 6 Weibo 0x00a282e5 +[FBSettings publishInstall:withHandler:isAutoPublish:] + 456
• 7 Weibo 0x00a28119 +[FBSettings publishInstall:withHandler:] + 44
• 8 Weibo 0x00a3949f +[FBAppEvents activateApp] + 34
• 9 Weibo 0x0014b60d -[TweetterAppDelegate applicationDidBecomeActive:] + 40
• 10 UIKit 0x2fe3f6bb + 374
• 11 UIKit 0x2fe2a6e1 + 1088
• 12 UIKit 0x2fdc66e9 + 3540
• 13 UIKit 0x2fdc5851 + 72
• 14 UIKit 0x2fe29ca9 + 616
• 15 GraphicsServices 0x323fbaed + 608
• 16 GraphicsServices 0x323fb6d7 + 34
• 17 CoreFoundation 0x2d56ea67 + 34
• 18 CoreFoundation 0x2d56ea03 + 346
• 19 CoreFoundation 0x2d56d1d7 + 1398
• 20 CoreFoundation 0x2d4d7ebf CFRunLoopRunSpecific + 522
• 21 CoreFoundation 0x2d4d7ca3 CFRunLoopRunInMode + 106
• 22 UIKit 0x2fe28ed1 + 760
• 23 UIKit 0x2fe2414d UIApplicationMain + 1136
• 24 Weibo 0x001723db main + 58
• 25 Weibo 0x00147c04 start + 40

我已经下载了Facebook SDK源代码, [FBUtility attributionID]在这里:
+ (NSString *)attributionID {
return [[UIPasteboard pasteboardWithName:@"fb_app_attribution" create:NO] string];
}

而且我找到了一些文档,没有文档告诉我 pasteboardWithName[UIPasteboard string]会导致崩溃

最佳答案

我已通过使用方法刷新来保护崩溃,以与自定义方法交换方法(+[FBUtility attributionID])

像这样的代码:

Appdelegate.m

Method leftMethod = class_getClassMethod(NSClassFromString(@"FBUtility"), NSSelectorFromString(@"attributionID"));
Method rightMethod = class_getClassMethod(NSClassFromString(@"MyHackFBUtility"), NSSelectorFromString(@"attributionID"));
method_exchangeImplementations(leftMethod, rightMethod);

MyHackFBUtility.m
+ (NSString *)attributionID {

return nil;
}

它可以运行几个月

关于ios - Facebook SDK [FBAppEvents activateApp]随机崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25263781/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com