How do I build apps for iOS 4.0 with the new Xcode?
Hello all. I was wondering if it was possible to build an app with iOS 4.0 support. When I try to build my project on a 2nd generation device running iOS 4.2.1, Xcode builds the project and says "Finished running Project MiDo on Lisa's iPod" (that's my mom's iPod). The app never shows up on the device. Is there a way to make it run?
Thanks.
__________________
Zach Shea
Mobile Applications Developer at S&J Apps zshea@sjapps.com
Hello all. I was wondering if it was possible to build an app with iOS 4.0 support. When I try to build my project on a 2nd generation device running iOS 4.2.1, Xcode builds the project and says "Finished running Project MiDo on Lisa's iPod" (that's my mom's iPod). The app never shows up on the device. Is there a way to make it run?
Thanks.
You set the base SDK to the current OS (5.0.1). Then you set the deployment target to the lowest OS version you support.
You can also set the base SDK to be the same as the deployment target. In that case, though, you can't use any features from a later OS version.
If your base SDK version is higher than your deployment target version, and your code uses any features from OS versions newer than your deployment target version, you have to check at runtime to make sure those features are available, and then "fail gracefully" or have an alternate way of doing things for older OS versions. This last step can be the hardest, because how you do it depends on the specifics of your app.
Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.
I have set the deployment target to 4.0 and the base sdk to current, but that doesn't seem to have an effect. I think I remember something about changing architectures or something, but I'm not sure. Any ideas?
__________________
Zach Shea
Mobile Applications Developer at S&J Apps zshea@sjapps.com
I have set the deployment target to 4.0 and the base sdk to current, but that doesn't seem to have an effect. I think I remember something about changing architectures or something, but I'm not sure. Any ideas?
There are all kinds of things you have to get right. What kind of device is it? You probably want to build for arm6 and arm7 if it's an older device like a 3Gs. For iPhone 4, iPad and later, you can build for arm7 only.
You also need to make sure you have a valid provisioning profile installed on the phone. These days that's usually as simple as hooking the device to your Mac, opening Xcode, going to the devices tab, selecting the device, and clicking "use for development". Xcode takes care of all the nonsense of collecting the device's UDID, sending it up to Apple's server, adding the device to your development provisioning profile, and downloading the updated provisioning profile.
Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.