flurry/flurry-ios-sdk

Analiytics SDK cause crash on iOS 14

Closed this issue · 4 comments

Describe the bug
App crashes when try to run with iOS 14 simulator (iPhone 11).

This Bug is About
Please choose the closest item by replacing [ ] with [x].

  • Integration
  • Analytics
  • Ads
  • Messaging/Push
  • IAP
  • Remote Configuration
  • Flurry Website/Dashboard
  • Other

Platform
Please choose the platform(s) that you are having the issue by replacing [ ] with [x].

  • iOS
  • tvOS
  • WatchOS

Environment
Please tell us the versions of Flurry SDK, XCode, and iOS you are using.

  • Flurry SDK: - Flurry-iOS-SDK/FlurrySDK (11.0.0)
  • XCode: 12.0 beta 6
  • iOS: iOS 14

To Reproduce
Steps to reproduce the behavior:

  1. Install analytics pod 'Flurry-iOS-SDK/FlurrySDK' to iOS project that supports iOS 13.0 +
  2. Build it with Xcode 12 beta 6 and run in in iOS simulator.

Additional context
Are you using Flurry Push/Messaging? / No
(iOS) Are you using CocoaPods ? Yes /

Error trace in console:
020-09-09 17:04:57.222176+0300 StoryArt[2755:134257] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'AppTrackingTransparency.framework is not linked with StoryArt'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff2043a11e __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007fff20177f78 objc_exception_throw + 48
2 Flurry_iOS_SDK 0x0000000109a42230 +[FlurryAppTransparencyStatusDataProvider convertToFlurryTransparencyStatus:] + 0
3 libdispatch.dylib 0x000000010a7438ac _dispatch_call_block_and_release + 12
4 libdispatch.dylib 0x000000010a744a88 _dispatch_client_callout + 8
5 libdispatch.dylib 0x000000010a752f23 _dispatch_main_queue_callback_4CF + 1152
6 CoreFoundation 0x00007fff203a8276 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 9
7 CoreFoundation 0x00007fff203a2b06 __CFRunLoopRun + 2685
8 CoreFoundation 0x00007fff203a1b9e CFRunLoopRunSpecific + 567
9 GraphicsServices 0x00007fff2b76edb3 GSEventRunModal + 139
10 UIKitCore 0x00007fff24660c73 -[UIApplication _run] + 912
11 UIKitCore 0x00007fff24665b84 UIApplicationMain + 101
12 StoryArt 0x000000010952057b main + 75
13 libdyld.dylib 0x00007fff20257415 start + 1
)

After I add AppTrackingTransparency.framework this problem is solved

Hi adding this framework solves problem for iOS 14 but after adding this framework you can't run your app in versions smaller than 14. How we can both support iOS 14 and iOS 13 in this case?

Hi @ozgurshn, this is the exception that Flurry SDK throws to force importing ATT framework when build with xcode12 iOS 14. You might need to add the framework (optional, not required) in the Build Phases -> Link Binary with Libraries to resolve this issue. FYI, we will release 11.1.0 next week to remove this logic of forcing developer to import ATT for xcode12, because Apple announced that App Tracking Transparency will delay to early next year. We will add this logic back afterwards. Sorry for this inconvenience.

Okey thanks for the clarification @hantao-flurrydev