iPhone App Run Different iOS - iphone

I am getting a fat binary when I go to upload, and I want to make sure that my application can run across 3.0, well even 2.0. Is there a specific way to make sure that this will show when I go to upload. I am not using any specific iOS 4 features, and I only have iOS 4 in my xCode. How can I test different iOS version?

The only way as I could think of is test your app on real old OS version devices. Since Apple prefers its users to upgrade to new OS version as soon as possible, they don't actually provide an official way for developers to test such backward compatibility.
Another relevant questions would be, "can I downgrade my device OS version to an old one, so that I can test my app on them?" I once did a research on SO and other Apple forums, and the result I got was NO, we developers don't have a way to "officially" downgrade our device OS version. Yes there are exceptions, you can try jail-breaking and then downgrading.
For jail-breaking / downgrading your OS version, check this post, A TimeMachine taking my iDevice back to 3.1.2? .
Edited: It's actually pretty easy to make sure that users with old OS versions can downloaded and install your app. All you need to do is set the Deployment Target in Xcode to the lowest OS version you want (iOS 3.0 would be the lowest in Xcode 3.2.5).
However, you need to bear in mind that such Deployment Target only ensures that your app can be downloaded and installed on such old version OS devices. They don't ensure compatibility during runtime. You still need to test your app on real old OS devices to ensure compatibility.

I dont think u need to worry about app version 3.0 below because it is not supported anymore. but how to test on different version, make sure change the iOS deployment target as Thomas refered.

There is no currently supported way to do this.
No current Simulator or Xcode tool will ensure that an app is completely compatible with an OS version older than the SDK used. The 2.0 SDK is not compatible with the current development tools. There is no officially supported way to downgrade a device.
Furthermore, Apple no longer even accepts app submissions that have a deployment target lower than 3.0.
Even most old 1st gen devices, if you can find one on eBay, have been upgraded to iOS 3.1.3. But if you have access to an old device running iOS 3.1.3, you can use that for testing. Many developers keep an old used iPod Touch around for just his purpose.
People with devices running something older than 3.1.3 are not only a really tiny percentage of the installed base, but are very unlikely to be still buying apps for that device. Even large developers with staff and legacy hardware available for this testing rarely waste the time on this market.

Look into Project -> Edit Project Settings -> iOS Deployment Target: 3.13. And then build?
Edit according to comment: You still need to ENSURE your code is within the runtime scope, i.e. do checks like 'respondstoselector' before calling methods in question.

Related

How to deploy code on Xcode 4 to newer ios

I have a very old Mac which is currently running Mac OSX Lion. It has Xcode 4 on it, and I created an app using that. Is it possible to deploy this app onto a newer iPhone? If not, do have any options to reuse the code on a newer version of Xcode?
If you want to deploy app on a device running iOS version more current than your Xcode supports, you won’t be able to launch it directly from Xcode. Just build the app for a generic device and then install the app manually. E.g. https://stackoverflow.com/a/35044362/1271826.
Just to warn you, while you can often install apps built on old Xcode versions on contemporary devices, occasionally there are little OS changes that break apps (and going back this many OS/SDK versions increases the probability of that). If this happens, without a contemporary Xcode version it will be exceedingly difficult to debug/diagnose the issue. Also, needless to say, you won’t be able to take advantage of contemporary device features (like bigger screens or whatever).
One final caveat: You won’t be able to distribute this app to the App Store until you build the app using a contemporary SDK version, generally achieved by building using a recent Xcode version. Review the Apple’s Developer News for references to minimum SDK versions.
Xcode 4 did not have Swift built-in, iirc, so your code is likely to be Objective-C.
You will have to update stuff, but nothing major like the conversion from Swift 1 to 5 would require.

Minimum iOS target version that Apple accepts in AppStore?

I have an application that I would ideally like to run on all iOS versions, however I think Apple accepts apps only from a version and above (3.0 I think, but not sure). So my question would be, what's the minimum iOS target version you can send in review (and get accepted). If anyone with greater iOS publishing experience would answer my question it would be great and maybe point out some places where I can read about it.
Many thanks!
Sometime last year, an Apple DTS employee posted (and later clarified) on the iOS Developer Forums that the App store would no longer be accepting apps with a Deployment Target lower than 3.0. That might indicate that a lower Deployment Target has or will become grounds for an app to be rejected.
I would never set the Deployment Target lower than that of the lowest OS version among the devices I plan to use to test the app before submitting it to the App Store.
Also, the installed based of devices which haven't been upgraded to 3.0 or above might be too microscopic to be worth a developer's time or effort (unless you happen to still have and use one for some reason).
ADDED in 2013: App store submission now requires that the app support the 4" display, which requires iOS 6.0 or later, which allows a minimum deployment target no lower than iOS 4.3
To back up what hotpaw2 indicated, this is from the News and Announcements for iOS Developers on June 29, 2010:
Make sure that your applications are
compatible with iOS 4. All new
applications and updates to existing
applications must be built with iPhone
SDK 4. In addition, the App Store will
no longer support applications that
target iOS 2.x.
ok... strangely Im having a hard time verifying this... but it's my belief that you must build your app with the latest base SDK (4.0), but you can target an IOS version all the way back to 2.0. Ill continue to try to verify that.
You can only build your apps with the SDKs you have installed.
Since XCode will nuke your old SDKs whenever you upgrade (unless you install XCode elsewhere), it is assumed that you will always be building using the latest stable SDK version. This is in contrast to, say, Android, which will always retain SDKs whenever you upgrade.
Your deployment target can go back as far as you want, right back to 2.0 - but you may find it difficult to actually test it on that platform! Most people would just target 3.x upwards, which gives you as close to 100% coverage as makes no difference.

How do I Ensure my Application's iOS Deployment Target will be Usable for that SDK?

I would like to set my iPhone App's iOS Deployment Target to the minimum possible SDK, which appears to be iOS 3.0 in Xcode version 3.2.6. Thus far, the base SDK I have been running against has been the latest (iOS 4.3). How can ensure that I am not using any newer features (i.e. since iOS 3.0) in my code, and that the application will not crash for the older iOS versions? Do I just need to find and install the older iOS SDK? If so, where may I find these version controlled SDKs?
Thanks,
Jeremy
You could try to run it on a device with the older sdk (we keep devices around with 3.1.3 for instance). However, you won't be able to find a downloadable version of the old OS from Apple.
If you don't have a versioned device around, the best way would be to look at any "suspicious" pieces of code that might have new features and make sure they are available in your base OS version (using the class references)
Yes, it's a bad system, but now you can start to keep old sdks around (i always make a copy onto a local storage device before I install a new version). As for restoring your device: I think you have to have made a backup at some time (i'm not 100% sure). But if you could I think it would be in organizer on Xcode and I guess you could check in iTunes too.

I am using Xcode 3.2.5. I have iAds running. Confused about about targest, iOs versions

Trying to keep up with the curve. I'm reading almost too much and is sending me in a tail spin. Is there a one stop link which will tell me what my target should be to run my app on all platforms based on what frameworks I have included? I make heavy use of Mapkit, and want to include iAds. My current apps seem dead on 3G.
Does Apple force you to support only the latest iOS? I have no problem with that, but not sure if someone who has and ancient 3G, how do I tell them, NO I don't support your phone, please upgrade?
Set your project's base SDK to the latest version of the SDK. Set the deployment target to the oldest version of the OS that you plan to support. You can use features introduced in versions later than your deployment target, but you'll need to check for them before you use them, else your app will crash.
Read the release notes for each version of the OS to get a good idea of what features were introduced when. In fact, make it a habit to read the release notes thoroughly each time a new version comes out.
iOS 4.2 runs pretty well on an iPhone 3G, so there's no need to drop support for the 3G anytime soon. If your apps currently don't work on the 3G, fire up your debugger and figure out why. What version of iOS are you running on that device? Where does it crash? This is typical debugging stuff.

Testing in iOS 3.1.3 with the latest Xcode

How do you test an app in iOS 3.1.3 with the latest Xcode build?
Is it possible to do this in the Simulator? If not, is it possible to downgrade a device to iOS 3.1.3?
Yes, you can downgrade a device. It is not officially supported but I've done it on two 3Gs with success for testing on 3.1.3.
First find a tool called RecBoot by someone called the0rkus, runs on Intel macs only. This brings the phone out of recovery mode once you have loaded the 3.1.3 software.
Find the .ipsw file for your device, as you know it is a different file for iPhone 3/3GS or iPod Touch. Load this software to the phone via iTunes in the usual way, holding the option key while clicking "restore". Wait while it loads.
When it finishes and reboots you will find iTunes complains about this version being incorrect. Situation is the software is loaded, ready to go, but it lacks the final blessing from Apple. RecBoot brings it out of this mode, "waking" the phone into normal ready-to-activate state. Once you have gone through connection to iTunes with a SIM inserted you have a phone just as if you had never gone to 4.0.
Too bad we have to resort to a hack to test with older devices but I don't know any other way. It would be nice if the simulator could still run 3.1.3, nice if setting deployment target would flag pre-3.2 features.
You can also install the older Xcode 3.2.1 with iPhone SDK 3.1.3 but the hardware is the true test of whether your software really works. Given that, you could probably skip finding and using it - although there is no quicker way to find everything that you can't use in 3.1.3. There is no problem having multiple copies of Xcode of different versions installed but it is a good idea to uninstall them with the script provided in /Developer/Library/uninstall-devtools (read the readme included with each Xcode distribution)
You need to test the app on a device running 3.1.3.
The deployment target is one thing (that you set to 3.0 so that you can test on the device)
But if you are looking debugging with a specific version of the SDK, you should have the respective XCode installer.
Does your simulator have a menu marked "hardware" with a variety of older OS version choices?
(Mine does.)
Just use that.
It won't be 100% "actual device" test... but it's a WHOLE lot easier.
(None of the simulators are 100% tests anyway.)