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

6.4k views Asked by At

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!

2

There are 2 answers

1
Shabir jan On BEST ANSWER

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.

0
AudioBubble On

You can do one thing, set the framework as optional. No need to remove the framework.enter image description here