问题
My app crashes when I launch it in iOS 7.1 but works fine in iOS 8.1
The error I get is this:
dyld: Library not loaded: /System/Library/Frameworks/AVKit.framework/AVKit Referenced from: MY APP Reason: no suitable image found. Did find: /System/Library/Frameworks/AVKit.framework/AVKit: mach-o, but wrong architecture (lldb)
I also noticed a similar error but with the UIKit mentioned instead of AVKit a few edits ago.
Does anyone know how to resolve this? I'm using Xcode 6.1.
I really don't want to miss out on iOS 7 users by only releasing for iOS 8. Thank you!
回答1:
The app is crashing because the framework AVKit is introduced in iOS 8 only, so when you try to compile the app for iOS 7 the app crashes as iOS 7 SDK does not include AVKit framework.
回答2:
You can do one thing, set the framework as optional. No need to remove the framework.
来源:https://stackoverflow.com/questions/26958232/need-help-wrong-architecture-causing-app-to-crash-when-launching-in-ios-7-but