Need help: 'Wrong Architecture' causing app to crash when launching in iOS 7 but works fine in iOS 8

允我心安 提交于 2020-01-03 20:03:36

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!