firebase-cpp-sdk: iOS 15 crash with build on Xcode 13 (sandbox?)

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 13
  • Firebase SDK version: 8.6 (Firebase for Unity - 8.2)
  • Installation method: CocoaPods
  • Firebase Component: Auth, Core, Firestore, Functions, Messaging, Crashlytics, Dynamic Links, Remote Config, Installations

[REQUIRED] Step 2: Describe the problem

Steps to reproduce:

This release we’ve updated Firebase Unity SDK from 6.15.2 to 8.2 (8.6 iOS). After releasing build with Xcode 13 we’ve started receiving crashes shown below. Testers with iOS 15 may open the app during the first session, but it’s crashed in the next one. Users without test accounts (TF access) look like not facing this issue (checked on a few personal devices), but we are receiving crashes from AppStore (with no “Beta: YES” record).

Workaround: Add to Info.plist record: FirebaseAppStoreReceiptURLCheckEnabled = NO

May you please help me to understand if this check is necessary and why?

Important note: The issue is present only if build on Xcode 13, build with Xcode 12.5 is working correctly on iOS 15.

Incident Identifier: 0BE23EAE-BD2D-4487-9902-E86BF6197742
Hardware Model:      iPhone13,3
Process:             My_app [441]
Path:                /private/var/containers/Bundle/Application/90A535F8-D72B-4DDE-92CD-E21BB5A700BA/My_app.app/My_app
Identifier:          com.My_app
Version:             1.65 (14)
AppStoreTools:       13A227
AppVariant:          1:iPhone13,3:15
Beta:                YES
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           com.My_app [559]
 
Date/Time:           2021-10-05 13:17:32.0047 +0300
Launch Time:         2021-10-05 13:17:11.1527 +0300
OS Version:          iPhone OS 15.0.1 (19A348)
Release Type:        User
Baseband Version:    2.09.10
Report Version:      104
 
Exception Type:  EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Triggered by Thread:  0
 
 
Thread 0 name:
Thread 0 Crashed:
0   libsystem_kernel.dylib            0x00000001b9a5b204 __ulock_wait + 8
1   libdispatch.dylib                 0x0000000182c83344 _dlock_wait + 56 (lock.c:326)
2   libdispatch.dylib                 0x0000000182c83274 _dispatch_once_wait + 120 (lock.c:382)
3   Foundation                        0x00000001848c08f0 -[NSCoder _walkAllowedClassListLookingForClass:forKey:allowedClasses:strictModeEnabled:alwaysEnforceExplicitSubclasses:] + 1068 (once.h:84)
4   Foundation                        0x00000001847dfabc -[NSXPCDecoder _validateAllowedClass:forKey:allowingInvocations:] + 188 (NSXPCCoder.m:744)
5   Foundation                        0x00000001849f1f28 _decodeObject + 1364 (NSXPCCoder.m:1018)
6   Foundation                        0x00000001847ca6b4 -[NSXPCDecoder _decodeObjectOfClasses:atObject:] + 148 (NSXPCCoder.m:1103)
7   Foundation                        0x00000001847cee5c _NSXPCSerializationDecodeTypedObjCValuesFromArray + 936 (NSXPCCoder_InvocationSerialization.m:396)
8   Foundation                        0x00000001848060cc _NSXPCSerializationDecodeInvocationArgumentArray + 500 (NSXPCCoder_InvocationSerialization.m:523)
9   Foundation                        0x00000001847bf514 -[NSXPCDecoder __decodeXPCObject:allowingSimpleMessageSend:outInvocation:outArguments:outArgumentsMaxCount:outMethodSignature:outSelector:isReply:replySelector:interface:] + 788 (NSXPCCoder.m:1236)
10  Foundation                        0x0000000184876b40 -[NSXPCDecoder _decodeReplyFromXPCObject:forSelector:interface:] + 84 (NSXPCCoder.m:1130)
11  Foundation                        0x00000001847f76ac -[NSXPCConnection _decodeAndInvokeReplyBlockWithEvent:sequence:replyInfo:] + 176 (NSXPCConnection.m:259)
12  Foundation                        0x00000001847d24b4 __88-[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:]_block_invoke_3 + 212 (NSXPCConnection.m:1630)
13  Foundation                        0x00000001847e6a60 -[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:] + 2632 (NSXPCConnection.m:1651)
14  Foundation                        0x00000001847f9db4 -[NSXPCConnection _sendSelector:withProxy:arg1:] + 132 (NSXPCConnection.m:1280)
15  Foundation                        0x00000001847cbe5c _NSXPCDistantObjectSimpleMessageSend1 + 68 (NSXPCDistantObject.m:262)
16  CoreServices                      0x00000001833dd388 +[LSBundleProxy bundleProxyForCurrentProcess] + 440 (LSBundleProxy.m:331)
17  Foundation                        0x00000001848b4294 -[NSBundle appStoreReceiptURL] + 108 (NSBundle.m:986)
18  UnityFramework                    0x0000000109ea6fec +[GULAppEnvironmentUtil isAppStoreReceiptSandbox] + 196 (GULAppEnvironmentUtil.m:192)
19  UnityFramework                    0x0000000109ea6cf4 +[GULAppEnvironmentUtil isFromAppStore] + 5713140 (GULAppEnvironmentUtil.m:165)
20  UnityFramework                    0x0000000109ea9614 GULSetLoggerLevel + 5723668 (GULLogger.m:102)
21  UnityFramework                    0x000000010ae9261c firebase::LogSetPlatformLevel+ 22406684 (firebase::LogLevel) + 72
22  UnityFramework                    0x000000010ae92598 firebase::LogInitialize() + 164
23  UnityFramework                    0x000000010ae91e30 firebase::LogMessageWithCallbackV(firebase::LogLevel, char const*, char*) + 80
24  UnityFramework                    0x000000010ae91f48 firebase::LogInfo(char const*, ...) + 36
25  UnityFramework                    0x000000010ae57490 +[UIApplication(FIRFCM) load] + 20
26  libobjc.A.dylib                   0x000000019b5247d0 load_images + 1356 (objc-loadmethod.mm:251)
27  dyld                              0x00000001003c9ee4 dyld4::RuntimeState::notifyObjCInit(dyld4::Loader const*) + 164 (DyldRuntimeState.cpp:1558)
28  dyld                              0x00000001003ce3b8 dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const + 196 (Loader.cpp:1301)
29  dyld                              0x00000001003d4570 dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const + 124 (Loader.cpp:1314)
30  dyld                              0x00000001003cdb54 dyld4::APIs::dlopen_from(char const*, int, void*) + 512 (DyldAPIs.cpp:1435)
31  CoreFoundation                    0x00000001830b209c _CFBundleDlfcnLoadFramework + 140 (CFBundle_Binary.c:610)
32  CoreFoundation                    0x000000018303f058 _CFBundleLoadExecutableAndReturnError + 412 (CFBundle.c:1445)
33  Foundation                        0x0000000184820978 -[NSBundle loadAndReturnError:] + 428 (NSBundle.m:588)
34  My_app                           0x0000000100387d54 UnityFrameworkLoad() + 188 (main.mm:10)
35  My_app                           0x0000000100387dfc main + 36 (main.mm:25)
36  dyld                              0x00000001003dda24 start + 520 (dyldMain.cpp:876)
 
Thread 1 name:
Thread 1:
0   libsystem_kernel.dylib            0x00000001b9a5b204 __ulock_wait + 8
1   libsystem_platform.dylib          0x00000001f34449a4 _os_unfair_lock_lock_slow + 196 (lock.c:578)
2   dyld                              0x00000001003cda40 dyld4::APIs::dlopen_from(char const*, int, void*) + 236 (DyldAPIs.cpp:96)
3   Foundation                        0x00000001848c0354 ___NSCoderEnforceFirstPartySecurityRules_block_invoke + 56 (NSCoder.m:607)
4   libdispatch.dylib                 0x0000000182c82950 _dispatch_client_callout + 20 (object.m:560)
5   libdispatch.dylib                 0x0000000182c841d8 _dispatch_once_callout + 32 (once.c:52)
6   Foundation                        0x00000001848c08f0 -[NSCoder _walkAllowedClassListLookingForClass:forKey:allowedClasses:strictModeEnabled:alwaysEnforceExplicitSubclasses:] + 1068 (once.h:84)
7   Foundation                        0x00000001847dfabc -[NSXPCDecoder _validateAllowedClass:forKey:allowingInvocations:] + 188 (NSXPCCoder.m:744)
8   Foundation                        0x00000001849f1f28 _decodeObject + 1364 (NSXPCCoder.m:1018)
9   Foundation                        0x00000001847ca6b4 -[NSXPCDecoder _decodeObjectOfClasses:atObject:] + 148 (NSXPCCoder.m:1103)
10  Foundation                        0x00000001847cee5c _NSXPCSerializationDecodeTypedObjCValuesFromArray + 936 (NSXPCCoder_InvocationSerialization.m:396)
11  Foundation                        0x00000001848060cc _NSXPCSerializationDecodeInvocationArgumentArray + 500 (NSXPCCoder_InvocationSerialization.m:523)
12  Foundation                        0x00000001847bf514 -[NSXPCDecoder __decodeXPCObject:allowingSimpleMessageSend:outInvocation:outArguments:outArgumentsMaxCount:outMethodSignature:outSelector:isReply:replySelector:interface:] + 788 (NSXPCCoder.m:1236)
13  Foundation                        0x0000000184876b40 -[NSXPCDecoder _decodeReplyFromXPCObject:forSelector:interface:] + 84 (NSXPCCoder.m:1130)
14  Foundation                        0x00000001847f76ac -[NSXPCConnection _decodeAndInvokeReplyBlockWithEvent:sequence:replyInfo:] + 176 (NSXPCConnection.m:259)
15  Foundation                        0x00000001847d24b4 __88-[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:]_block_invoke_3 + 212 (NSXPCConnection.m:1630)
16  libxpc.dylib                      0x00000001f348332c _xpc_connection_reply_callout + 116 (serializer.c:119)
17  libxpc.dylib                      0x00000001f347685c _xpc_connection_call_reply_async + 88 (connection.c:833)
18  libdispatch.dylib                 0x0000000182c829d0 _dispatch_client_callout3 + 20 (object.m:586)
19  libdispatch.dylib                 0x0000000182c9ffd4 _dispatch_mach_msg_async_reply_invoke + 348 (mach.c:2464)
20  libdispatch.dylib                 0x0000000182c89f84 _dispatch_lane_serial_drain + 368 (inline_internal.h:0)
21  libdispatch.dylib                 0x0000000182c8ac44 _dispatch_lane_invoke + 444 (queue.c:3937)
22  libdispatch.dylib                 0x0000000182c95318 _dispatch_workloop_worker_thread + 656 (queue.c:6732)
23  libsystem_pthread.dylib           0x00000001f344d1b0 _pthread_wqthread + 288 (pthread.c:2495)
24  libsystem_pthread.dylib           0x00000001f344cf50 start_wqthread + 8
 
Thread 2 name:
Thread 2:
0   libsystem_kernel.dylib            0x00000001b9a5b204 __ulock_wait + 8
1   libsystem_platform.dylib          0x00000001f34449a4 _os_unfair_lock_lock_slow + 196 (lock.c:578)
2   dyld                              0x00000001003cda40 dyld4::APIs::dlopen_from(char const*, int, void*) + 236 (DyldAPIs.cpp:96)
3   libnetwork.dylib                  0x0000000183d6addc __nw_get_boringssl_image_block_invoke + 64 (tls_context.c:26)
4   libdispatch.dylib                 0x0000000182c82950 _dispatch_client_callout + 20 (object.m:560)
5   libdispatch.dylib                 0x0000000182c841d8 _dispatch_once_callout + 32 (once.c:52)
6   libnetwork.dylib                  0x0000000183d3f3fc __nw_protocol_copy_boringssl_definition_block_invoke + 388 (once.h:84)
7   libdispatch.dylib                 0x0000000182c82950 _dispatch_client_callout + 20 (object.m:560)
8   libdispatch.dylib                 0x0000000182c841d8 _dispatch_once_callout + 32 (once.c:52)
9   libnetwork.dylib                  0x0000000183ceb4cc nw_parameters_copy_description_internal + 14148 (once.h:84)
10  libnetwork.dylib                  0x0000000183d21d10 -[NWConcrete_nw_parameters description] + 20 (parameters.m:2394)
11  Foundation                        0x00000001847bcabc _NS_os_log_callback + 228 (NSPlatform.m:175)
12  libsystem_trace.dylib             0x000000019d6165d0 _os_log_fmt_flatten_NSCF + 64 (format.m:54)
13  libsystem_trace.dylib             0x000000019d615cf0 _os_log_fmt_flatten_object + 216 (format.m:316)
14  libsystem_trace.dylib             0x000000019d613b14 _os_log_impl_flatten_and_send + 1920 (format.c:834)
15  libnetwork.dylib                  0x0000000183d1386c nw_path_evaluator_start + 3180 (path_evaluation.m:3322)
16  libnetwork.dylib                  0x0000000183d478bc nw_path_evaluator_set_update_handler + 220 (path_evaluation.m:3343)
17  SystemConfiguration               0x00000001835fac5c __SCNetworkReachabilitySetDispatchQueue + 1060 (SCNetworkReachability.c:1937)
18  SystemConfiguration               0x00000001835f7e7c SCNetworkReachabilitySetDispatchQueue + 132 (SCNetworkReachability.c:2033)
19  UnityFramework                    0x0000000109ea0e84 -[GDTCORReachability init] + 144 (GDTCORReachability.m:86)
20  UnityFramework                    0x0000000109ea0c90 __36+[GDTCORReachability sharedInstance]_block_invoke + 32 (GDTCORReachability.m:53)
21  libdispatch.dylib                 0x0000000182c82950 _dispatch_client_callout + 20 (object.m:560)
22  libdispatch.dylib                 0x0000000182c841d8 _dispatch_once_callout + 32 (once.c:52)
23  UnityFramework                    0x0000000109ea0c6c +[GDTCORReachability sharedInstance] + 5688428 (GDTCORReachability.m:52)
24  UnityFramework                    0x0000000109ea0c24 +[GDTCORReachability initialize] + 20 (GDTCORReachability.m:46)
25  libobjc.A.dylib                   0x000000019b528764 CALLING_SOME_+initialize_METHOD + 24 (objc-initialize.mm:384)
26  libobjc.A.dylib                   0x000000019b51e3ac initializeNonMetaClass + 784 (objc-initialize.mm:554)
27  libobjc.A.dylib                   0x000000019b5225a8 initializeAndMaybeRelock(objc_class*, objc_object*, mutex_tt<false>&, bool) + 156 (objc-runtime-new.mm:2178)
28  libobjc.A.dylib                   0x000000019b51b6a0 lookUpImpOrForward + 884 (objc-runtime-new.mm:2194)
29  libobjc.A.dylib                   0x000000019b516a84 _objc_msgSend_uncached + 68
30  UnityFramework                    0x0000000109ea3904 -[GDTCORUploadCoordinator uploadConditions] + 32 (GDTCORUploadCoordinator.m:143)
31  UnityFramework                    0x0000000109ea339c __37-[GDTCORUploadCoordinator startTimer]_block_invoke_2 + 128 (GDTCORUploadCoordinator.m:80)
32  libdispatch.dylib                 0x0000000182c82950 _dispatch_client_callout + 20 (object.m:560)
33  libdispatch.dylib                 0x0000000182c85e04 _dispatch_continuation_pop + 504 (inline_internal.h:2597)
34  libdispatch.dylib                 0x0000000182c98d60 _dispatch_source_invoke + 1356 (source.c:587)
35  libdispatch.dylib                 0x0000000182c89f84 _dispatch_lane_serial_drain + 368 (inline_internal.h:0)
36  libdispatch.dylib                 0x0000000182c8ac10 _dispatch_lane_invoke + 392 (queue.c:3937)
37  libdispatch.dylib                 0x0000000182c95318 _dispatch_workloop_worker_thread + 656 (queue.c:6732)
38  libsystem_pthread.dylib           0x00000001f344d1b0 _pthread_wqthread + 288 (pthread.c:2495)
39  libsystem_pthread.dylib           0x00000001f344cf50 start_wqthread + 8
 
Thread 3:
0   libsystem_pthread.dylib           0x00000001f344cf48 start_wqthread + 0
 
 
Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0xfffffffffffffffc   x1: 0x0000000000000000   x2: 0x0000000000001609   x3: 0x0000000000000000
    x4: 0x00000002837a0bc0   x5: 0x0000000000000000   x6: 0x0000000000000000   x7: 0x0000000000000d30
    x8: 0x000000000000170b   x9: 0x0000000000001608  x10: 0x0000000000000001  x11: 0x0000000000000000
   x12: 0x00000000000000ba  x13: 0x00000000000000bb  x14: 0x3e78328c6fc2d844  x15: 0x0000000184a30f94
   x16: 0x0000000000000203  x17: 0x00000001848c031c  x18: 0x0000000000000000  x19: 0x0000000000000000
   x20: 0x00000001dcc55e10  x21: 0x0000000001000002  x22: 0x0000000000001609  x23: 0x0000000000000000
   x24: 0x00000001cd502cc8  x25: 0x0000000000000000  x26: 0x00000001cd5d2dc8  x27: 0x00000001dc3d46a0
   x28: 0x00000001dcc57188   fp: 0x000000016fa7c5e0   lr: 0x0000000182c83344
    sp: 0x000000016fa7c5c0   pc: 0x00000001b9a5b204        cpsr: 0x0
   esr: 0x56000080  Address size fault
 
 
Binary Images:
0x100380000 - 0x100387fff My_app arm64  <8d098aee3b5635ac8ac58bdb9f8555c2> /private/var/containers/Bundle/Application/90A535F8-D72B-4DDE-92CD-E21BB5A700BA/My_app.app/My_app
0x1003c4000 - 0x10041bfff dyld arm64e  <d48c31ee061f370ba6f78391a1b53ed8> /usr/lib/dyld
0x109934000 - 0x10d163fff UnityFramework arm64  <a677204d54bf3f879bb96f9cf79232ce> /private/var/containers/Bundle/Application/90A535F8-D72B-4DDE-92CD-E21BB5A700BA/My_app.app/Frameworks/UnityFramework.framework/UnityFramework
0x182c7f000 - 0x182cc4fff libdispatch.dylib arm64e  <959cd6e40ce73022b73c8b36f79f4745> /usr/lib/system/libdispatch.dylib
0x182f77000 - 0x1833cafff CoreFoundation arm64e  <6174789ae88c3f5cba39de2e9edc0750> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x1833cb000 - 0x1835a7fff CoreServices arm64e  <8d3ff6abc6ed39a78c72f68dc150901f> /System/Library/Frameworks/CoreServices.framework/CoreServices
0x1835f1000 - 0x18366afff SystemConfiguration arm64e  <c250509f5dfa3961a5b079af86531c92> /System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration
0x183c52000 - 0x184722fff libnetwork.dylib arm64e  <d810c68913393fc696e8196b9901e4dc> /usr/lib/libnetwork.dylib
0x1847a1000 - 0x184aa5fff Foundation arm64e  <efbca2ff8b8c3227abbc154ba851d23c> /System/Library/Frameworks/Foundation.framework/Foundation
0x19b515000 - 0x19b54efff libobjc.A.dylib arm64e  <6d12ade560653900a6bc80677ccac819> /usr/lib/libobjc.A.dylib
0x19d610000 - 0x19d628fff libsystem_trace.dylib arm64e  <e47c51bb9d5a3882a6bef744a30cce80> /usr/lib/system/libsystem_trace.dylib
0x1b9a59000 - 0x1b9a8cfff libsystem_kernel.dylib arm64e  <d2476f74d204348d8d386165d0485c7c> /usr/lib/system/libsystem_kernel.dylib
0x1f3444000 - 0x1f344afff libsystem_platform.dylib arm64e  <9b829bd8a5ba3cd78e9313538dcd12b2> /usr/lib/system/libsystem_platform.dylib
0x1f344c000 - 0x1f3457fff libsystem_pthread.dylib arm64e  <bc1ce0c6a9f2396b9afb623d3acd5881> /usr/lib/system/libsystem_pthread.dylib
0x1f3467000 - 0x1f349efff libxpc.dylib arm64e  <e8a600510c6835aeaefd9d97cc7f2696> /usr/lib/system/libxpc.dylib
 
EOF

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 3
  • Comments: 61 (15 by maintainers)

Commits related to this issue

Most upvoted comments

Unfortunately version 8.7.0 did not fix this issue for us. Behavior is same as before. App works correctly first time it’s opened. Every other time it will hang on “Loading UIApplication category for Firebase App”.

We are using only Firebase Analytics. Unity 2020.3.0f1

This issue should be marked critical since apps are unusable unless FirebaseAppStoreReceiptURLCheckEnabled = 0 is used.

@jonsimantov @a-maurice @DellaBitta Please take a look at this.

@jonsimantov @chkuang-g

I saw there was an update to the Unity SDK that referenced the two issues @chkuang-g said were the fixes: #706 #783

I’ve updated our project to this version and done a build but can confirm the issues still persists.

If I don’t have FirebaseAppStoreReceiptURLCheckEnabled set to false, the app will crash/get stuck on a subsequent load.

This is all I see in the Xcode log before it crashes.

2021-12-17 11:20:09.822953+1100 GameName[10568:2980065] UnityIAP UnityEarlyTransactionObserver: Created
2021-12-17 11:20:09.823336+1100 GameName[10568:2980065] UnityIAP UnityEarlyTransactionObserver: Registered for lifecycle events
2021-12-17 11:20:09.829553+1100 GameName[10568:2980065] FCM: Loading UIApplication FIRFCM category
2021-12-17 11:20:09.889179+1100 GameName[10568:2980065] Loading UIApplication category for Firebase App

I transferred this issue, since it looks related to the C++ runtime initializing the logger before the Objective C [NSBundle mainBundle] is initialized.

In the meantime, your workaround should be ok.

We found adding UnityFramework.framework to the “Link Binary with Libraries” was the only solution for us. Adding that stopped the crash and allowed us to remove the FirebaseAppStoreReceiptURLCheckEnabled flag.

Incidentally, it also cleared up a bunch of other crashes we hadn’t been able to reproduce.

For folks that are using the Unity SDK, we have just released a new version, 8.8.0, which is based on the recent C++ release of 8.9.0 (which had some fixes for this issue), along with https://github.com/firebase/firebase-cpp-sdk/commit/cf200546315de1f3630252dadaa0825ca5ad6a72 (which is some functionality normally only used by the Unity SDK).

We believe this should cover the calls to the GoogleUtilities logger coming before it has properly been initialized.

We found the reason with this following issue. The Unity Notification updates fixes it. issuetracker.unity3d.com/issues/ios-app-freezes-slash-crashes-when-both-mobile-notifications-and-firebase-are-used

Yeah, after updating com.unity.mobile.notifications package to v.2.0.0 the crash/hang in Firebase Unity 8.7.0 (not containing the fix in 8.8.0) goes away.

Here is the link to the actual change: https://github.com/Unity-Technologies/com.unity.mobile.notifications/commit/437f031082a4416ed68a68bfc00cd03e6890795b

We found the reason with this following issue. The Unity Notification updates fixes it. https://issuetracker.unity3d.com/issues/ios-app-freezes-slash-crashes-when-both-mobile-notifications-and-firebase-are-used

How do you setup UnityFramework.framework in a post ios build script?

Add this to your projects editor folder.

public static class PostProcessUnityFrameworkFixIOS
    {
        [PostProcessBuild(2)]
        public static void OnPostProcessBuild(BuildTarget buildTarget, string path)
        {
            if (buildTarget == BuildTarget.iOS)
            {
                UnityEditor.iOS.Xcode.PBXProject project = new UnityEditor.iOS.Xcode.PBXProject();
                string configFilePath = UnityEditor.iOS.Xcode.PBXProject.GetPBXProjectPath(path);
                project.ReadFromFile(configFilePath);

                string targetGuid = project.GetUnityMainTargetGuid();
                project.AddFrameworkToProject(targetGuid, "UnityFramework.framework", false);
                
                project.SetBuildProperty(targetGuid, "ENABLE_BITCODE", "NO");
                project.SetBuildProperty(project.TargetGuidByName(PBXProject.GetUnityTestTargetName()), "ENABLE_BITCODE", "NO");
                project.SetBuildProperty(project.GetUnityFrameworkTargetGuid(), "ENABLE_BITCODE", "NO");

                project.WriteToFile(configFilePath);
            }
        }
    }

We found adding UnityFramework.framework to the “Link Binary with Libraries” was the only solution for us. Adding that stopped the crash and allowed us to remove the FirebaseAppStoreReceiptURLCheckEnabled flag.

Incidentally, it also cleared up a bunch of other crashes we hadn’t been able to reproduce.

It helped, thanks!

You are right about the cause of the problem, and good to hear that 8.8.0 did indeed fix the issue for you. And yeah, I know how tricky it is to update the version of the SDK you are using, we’ve tried to make it simpler, but it is still messy.

We did track down another possible way to fix it; essentially, 8.8.0 removed all the calls we could track down to the underlying FIRLogger that were happening before initialization was done, and a different possible fix was to change our logging to only call into FIRLogger after initialization is done. If anyone is still experiencing the problem with 8.8.0, they can try this alternate fix via firebase_unity_sdk_8.8.1.zip. Note that this hasn’t gone through the full release process, so the usual download links will still be pointing at 8.8.0, this is currently just for testing purposes for folks that still had a problem when trying with 8.8.0 (though it might not be necessary anymore).

I must have screwed up the update 🤦‍♀️. Android was fine but my pods were as you correctly pointed out not updated properly. @Andreyul Thanks a lot for taking the time and helping me out.

I can therefore confirm as well that the 8.8.0 fixed the issue for us as well. I apologize for the confusion.

Unfortunately version 8.8.0 did not fix the issue for us.

After updating the SDK our app hangs on Loading UIApplication category for Firebase App just as before. Adding FirebaseAppStoreReceiptURLCheckEnabled flag and setting it to true still works as a workaround. This will however result in ios not reporting default in_app_purchase events at all which is causing headaches for us.

Version 8.8.0 fixed the issue for us as well.

I found a solution to this eventually. In Xcode go to the “Build Phases” part of the project file. From there you can see the “Link Binary with Libraries” section. Add the “UnityFramework.framework” to this list. unity set: UnityEditor.iOS.Xcode.PBXProject project = new UnityEditor.iOS.Xcode.PBXProject(); string configFilePath = UnityEditor.iOS.Xcode.PBXProject.GetPBXProjectPath(pathToBuiltProject); project.ReadFromFile(configFilePath); string targetGuid = project.GetUnityMainTargetGuid(); project.AddFrameworkToProject(targetGuid, “UnityFramework.framework”, false); project.WriteToFile(configFilePath);

This fix is working for us too, but requires disabling bitcode as the Unityframework isn’t compiled for bitcode. I’m also unsure about what this changes from the Unityframework that Unity builds when compiling the xCode project. Do you have an explanation of why this works?

Loading timing is different. Firebase used it before the UnityFramework was loaded, so it crashed. After linked, enter the game and load the UnityFramework first

@jonsimantov Is there any more update on this issue? It’s absolutely critical that its fixed for us. We currently can’t run any A/B test on purchases for iOS as the current “fix” to the crash causes no purchasing data to appear in Firebase dashboard.

Not to mention we can no longer use or trust any LTV data etc which is essential for running acquisition campaigns.