Building/Testing a Universal iPhone/iPad application - iphone

I have a project configured (I think) to produce Universal binaries. The base SDK is set to 3.2 and the Deployment Target is set to 3.1. Target Device Family is iPhone/iPad and the architecture is armv6 armv7.
I had a few questions about how this Universal binary thing really works:
1) When I want to submit an app binary for review, what configuration should I set as the build target? If I set it as "Device - 3.1" I get a warning which says "warning: building with Targeted Device Family" that includes iPad('1,2') requires building with the 3.2 or later SDK". However, if I build with SDK 3.2, will it still run on iPhones with OS 3.1?
What's the right configuration for device and architecture (arm6/arm7)?
2) How do I test the scenario above (built with SDK 3.2, but installed on a device running OS 3.1)? If I build with SDK 3.2, when I try to install it on a phone with OS 3.1, I get an error saying that the phone's OS isn't updated.
Thanks!

Our first Universal App just got approved and released in the App Store today, so here are the settings we successfully used:
Architectures
Architectures: Optimized (armv6 armv7)
Base SDK: iPhone Device 3.2
Build Active Architecture Only: unchecked
Valid Architectures: (empty)
Deployment
Targeted Device Family: iPhone/iPad
iPhone OS Deployment Target: iPhone OS 3.0
(you can set this to any iPhone 3.x OS but we wanted to target the oldest devices possible. This must be 3.0 or above, 2.x is not valid for a Universal App.)
Make sure that you'd also checked these settings for the Target itself (Project->Edit Active Target "AppName"); my initial problems when uploading to iTunes Connect were because the iPhone OS Deployment Target for the Target itself was still set to 2.2.1.

So, the key seems to be that the "Architectures" setting be set to "Optimized (arm6 arm7)" in addition to the "Valid Architectures" setting being set to "armv6 armv7".
This allows it to compile with the 3.2 SDK and run on an iPhone running 3.1
The settings I have in my question, in addition to this above change, seems to be what's needed to configure the app for submission as a universal binary. I haven't done it yet, but I'm fairly confident.
Please correct me if I'm wrong.

Related

Installing iPhone app on iPhone

I want to install my iphone app on iphone and also have test provisional profile also. The main problem is that i developing applicaion in mac lion environment Xcode version is 4.2.1
and using iOS5 i want to install it on device iPad 4.3.1 (iOS 4) so it gave me error message on Xcode
The run destination iOS Device is not valid for Running the scheme 'myProjectName The scheme 'myProjectName' contains no buildables that can be built for the SDKs supported by the run destination iOS Device. Make sure your targets all specify SDKs that are supported by this version of Xcode."
What should i have to do for it?
That is because you are using iOS 5 as your deployment target. Go to build setting and set the deployment target as per your need.
In your project settings check for the valid architectures. You need to include both armv6 and armv7 architectures.
Check the Targeted Device Family and make sure the device your distributing to is included in the settings
Please check it with setting deployment target.

Base-SDK of v4.0 means it won't install on 4.1 or 4.2 devices?

I was using xCode v3.2.3 and SDK 4.0 to write iPhone apps that worked on my iOS v3.1.3 device... as well as v4.0. (Deployment target set to 3.1.3. Base SDK set to v4.0)
Does that mean everyone that uses my app will need a minimum of iOS 3.1.3 and a maximum of v4.0? Or will they also run on v4.1 and v4.2?
Second part of my question:
I now upgrade my iOS v3.1.3 to v4.2.1.
Xcode now says my v4.2.1 device is now no longer provisioned.
Doesn't a Base-SDK setting of v4.0 mean apps will also run (or at least install) on v4.x?
No. Base SDK just means that your app will be built against the iOS 4.0 libraries. Any 4.x device will be able to run a release build of your app, but for debugging, Base SDK and the iOS version on your device must match. In the end, you need to build your app with the newest available Base SDK anyway, because Apple won't accept apps built for older SDKs into the App Store.
No, they will. iOS has Backward compatibility.
I agree with Irene. I found the solution:
The hint came from here: Can't make Xcode 4 run a barely empty project using SDK 4.2 (runs fine in 4.3)
And this is how i resolve: my xcode 4.0 my SDK 4.3 and my Ipod touch device is 4.2.1 - You see it is backward compatible. There are 2 things you must do in order to resolve. 1) In your xcode 4.0, You click on your project name under Target to ensure you change the target not the Project setting. Find the row >IOS deployment target to the version of your device in my case it was back to 4.2.1 ipodtouch so i set 4.2 (do not worry about basesdk it is for your application not the same as your application's target. 4.3 basesdk requires you provide codesign so you have to select code sign if do not have one apply for one looking up in Apple website or google)
After setting your target to compatible version with your device you now can go to "set the active scheme" that is where you select which device to install and run on including the simulator. So you will find you device there select it and you are good to go.
And if you still can not get it going. You can try to select your project under Project this time adn set the ios deployment target to your version mine was 4.2 ipodtouch ios. Then go select "set the active scheme" that is where you select which device to install and run on including the simulator. So you will find you device there select it and you are good to go.

the bundle is invalid. an application targeting the iphone device family may not require a iphone os deployment target of 3.2

I'm making an iphone only app, so far I have been able to share my app via ad-hoc distributions, and run it both in my simulator and my devices. But now that I'm finished, I can't upload my build to the store because of this error:
"The bundle is invalid. an application targeting the iphone device family may not require a iphone os deployment target of 3.2, wich is an ipad-only os"
The only Base SDK that I have after upgrading to xcode 3.2.3 are iphone device 3.2 and iphone device 4.0.
Thanks for the help.
In your application and/or target build settings, ensure the Base SDK is set to iPhone Device 4.0. For now, all apps are supposed to use this as the Base SDK.
Then, find the iPhone OS Deployment Target build setting. You want to set this to the lowest version of iOS that your application supports. If it supports 3.0, enter 3.0. If you are using functionality that was added in iOS 3.2, then you should just enter 4.0 since 3.2 does not run on the iPhone.

Xcode (iPhone) build warnings

I just installed Xcode 3.2.3. I have a first generation iPhone that I use for testing purposes. It has 3.1.3 installed on the iPhone. On the build droplist near the upper left, there don't seem to be as many choices as there were on the older version i.e. base SDK to build against. Now there is only Device/Simulator, Debug/Release as choices. When I build and try to install it on the iPhone, I am now getting a warning "The info.plist for application at (the path) specifies a minimum OS version of 3.2, which is too high to be installed on iPhone and get a "can't install application" error. When I look in the .plist, I cannot find where 3.2 is specified anywhere.
Also, there is a build warning of "warning: building with 'Targeted Device Family' set to iPhone only ('1') not supported with SDK 'Device - iPhone OS 3.2'."
What do I need to do to be able to test again? Hopefully I don't have to purchase a new iPhone or iPod touch just for testing purposes.
TIA,
Linda
I use SDK 4 with an old iPod Touch 1st Gen running 3.1.3 and it works fine.
The trick is to set the "iPhone OS Deployment Target" build setting to 3.1.3.

Xcode: Architectures settings for a universal\iOS4 app

I was wondering what my project settings should be in case I have a universal app that I am now updating to 4.0.
The Base SDK is iPhone Device 4.0
iPhone OS Deployment Target is iPhone OS 3.0
What should I enter in the Architectures, Build Active Architecture Only checkbox and the Valis Architectures for the different configurations (debug, release)?
Also, since some of my apps are not universal but will support 4.0 as base and 3.0 as deployment, will it make any difference is the architectures settings?
Thanks
Roi
Base SDK should be set to the most recent version of the SDK (ie: 4.2) this is what you build against and ensures that your app works properly on new OS's. Xcode now has a 'Latest iOS' selection which I recommend.
Deployment Target is the minimum version you want your app to be able to be installed on. This is mostly dictated by the features you want to use. If you want features introduced in iOS 4, you need to set the deployment target to 4.0.
also, be careful that these are set identically for all configurations and don't vary between development and release.