iOS RemoteNotification swizzler无限循环由两个库实现
在我的应用程序中,我使用库来记录使用情况,使用消息库来处理通知 当iOS应用程序在后台时,当用户点击通知toast后,应用程序启动,但几秒钟后就会崩溃。故障似乎是来自Mixpanel的iOS RemoteNotification swizzler无限循环由两个库实现,ios,firebase,react-native,apple-push-notifications,mixpanel,Ios,Firebase,React Native,Apple Push Notifications,Mixpanel,在我的应用程序中,我使用库来记录使用情况,使用消息库来处理通知 当iOS应用程序在后台时,当用户点击通知toast后,应用程序启动,但几秒钟后就会崩溃。故障似乎是来自Mixpanel的mp\u SwizzedMethod\u 5功能的EXC\u BAD\u访问 在深入研究调用堆栈时,我发现Mixpanel和Firebase正在无限地相互调用。请参阅调用堆栈的这一部分 Thread 1 Queue : com.apple.main-thread (serial) #0 0x0000000104f
mp\u SwizzedMethod\u 5
功能的EXC\u BAD\u访问
在深入研究调用堆栈时,我发现Mixpanel和Firebase正在无限地相互调用。请参阅调用堆栈的这一部分
Thread 1 Queue : com.apple.main-thread (serial)
#0 0x0000000104f7a010 in is_interesting_event ()
#1 0x0000000104f7966c in gcd_queue_item_enqueue_hook ()
#2 0x00000001054bd1f0 in _dispatch_introspection_queue_item_enqueue_hook ()
#3 0x000000010548fa54 in dispatch_source_set_event_handler_f ()
#4 0x000000018256bce0 in ___lldb_unnamed_symbol372$$libsqlite3.dylib ()
#5 0x00000001824cb7a0 in ___lldb_unnamed_symbol18$$libsqlite3.dylib ()
#6 0x00000001824cb1d8 in ___lldb_unnamed_symbol17$$libsqlite3.dylib ()
#7 0x0000000182527f80 in ___lldb_unnamed_symbol159$$libsqlite3.dylib ()
#8 0x000000018252b878 in ___lldb_unnamed_symbol167$$libsqlite3.dylib ()
#9 0x000000018252b220 in ___lldb_unnamed_symbol164$$libsqlite3.dylib ()
#10 0x0000000182508048 in ___lldb_unnamed_symbol104$$libsqlite3.dylib ()
#11 0x00000001825037dc in sqlite3_step ()
#12 0x000000010480448c in -[FIRMessagingRmq2PersistentStore saveUnackedS2dMessageWithRmqId:] ()
#13 0x00000001048063e8 in -[FIRMessagingRmqManager saveS2dMessageWithRmqId:] ()
#14 0x00000001047ee768 in -[FIRMessaging appDidReceiveMessage:] ()
#15 0x0000000104802360 in FCM_swizzle_didReceiveNotificationResponseWithHandler ()
#16 0x000000010448388c in mp_swizzledMethod_5 at /Users/allanhahaha/Documents/craig_ios/CraigAtWork/workdl/ios/Mixpanel/MPSwizzler.m:85
#17 0x0000000104802380 in FCM_swizzle_didReceiveNotificationResponseWithHandler ()
#18 0x000000010448388c in mp_swizzledMethod_5 at /Users/allanhahaha/Documents/craig_ios/CraigAtWork/workdl/ios/Mixpanel/MPSwizzler.m:85
#19 0x0000000104802380 in FCM_swizzle_didReceiveNotificationResponseWithHandler ()
... thousands of lines of repeating calls
#6030 0x000000010448388c in mp_swizzledMethod_5 at /Users/allanhahaha/Documents/craig_ios/CraigAtWork/workdl/ios/Mixpanel/MPSwizzler.m:85
#6031 0x0000000104802380 in FCM_swizzle_didReceiveNotificationResponseWithHandler ()
#6032 0x000000010448388c in mp_swizzledMethod_5 at /Users/allanhahaha/Documents/craig_ios/CraigAtWork/workdl/ios/Mixpanel/MPSwizzler.m:85
#6033 0x0000000104802380 in FCM_swizzle_didReceiveNotificationResponseWithHandler ()
#6034 0x000000010448388c in mp_swizzledMethod_5 at /Users/allanhahaha/Documents/craig_ios/CraigAtWork/workdl/ios/Mixpanel/MPSwizzler.m:85
#6035 0x0000000104802380 in FCM_swizzle_didReceiveNotificationResponseWithHandler ()
#6036 0x000000018b8f6064 in -[UIApplication _handleNonLaunchSpecificActions:forScene:withTransitionContext:completion:] ()
#6037 0x000000018bb82af8 in -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] ()
#6038 0x000000018c3077c0 in __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke ()
#6039 0x000000018c307664 in -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] ()
#6040 0x000000018c0752cc in __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke ()
#6041 0x000000018c20e3cc in _performActionsWithDelayForTransitionContext ()
#6042 0x000000018c07517c in -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] ()
#6043 0x000000018be59760 in -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] ()
#6044 0x000000018bcfb2a8 in -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] ()
#6045 0x000000018478aca4 in __80-[FBSSceneImpl updater:didUpdateSettings:withDiff:transitionContext:completion:]_block_invoke.362 ()
#6046 0x000000010548d28c in _dispatch_client_callout ()
#6047 0x00000001054999e4 in _dispatch_block_invoke_direct ()
#6048 0x00000001847be7f8 in __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ ()
#6049 0x00000001847be49c in -[FBSSerialQueue _performNext] ()
#6050 0x00000001847bea38 in -[FBSSerialQueue _performNextFromRunLoopSource] ()
#6051 0x000000018206f77c in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ ()
#6052 0x000000018206f6fc in __CFRunLoopDoSource0 ()
#6053 0x000000018206ef84 in __CFRunLoopDoSources0 ()
#6054 0x000000018206cb5c in __CFRunLoopRun ()
#6055 0x0000000181f8cc58 in CFRunLoopRunSpecific ()
#6056 0x0000000183e38f84 in GSEventRunModal ()
#6057 0x000000018b6e55c4 in UIApplicationMain ()
#6058 0x00000001044b5b48 in main at /Users/allanhahaha/Documents/craig_ios/CraigAtWork/workdl/ios/workdl/main.m:14
#6059 0x0000000181aac56c in start ()
请帮助我了解可能需要什么来修复它。。。提前谢谢 明白了。Firebase和Mixpanel都是Swizzle通知处理程序,所以我通过添加
#define MIXPANEL_NO_NOTIFICATION_AB_TEST_SUPPORT 1
在@implementation Mixpanel
之前的Mixpanel.h
之上,感谢您占用了我所有的时间,您的解决方案似乎也适用于我。有没有一种方法可以从cocoa Pod配置它,这样每次安装时都不会覆盖它?