When deploying to iPhone & Apple Watch with Xcode7, I got this error:
ld: -weak_library and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together
Would like to ask how best to resolve this issue ?
Follow-ups: Apple Watch requires bitcode-enabled libraries, based on this New warnings in iOS 9 -> we may have to enable bitcode for all libraries ..
According to Apple's [App Thinning and Bitcode]
Quote: For iOS apps, bitcode is the default, but optional. If you provide bitcode, all apps and frameworks in the app bundle need to include bitcode. For watchOS apps, bitcode is required.
So I can turn off the Bitcode in Build Settings for iPhone app, and enable Bitcode for Watch app only.
Also if you are developing for apple tv bitcode is also enabled.
It is quite annoying since many third party ad frameworks and analytics have not yet compiled their binaries for tvOS but it wil come soon hopefully.
Related
I'm wondering what I need to do with my existing application when I build it. Currently I target ARM6 and ARM7 using 4.0 as my target build SDK.
I don't really want to drop ARM6 support but I also want to make sure that my app can be used on the new iPhone. From what I can tell Apple also won't let you drop support for ARM6 on apps that are already in the store and support that architecture.
Do I have to create a new version of my application just for iPhone 5 users?
Apple lets you drop ARMv6 support.
The trick is that you have to set the Deployment Target to an iOS version that is guaranteed to have ARMv7 support (I believe this would be 4.3).
That said, you do not have to drop ARMv6 just to make your app run on iPhone 5, your existing app will work just fine (but you will not be able to use any of the new iOS 6 features).
What if I don't want to drop the ARMv6 support? A lot of people are still using the old phones. My app just needs to support fullscreen on iPhone5.
This basically means that Apple has prevented the same app from running on iPhone 5 and older phones!
I'll try to submit the iPhone5 version as a separate app on iTunes connect, so that people can use the app on older phones and still enjoy full screen on iPhone 5. let's hope Apple doesn't reject my app - it's their fault after all!
I'm making an app that requires multitasking. Is there a way to compile an iPhone/iPad (universal) app so it excludes devices that do not support multitasking. I know iPhone 1, iPhone 3G and iTouch 1-2 do not support multitasking but I haven't found a way to build my app so it prevents people to download the app from the app store if they have one of these devices.
I was thinking to simply set the "Architectures" setting to armv7 on Xcode but I'm not sure if this will work and if it will have any other consequences.
Any help will be appreciated. Thanks!
You can set the minimum API level supported to be iOS 4.3. This version only runs on devices that support multi-tasking.
You should check in your application for multitasking support and fall back to a non multitasking alternative if it is not available.
Suppose you change the supported architectures to include ARM7 upwards. If you do, you need to find out what happens if somebody attempts to deploy such an application to an incompatible device. If iTunes stops them from doing it, that's fine and it's the right answer. But if iTunes lets them do deploy the app and it crashes when they try to run it, it would be far better to do the test for multitasking support and display an alert telling the user why your app won't work.
Go to targets section of your project--> navigate to Build Tab-->Go to Deployment tab & select IOS deployment target as 4.2. It will not run on IOS versions earlier than this.
I want to limit my universal-build app to iPhone4 / iPad, and I've set UIRequiredDeviceCapabilities to include "armv7", accordingly. In the build settings I've set:
"Architectures" = "Optimized (armv7)"
"Valid Architectures" = "armv7"
But the Release and Distribution builds of my universal app are generating this warning:
warning: iPhone apps should include an armv6 architecture (current ARCHS = "armv7")
Is this even a real problem? Can I safely ignore the warning? Why doesn't my debug build exhibit the same warning - the build config has the same settings?
I'm building with XCode 3.2.5, 4.2 SDK.
Similar to this question, but not quite:
"Warning: iPhone apps should include an armv6 architecture" even with build config set
I was having the same issue. I set the project settings accordingly but was still getting the error when building the Release version. I had to edit the Target settings and found that 'Build Active Architecture Only' was checked for the Release configuration. Unchecking it resolved the warning. I hope this helps someone.
Build Active Architecture only is really best used just for debug and simulator builds.
The iOS deployment target version is what determines the required architectures. iOS 4.2 and earlier included support for armv6 processors; therefore Xcode wants you to build for that architecture for builds that might be distributed.
If you really don't want armv6 code, and understand that the app store will reject your app if it targets iOS 4.2 or earlier and does not have armv6, then I'd suggest just changing the "Architectures" setting in the target to armv7 only.
You can stay with arm7 only if you want, but if you want to limit to iPhone 4 / iPad it's because you have a good reason ? To limit to devices you need to use UIRequiredDeviceCapabilities in your Info.plist, otherwise people with previous iPhone will find your app and it will not work.
PS: It's not easy to find a device capability for both iPad and iPhone, you can for example said that you want devices with a front facing camera but this will limit to iPhone 4 and iPad 2 (and not iPad 1)
In XCode, when I open project settings, I only see the following two choices for the setting "Architectures": 'Standard (armv6 armv7)' and 'Optimized (armv7)'.
How can I get the choice of 'Optimized (armv6 armv7)' to appear?
I'm using XCode 3.2.3.
It's misleading. Choose armv6&7 if you're developing for iPhone 3G or earlier. 3GS and later, including iPad, use arm7, so if those are the devices you're targeting, you can get code more optimized for those newer devices by choosing armv7, no backward compatibility. (For targeting all devices, old and new, choose armv6&7.)
With the iOS SDK for 4.0.x, Apple renamed the old "Optimized (armv6 armv7)" to "Standard (armv6 armv7)", so you've already got it to appear, just under a different name.
As title described, I integrated iAd into my iPhone apps. Everything worked fine in the iPhone simulator (iOS4). However, when I try to install it on my iPhone(version 3.1.3), I got an error:
dyld: Library not loaded: /System/Library/Frameworks/iAd.framework/iAd
Referenced from: /var/mobile/Applications/...
Reason: image not found
I already properly set the deployment target to v3.0, and base SDK to 4.0. When I comment out all the iAd related code, the apps installs with no problem.
There must be a way to do this, because I downloaded the apps "showtimes" and "Yellow Pages", which use iAd. Both apps run very well on my 3.1.3 phone, and I can see the iAd as well.
Does anybody know how to do this?
To get past the loader error, double-click your target in Xcode and change the link type of the iAds.framework to "Weak" instead of "Required". You'll probably have to do some conditional coding to support other ad networks as well, because iAds are not supported on pre-4.0 systems.
In xCode 4 select "Targets"-"Build Phases"- "Link Binary With Libraries". Change the link type of the iAd.framework to "Optional" instead of "Required".
You can integrate AdWhirl into your app instead, which can deliver you iAds among others. More usefully, it will provide you with adverts you can display in iOS3.*.