Search code examples
xcodeios7ios8mach-o

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


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!


Solution

  • 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.