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

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.

Related

Limitations of an old version of iPhone SDK

I have a mac with OSX version 10.5.6 and I'm wondering about the limits of developing iPhone apps with it.
Since I need to install an old SDK, will the apps I make still be possible to use on new iPhones? What kind of features will I miss out on, by using an old SDK? Are there any major changes in the new version of Xcode that will make it reduntant or unprogressive for me to learn an old SDK?
You will not be able to submit an app to the App Store unless it has been compiled against the latest iOS SDK (iOS 5.1 at this time, iOS 6 soon.) This does not mean it needs to use the features in the latest SDK, but you must have used that SDK when compiling. Apple will automatically reject apps compiled against an older SDK.
If you don't care about the App Store and just want to play around, you can do so with an old SDK but it might not allow you to attach the debugger to a device running a newer version of iOS.
Since I need to install an old SDK, will the apps I make still be
possible to use on new iPhones?
The code is for the most part is still the same. Your apps will work on all iPhones, iPads, and iPod touches.
What kind of features will I miss out on, by using an old SDK?
Faster Compiling, Code suggestions, and a few other things that won't prevent you from making iOS apps in the future.
Are there any major changes in the new version of Xcode that will make it reduntant or unprogressive for me to learn an old SDK?
No
Good luck!

Check SDK methods used in an iPhone app

As Apple adds new APIs and new methods to APIs with every new iOS update or release and given that nowadays you can't even test on an iOS 3.x simulator, is there any way to test your iPhone app in older SDKs or to know what SDK level you are using through it?
Downgrading to an old Xcode with a 3.x simulator is not an option and, well, there are tons of methods introduced in, say, 4.2.
Has any one come up with a lib, script, tool, anything, that analyzes the code to show API usage?
The way most iOS developers do this is to keep around an old 1st or 2nd generation iPod Touch (or other old iPhone device) that hasn't been updated past the oldest iPhone OS version that they plan on supporting with their Deployment Target setting.
A cheap used iOS device, even with a scratched/cracked display or mostly dead battery, from eBay (et.al. or some neighbor or nephew who upgraded), might work.
Testing on an old device is actually a better and more accurate check than just testing with the Simulator, as the Simulator for various SDK versions supported APIs that the device at that OS level did not.

iPhone App Run Different iOS

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.

Build an iOS4 app that will also deploy on iPhone OS 3.x devices

I've got a couple of applications in the App Store at the moment which I've had ready after the release of iOS4. If I try and download one of these in the App store on a 3.x device, it will tell me I need to upgrade. Is there a way to make my application not do this, as I don't think I am using any API calls specific to iOS4.
I originally thought that this could not be done but I just now installed 'Plants vs Zombies' and 'Angry Birds' on my iPod Touch (running 3.1.3) so it must be possible as I'm sure these have released updates recently, and being in the top5 games, I would have thought they were developed using the iOS4 SDK. I am hoping it is just one value somewhere but if anyone could let me know how to do it that would be awesome :).
Easy. Open up your project info.
Find this line "iPhone OS Deployment Target" select 3.0
You can still develop with the latest xcode and current 4.0 SDK, but if you dont make any 4.0 calls this should allow you to weak link to 3.0+ and allow apps to work.
You really should test this on a 3.0+ device to see if it works though. You can still set your Base SDK to 3.2 or 4.0.

iPhone OS 4.0 backwards compatible with 3.1/.2

I'm building an iPhone application with a base SDK target of 3.1.x. I've got a friend who offered to test it on the OS 4.0 beta, but I'm wondering in advance if I should bother. Will my application run under 4.0 or is it not backwards compatible? I have to imagine it will since apps built for 2.x run on 3.x just fine AFAIK. Any gotchas?
This information is still under NDA and therefore cannot be discussed here, except what was mentioned at th keynote and is thus public.
That said...
I can see the announced multitasking as a gotcha in terms of memory, performance and application state. Testing on OS 4 seems like a good idea in light of that. However, I your friend's device is not a latest-gen hardware device (iPhone 3GS or iPod touch 3rd generation), you will not get test results that deal with multitasking.
Also, remember that when installing the iPhone OS beta, you will need to add your friends UDID to your list of testing devices in your devloper portal or else the device will lock up when you upgrade.
In case you or someone reading this needs to know:
To upgrade, you can either use XCode's Organizer or simply use iTunes. Hold the "option" key and click on the "restore" button. A window will pop up asking you what firmware to use.
Again, thes kind of questions are not yet really legal outside of Apple's develope forum.
I hope this helps. Good luck and happy developing!!
I've been using 4.0 beta for a few weeks now, and haven't run into any problems with my / App Store OS 3 apps. I don't think there were any changes in OS 4 that would break existing OS 3 apps but I can't say so with complete certainty.
Most likely any features from 3.0+ will be in 4.0. Features in 2.x may be removed.
No way to know for certain unless you can use the beta or wait until the official release.
You should always test on as many devices as possible. As mentioned, OS 4 is particularly good to test with just to make sure you interact well with the new multitasking features (which is public knowledge so it's not like saying anything about that would go against the NDA).