Xcode 15 iOS 12 app crash

We have a app , a few days before, we have start to build and archive to Appstore with the new Xcode 15.1, before update develop tools ,Xcode version is 14.2. Before update to new Xcode 15.1, the app works fine in iOS12

After our app reviewed by apple ,and release to the customer, we found crash in Xcode Organizer / Reports/Crashes module, and the system almost in iOS 12

Below is the photo

And cann't found crash stack in other crash analysis tool such as Bugly。

Finally ,i found a device iPad mini, and can debug.

Below is the XCode debug console.

dyld: Symbol not found: OBJC_CLASS$_NSURLSessionTaskMetrics Referenced from: /private/var/containers/Bundle/Application/AA0D6934-6D78-4E2A-A822-F48FB29DC599/MosProject_Uat.app/Frameworks/Alamofire.framework/Alamofire Expected in: /System/Library/Frameworks/Foundation.framework/Foundation in /private/var/containers/Bundle/Application/AA0D6934-6D78-4E2A-A822-F48FB29DC599/productname_Uat.app/Frameworks/Alamofire.framework/Alamofire Message from debugger: killed

And the crash log is same as we can found in Xcode crash log .

It seams there is a bug in system Foundation.framework? Why cann't found the NSURLSessionTaskMetrics in system Foundation.framework? I have tried to relink the Foundation.framework, but cann't work.

Anyone have same issue? Have any other ideas ?

Thanks.

Answered by BigAppDesign in 783624022

I have find a way to fix the bugs , see more in https://github.com/Alamofire/Alamofire/issues/3258

The way by jshier commented on Jul 21, 2020: Actually, it looks like adding the framework again doesn't add it to any targets, but the build still works. Adding it to the watch extension does break the build in general. You can manually work around the linking error by adding -framework CFNetwork to the "Other Linker Flags" setting on your extension target.

As I relink the CFNetwork, app can run in iOS 12 device.

But this is still a bug, can Xcode fix the bug?

Accepted Answer

I have find a way to fix the bugs , see more in https://github.com/Alamofire/Alamofire/issues/3258

The way by jshier commented on Jul 21, 2020: Actually, it looks like adding the framework again doesn't add it to any targets, but the build still works. Adding it to the watch extension does break the build in general. You can manually work around the linking error by adding -framework CFNetwork to the "Other Linker Flags" setting on your extension target.

As I relink the CFNetwork, app can run in iOS 12 device.

But this is still a bug, can Xcode fix the bug?

Xcode 15 iOS 12 app crash
 
 
Q