Missing required architecture arm64 in Xcode - ios

I'm getting the error "missing required architecture arm64 in file /user/location/myframework.a(2 slices)" when I compile my project to the iPad mini, it refers to a specific third party framework that I'm using. This error does not show up for any of the older arm7 devices.
I know that this framework should be compiled to support the arm64 framework so to debug I created a second project that was completely blank except for this framework and it compiles just fine for the iPad mini. I used some of the functionality of the framework just to be sure it was actually being used by the project and it worked just fine.
So I'm 100% sure the issue isn't with the framework but with my project settings or something. I figured it might be that the old framework was still being cached somewhere so I cleaned and rebuilt, I deleted derived data, I removed the framework completely rebuilt and then added it back in. Nothing made a difference, it still comes up with the error "missing required architecture arm64 in file /user/location/myframework.a(2 slices)"
What might possibly be causing this problem?
EDIT:
I should have mentioned that the project installs fine on the iPad mini when the above framework is not included in the project. arm64 is listed as a valid architecture in the project settings.

if not include 64 bit please include 64 bit

According to lipo -info, the included SDK only has i386 and x86_64 architectures.

Related

iOS - Why build failed on simulator, but success on device/Generic iOS Device?

I have a doubt, when we set target device and build a normal working project then it builds success, but same project when I change target to simulator OR Generic iOS Device then it fails. I have shared screen shot for error details when I build a working project on simulator. What's the reason behind this why same code builds + runs perfectly on iphone devices OR Generic iOS Device, On the other hand fails on simulator? Please note that, I have added already necessary Framework in my project. Any suggestion will be great. Thanks guys.
http://i.stack.imgur.com/CJTim.png
it means the supporting frameworks are missed
for _OBJC_CLASS_$_SKStoreProductViewController
add StoreKit framework
for _OBJC_CLASS_$_asidentifiermanager
add AdSupport.framework
for _OBJC_CLASS_$_CMMotionManager
add
CoreMotion.framework
Whenever you encounter such issue, I recommend on using the 'lipo' tool of Apple. you call it like this:
/usr/bin/lipo -i <path-to-libraray-file>.a
The response will be:
Architectures in the fat file: <the-lib>.a are: armv7 arm64
I guess that in your case, the library which provides the ASIdentifierManager will only show armv7 and arm64 which are required to run on real devices, but not i386 required for the simulator.
So the question is where this library is coming from. If you got it from a 3rd party, ask them to provide a 'fat' library which include all the required architectures, including one for i386
Your mac (simulator) running on i386 architecture. If you compile your static libraries for i386 as well you will be able to use them on the simulator.
Try adding "i386" to the "Valid Architectures"

Missing required architecture arm64

I have been running my app fine on a ipad mini throughout development but tried testing it on an iPad air 2 today and it wont run. I get the following warning
ignoring file /ProjectFolder/SwiftEverlive/EverliveSDK.framework/EverliveSDK, missing required architecture arm64 in file /ProjectFolder/SwiftEverlive/EverliveSDK.framework/EverliveSDK (2 slices)
my architectures settigs in my project
It also doesn’t run on the simulator. I also tried opening the project in the Swift everlive folder but that won't open. It says its missing the project.pbxproj file
To be honest did not understand the other answers for similar questions here. Sorry very new to iOS dev.
Edit
The problem seems to be in the settings of the Telerik Everlive Framework and how that was complied is sthere any way i cam fixthis as i dont have time for them to suggest a solution.
I am guessing this means that you are trying to use a framework, namely EverliveSDK, that has not been compiled for a the new 64 bit arm processor in the iPad Air 2. Framework files come with a lot of precompiled code - sometimes intended to be proprietary - and if it hasn't been compiled for your target architecture then you cannot use that framework on that architecture.
The devices that use the arm64 architecture are iPhone 5s and newer. The simulator uses the architectures i386 or i86. If you have the framework available to you (it should look like a little white lego) it should contain a text file of the same name. This text file will appear to contain a bunch of gibberish, however, if you run the command 'lipo -info' on this file in the terminal, if will tell you which architectures the framework contains. I suspect you will be missing arm64, in which case you can't use the framework on the aforementioned devices.
The follow solved the problem:
1. You can try to add arm64 to the Build Settings -> Architectures ->
Excluded Architectures for Any iOS Simulator SDK. It helps many of
devs, but for me it didn't work.
2. You can Clean Build Folder (⇧ + ⌘ +
K), clean DerivedData directory, CocoaPods caches, and restart
macOS, Xcode and Simulator. This solution works for me.
Try this
Remove all valid architecture. It just only set armv7 and armv7s.
Just change Build Settings -> Architectures -> Build Active Architecture Only -> Debug -> NO.

XCode error when buiding for app store

Since the start of 2015 apple have new restrictions that say you must have 64-bit support and build with ios 8 SDK. I built my code with Unity for IOS, then opened XCode and opened the file I just created through Unity. I built it inside XCode fine with no errors. I then go to archive it and validate it. It then tells me about the new restrictions that I have mentioned above.
It says to use the default architecture to build a single binary. I go and change the architecture to suit this. Then I do a fresh build and it gives me an error saying "File is universal (2 slices) but does not contain a(n) armv7s slice". I researched this error and it said to just remove armv7s from the architecture. I did this and built again.
I then get the error "missing required architecture arm64 in file ..... undefined symbols for architecture arm64". I know this means that some of my libraries are not supported for arm64. I take out arm64 from architecture and then I am back to the start where it says I need to build for 64-bit.
Has anyone come across this type of problem before and may have a solution.
Many thanks in advance
You need to make a new build from Unity.From Player Settings -> Iphone -> Other settings -> Configuration . Under Scripting backend select IL2CPP and then under Architecture select Universal.

Running iOS SDK built in arm7 on arm7s

I have an SDK to achieve some special stream of video but I've got only the binary of this, I think this was built for arm7.
I have an app built with this library and it runs great on iPhone 4, 4s and iPad 2 but when building for iPad 4th generation with an arm7s xcode shows lots of errors about files being ignored.
I'm pretty sure it's the architecture cause changing the build architecture the errors appear and disappear.
Is there any way to make this work? I mean build for new architectures having only binaries files of the old one?
Unfortunately not. To build your app for armv7s all the code – which includes said library – has to be built for it. There is a hack to add armv7s support to static libraries but I would strongly recommend against using it.
That being said, for now it's not a big deal if you're building your app for armv7 only. It will still work fine on the iPhone 5.
Just go into the build settings of your Target and set "armv7" as the only architecture your app should be built for.
At one point in the future Apple will probably require that all new apps / app updates will be built for armv7s, like the did with armv7 a few years ago, but for now it's not a problem. By then the developer of the static library will hopefully have provided an update.

No architectures to compile for (ARCHS=, VALID_ARCHS=armv7 armv7s)

I am using Xcode 4.5.2 and have a project which cannot be compiled for an iPhone running iOS 6.0.1 though other projects compile fine with the same settings as shown in the picture below.
Any ideas on how to solve this?
You're probably using some third party lib that doesn't yet support armv7s architecture. You can just remove armv7s from your settings. Your app will still be able to run on iPhone 5 although it might not be taking full advantage of the new architecture.
If on XCODE 12 just goto Build Settings search for VALID_ARCHS. Under the User-Defined section select Valid Architectures and click Delete.
Set valid architecture for iOs simulator to armv7 and armv7s.( simulators are 32 bit ).
for device set to arm64 (64 bit all new ios device).

Resources