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.
Related
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.
I am working on a iOS app that uses a commercial static library (.a) which is compiled for armv7 architecture. This works fine but it does not work on iOS 9 because Apple requires that all libs should support arm64.
Until now the vendor of this library will not deliver me a arm64 version of this library.
I've googled this a lot lately but cannot find a solution or workaround to make this work.
Many posts also on stackoverflow say this will not work.
I've tried, as some posts say, to add -Wl,-segalign,4000 to the other linker flags in the build settings of XCode in the target of my project but it did not work.
So this probably will not work, but I was wondering does anyone know a solution/workaround so that my app with this static library will work on iOS 9?
Thanks in advance.
As you have ascertained there is no solution here other than obtaining a 64-bit library from the vendor. I am in the same boat with an internal application I own that leverages a vendor's (antiquated) framework that is based on armv7. Until you get your hands on a 64-bit version of that library you are dead in the water.
I'm getting this error whenever I build in Xcode 6 GM Seed. It seems to be making my app insanely slow. What exactly does this mean and how do I fix it?
I had the following error:
Warning: Error creating LLDB target at path '.....'- using an empty
LLDB target which can cause slow memory reads from remote devices.
PS: im not able to run my app, its stuck on the splash screen
There is a thread in the Apple Developer Forum, https://devforums.apple.com/message/1010068#1010068 that describes how to diagnose this issue. I had his issue for Xcode 6 GM Seed, specifically - Version 6.0.1 (6A317). This isn't necessarily a solution, but it may help some people get a better diagnosis
Useful steps are as follows -
1) Create or modify your ~/.lldbinit and add log enable -f /tmp/lldb-api.txt lldb api to it.
2) Rerun your debugger session (no need to restart Xcode or anything)
3) Inspect the file at /tmp/lldb-api.txt. Look for a line beginning with SBDebugger::CreateTarget(...). Mine looked something like this
SBDebugger(0x7f83671fd600)::CreateTarget
(filename="/Users/xxxxxxx/Library/Developer/Xcode/DerivedData/Dino-gjuxikhuyokkqufeqmesmgjcxylu/Build/Products/Debug-iphonesimulator/Dino.app",
triple=x86_64, platform_name=(null), add_dependent_modules=1,
error=the specified architecture 'x86_64' is not compatible with
'i386-apple-ios' in
'/Users/xxxxxxx/Library/Developer/Xcode/DerivedData/Dino-gjuxikhuyokkqufeqmesmgjcxylu/Build/Products/Debug-iphonesimulator/Dino.app/Dino')
=> SBTarget(0x0)
4) Inspect the target file from the above log output, in my case -
file
"/Users/xxxxxxx/Library/Developer/Xcode/DerivedData/Dino-gjuxikhuyokkqufeqmesmgjcxylu/Build/Products/Debug-iphonesimulator/Dino.app/Dino"
/Users/apanagar/Library/Developer/Xcode/DerivedData/Dino-gjuxikhuyokkqufeqmesmgjcxylu/Build/Products/Debug-iphonesimulator/Dino.app/Dino:
Mach-O executable i386
5) So, In my case my problem was the architectures I was building for. The target architecture for your project should match the one on the SBDebugger::CreateTarget() line in the log output.
Xcode doc's point out the following. I had to go through my nested frameworks and change some outdated architecture targets -
NOTE ABOUT 64-BIT ARCHITECTURE
An app extension target must include the arm64 architecture in its
Architectures build settings or it will be rejected by the App Store.
Xcode includes this architecture with its “Standard architectures”
setting when you create a new app extension target.
If your containing app target links to an embedded framework, the app
must also include the arm64 architecture or it will be rejected by the
App Store.
For more information about 64-bit development, see 64-Bit Transition
Guide for Cocoa Touch or 64-Bit Transition Guide for Cocoa, depending
on your target platform.
https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/ExtensionCreation.html#//apple_ref/doc/uid/TP40014214-CH5-SW1
I am not sure if this will help in your case. But I tried this solution and it worked pretty neatly for me.
Pull up the terminal and type - rm -rf ~/Library/Developer/Xcode/DerivedData
This is supposed to remove the huge stack of DerivedData folder and make the app execute faster.
Did you use Architectures=$(ARCHS_STANDARD_32_BIT) and run your app on a 64 bit device? (iPhone 5S or iPhone 5S simulator)
Apple seems to be stricter with apps which don't support 64bit. So if there is no specific reason, I think it's better to include arm64 in your build architecture
NOTE ABOUT 64-BIT ARCHITECTURE
An app extension target must include the arm64 architecture in its
Architectures build settings or it will be rejected by the App Store.
Xcode includes this architecture with its “Standard architectures”
setting when you create a new app extension target.
If your containing app target links to an embedded framework, the app
must also include the arm64 architecture or it will be rejected by the
App Store.
For more information about 64-bit development, see 64-Bit Transition
Guide for Cocoa Touch or 64-Bit Transition Guide for Cocoa, depending
on your target platform.
Source:
https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/ExtensibilityPG/ExtensionCreation.html#//apple_ref/doc/uid/TP40014214-CH5-SW1
This warning is solved by changing Build Settings :
Select Project -> Build Settings
Change 'Architectures' to 'Standard architectures (armv7, arm64) - $(ARCHS_STANDARD)'
This will prompt an alert stating iOS 5.1.1 and above are supported. Click 'Change Deployment Target to 5.1.1'
Repeat steps for Target (if not changed automatically)
Also, this is preferred build setting since Apple is forcing developers to build apps on 64 but architecture. Apple document Link
So here I am using Cocos2d v3, with a game 90% done. It seems that for business reasons I might have to include an external framework which does not support arm64 and there's not much I can do about it, except maybe go back to Cocos2d v2.1 (I'm not doing that). Or is there?
I tried removing arm64 from valid architectures, and am able to build and run even on iPhone 5s. Somehow I don't get it to compile in debug yet - what option could be preventing this?
I get lots of errors like: /Build/Products/Debug-iphoneos/libcocos2d.a, file was built for archive which is not the architecture being linked (armv7):
Update: I found out what was wrong. With an iPhone 5s plugged in and "Build active architecture only", Xcode only wanted to build arm64. This worked as long as I disconnected the iPhone 5s. And I needed to disable Build active architecture for the linked targets of cocos2d and chipmunk respectively, too.
So the changes I did was:
Remove arm64 from valid architectures in my game target
Disable build active architecture for all three targets: my game, cocos2d, chipmunk
Still remains to be seen if there are any other pitfalls doing this.
I'm using MGTwitterEngine in my apps and till iOS5, the app is working fine. I'm using twitter engine that as ".a" file.
But when compiling with latest XCode, its showing error that armv7s slice is not available.
I tried removing armv7s from the valid architectures and the problem solved. I'm able to build the app, run the app successfully on iPhone4, iPhone4S and also on iPhone5.
My questions is whether I'm following right way or not. Will Apple approve the apps that are not built with armv7s architecture?
There's no other go with it
Libraries are precompiled code. so they are built as per the architectures selected during compilation.
In latest iOS, its better to use Twitter/Social framework (as per iOS version)