My app worked fine on all iOS version when compiled with XCode8. Now, when compiled with Xcode 9, it runs fine on iOS11 devices, but it crashes for simulator and devices running iOS10 and iOS9. I get below message in the console:
dyld: Symbol not found: _OBJC_CLASS_$_NSURLSessionStreamTask
Referenced from: /private/var/containers/Bundle/Application/F3BE9A47-374A-4BEA-AC7F-A01F4B0FD87F/MyApp.app/Frameworks/Alamofire.framework/Alamofire
Expected in: /System/Library/Frameworks/Foundation.framework/Foundation
in /private/var/containers/Bundle/Application/F3BE9A47-374A-4BEA-AC7F-A01F4B0FD87F/MyApp.app/Frameworks/Alamofire.framework/Alamofire
As you can see I'm using Alamofire. The development target of my app is 9.3 and the dev target of Alamofire is also 9.3. The BaseSDK is iOS11 (because it's Xcode 9).
After doing some research I don't believe this is an Alamofire issue, but rather a Xcode issue. These are some similar issues I found, but having tried all offered solutions (including the standard clean / clean build folder / delete derived data), none of them seem to work:
- https://github.com/Alamofire/Alamofire/issues/2142
- https://forums.developer.apple.com/thread/68430
- Swift - App getting crashed in IOS 8.4 on launch with error _NSURLSessionTaskPriorityDefault
Does anyone have a solution for this, other then rolling back to Xcode 8?