yandexmobile / metrica-plugin-cordova

Cordova plugin for Yandex AppMetrica SDK
Other
11 stars 26 forks source link

Крашится приложение с подключенной метрикой под IOS #23

Open martrix78 opened 4 years ago

martrix78 commented 4 years ago

Доброго дня. подключил плагин в приложении на IonicFramework В сборке под Android проблем нет - все работает. Под Ios приложение падает: Thread 1: Exception: "+[YMMYandexMetrica sharedReporterForApiKey:]: unrecognized selector sent to class 0x1058f6408"

2020-11-20 08:41:21.910151+0300 Crosslife[14434:121382] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[YMMYandexMetrica sharedReporterForApiKey:]: unrecognized selector sent to class 0x1058f6408'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff23e3cf0e __exceptionPreprocess + 350
    1   libobjc.A.dylib                     0x00007fff50ba89b2 objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff23e5db34 +[NSObject(NSObject) doesNotRecognizeSelector:] + 132
    3   CoreFoundation                      0x00007fff23e4190c ___forwarding___ + 1436
    4   CoreFoundation                      0x00007fff23e43bf8 _CF_forwarding_prep_0 + 120
    5   Crosslife                           0x00000001057d7d4b -[YMPLibraryAnalyticsTracker registerSymbols] + 156
    6   Crosslife                           0x00000001057d8141 -[YMPPushNotificationController initWithTokenParser:payloadParser:payloadValidator:applicationStateProvider:targetURLHandler:eventsController:libraryAnalyticsTracker:] + 349
    7   Crosslife                           0x00000001057d7f9b -[YMPPushNotificationController init] + 334
    8   Crosslife                           0x00000001057d8a41 __47+[YMPPushNotificationController sharedInstance]_block_invoke + 41
    9   libdispatch.dylib                   0x0000000105c94e8e _dispatch_client_callout + 8
    10  libdispatch.dylib                   0x0000000105c963db _dispatch_once_callout + 66
    11  Crosslife                           0x00000001057d8a15 +[YMPPushNotificationController sharedInstance] + 45
    12  Crosslife                           0x00000001057d9243 -[YMPUserNotificationCenterController init] + 37
    13  Crosslife                           0x00000001057d96ce __53+[YMPUserNotificationCenterController sharedInstance]_block_invoke + 41
    14  libdispatch.dylib                   0x0000000105c94e8e _dispatch_client_callout + 8
    15  libdispatch.dylib                   0x0000000105c963db _dispatch_once_callout + 66
    16  Crosslife                           0x00000001057d96a2 +[YMPUserNotificationCenterController sharedInstance] + 45
    17  Crosslife                           0x000000010566e7e0 -[CDVAppDelegate(AppMetricaPush) ymp_application:didFinishLaunchingWithOptions:] + 368
    18  Crosslife                           0x0000000105626a2b -[AppDelegate application:didFinishLaunchingWithOptions:] + 187
    19  Crosslife                           0x000000010564dd58 -[UIApplication(OneSignalCordovaPush) oneSignalApplication:didFinishLaunchingWithOptions:] + 168
    20  UIKitCore                           0x00007fff48c82698 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 232
    21  UIKitCore                           0x00007fff48c84037 -[UIApplication _callInitializationDelegatesWithActions:forCanvas:payload:fromOriginatingProcess:] + 3985
    22  UIKitCore                           0x00007fff48c89bf9 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1226
    23  UIKitCore                           0x00007fff4839225d -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 122
    24  UIKitCore                           0x00007fff4889dcc1 _UIScenePerformActionsWithLifecycleActionMask + 83
    25  UIKitCore                           0x00007fff48392d6f __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 198
    26  UIKitCore                           0x00007fff4839277e -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 296
    27  UIKitCore                           0x00007fff48392b9c -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 818
    28  UIKitCore                           0x00007fff48392431 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 345
    29  UIKitCore                           0x00007fff48396a22 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke_2 + 178
    30  UIKitCore                           0x00007fff487b3dad +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] + 852
    31  UIKitCore                           0x00007fff488bc41e _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 240
    32  UIKitCore                           0x00007fff4839673d __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 153
    33  UIKitCore                           0x00007fff488bc321 _UISceneSettingsDiffActionPerformActionsWithDelayForTransitionContext + 84
    34  UIKitCore                           0x00007fff483965ab -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 381
    35  UIKitCore                           0x00007fff481eafa8 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 657
    36  UIKitCore                           0x00007fff481e9b67 -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 253
    37  UIKitCore                           0x00007fff481eacd2 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 210
    38  UIKitCore                           0x00007fff48c88141 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 512
    39  UIKitCore                           0x00007fff487da8dc -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 361
    40  FrontBoardServices                  0x00007fff36cacd2e -[FBSSceneImpl _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 419
    41  FrontBoardServices                  0x00007fff36cd2dc1 __86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke.154 + 102
    42  FrontBoardServices                  0x00007fff36cb7757 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 220
    43  FrontBoardServices                  0x00007fff36cd2a52 __86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke + 355
    44  libdispatch.dylib                   0x0000000105c94e8e _dispatch_client_callout + 8
    45  libdispatch.dylib                   0x0000000105c97da2 _dispatch_block_invoke_direct + 300
    46  FrontBoardServices                  0x00007fff36cf86e9 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
    47  FrontBoardServices                  0x00007fff36cf83d7 -[FBSSerialQueue _queue_performNextIfPossible] + 441
    48  FrontBoardServices                  0x00007fff36cf88e6 -[FBSSerialQueue _performNextFromRunLoopSource] + 22
    49  CoreFoundation                      0x00007fff23da0d31 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    50  CoreFoundation                      0x00007fff23da0c5c __CFRunLoopDoSource0 + 76
    51  CoreFoundation                      0x00007fff23da0434 __CFRunLoopDoSources0 + 180
    52  CoreFoundation                      0x00007fff23d9b02e __CFRunLoopRun + 974
    53  CoreFoundation                      0x00007fff23d9a944 CFRunLoopRunSpecific + 404
    54  GraphicsServices                    0x00007fff38ba6c1a GSEventRunModal + 139
    55  UIKitCore                           0x00007fff48c8b9ec UIApplicationMain + 1605
    56  Crosslife                           0x0000000105626951 main + 65
    57  libdyld.dylib                       0x00007fff51a231fd start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

информация о окружении

Ionic:

   Ionic CLI                     : 6.10.0 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.2.3
   @angular-devkit/build-angular : 0.803.20
   @angular-devkit/schematics    : 8.3.26
   @angular/cli                  : 8.3.26
   @ionic/angular-toolkit        : 2.2.0

Cordova:
   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : not available
   Cordova Plugins   : not available

System:
   ios-deploy : 1.10.0
   ios-sim    : 8.0.2
   NodeJS     : v12.18.0 (/usr/local/bin/node)
   npm        : 6.14.4
   OS         : macOS Catalina
   Xcode      : Xcode 11.5 Build version 11E608c
dzinad commented 4 years ago

Здравствуйте. К сожалению, у нас не получится в ближайшем будущем выпустить фикс Cordova Push-плагина. Если вы хотите, вы можете попробовать исправить проблему на вашей стороне. Для этого нужно: