How to create an iPhone application? - iphone

I want to create an iPhone application. But the build should work for iPhone device 3.0 to 4.0.
Please give me some idea for that. Because, I have created an iPhone application. I have installed that application in a device (version 3.1.3), it is working fine. I have tried in iPhone version 4.0 with the same build. But I am getting some error message.
error message:
"entitlements are not valid".

There are two settings that you should look at (in your project's info on the build tab):
1) Base SDK - this is the SDK that you are going to link your app with - set this as high as you can.
2) iOS Deployment Target - set this to be iOS 3.0
The first one is the one used by the compiler to make your app.
The second one controls which devices your app can run on (iOS 3.0 means 3.0 and anything above that)
Watch out though - if you use any methods that are only available in iOS 4.0 the app will compile fine but will crash if you run it on a 3.x device - you need to thoroughly test it just to be on the safe side. If you look in the docs each method says which version of iOS it's available on.

Related

Confusion regarding Simulator and Base SDK?

I want to know whether iPhone Simulator version (i.e. iPhone 5.0 Simulator, iPhone 6.0 Simulator, etc) and Base SDK are related to each other or not?
So, if I develop an App with Base SDK 6.0 and if I test it on iPhone 5 Simulator - does it mean that I am testing it on device with iOS 5.0?
Please let me know.
Base SDK
The Base SDK is the version of SDK that will be used when compiling your application – the compiler will use the headers and libraries of this specific SDK.
iPhone OS Deployment Target
To specify which OS version is the minimum that your application will support, you set the deployment target. Your application will then run on this minimum OS as well as all later versions.*
For more info check this:-
Link
The base SDK is an indicator of what APIs your compiler will allow you to use. Deployment Target determins the minimum OS version this app will be allowed to run on. If they differ you need to make sure in code that you only use functions/classes/methods/symbols that already existed on the older OS. or else the app will crash with exceptions like "unrecognized selector"
Your question is imprecise: there is no "iPhone 5 Simulator". There is a Simulator app that can behave like a 4" iPhone 5 on a variety of OS version levels. The Simulator set to iOS 5.x will behave like a device with this OS version would.
Nope. With a base SDK of 6.0 means that you are using a simulator with iOS6.0 like for example if you were to deploy an application with base SDK 6.0 on your mobile device with iOS 5.1 and below, you will not be able to run it

Xcode 4.3.2 - Base SDK for Distribution of App

I am trying to distribute an iPhone App to the App Store for the first time. Currently, I am following this guide: Submitting iPhone Apps To The Apple App Store – A Step by Step Guide. Currently, I am on the step where I have to set the Base SDK field value. See, the screenshot.
As you can see, iOS 5.1 is the only choice available there. Now, if I set it as Latest iOS(iOS 5.1) - the default value - will the distributed app will be able to run on older OS's, for example iOS 3 or iOS 4? If not, then what will I do to make it run on older OS. Or, is there anything I misunderstood about BaseSDK?
No worry it will function in the older os you need to keep the deployment target minimum SDK which you can find in the picture if you updated the xcode with simulators of IOS 4 and 5 you can get these options
Update
Basically it means that you're going to be able to use all the API that is public in 5.1 SDK. This has nothing to do with "Which phone your app can run on".
iOS deployment target on the other hand, is asking you which devices can this app run. This is quite a dangerous question, since you can then say from iOS 3.0 to 5.1 for example. This means that your app can be installed in any iPhones running iOS 3.0 to 5.1, no matter what the phone is. That means the original iPhone and iPhone 3G can run your app if they have at least iOS 3.0 installed. You should test your app carefully if you decide to do this. Apple does not provide any way to test on older OS. You'd have to devise that strategy yourself.

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 Build SDK 4.0 With 3.2 Target Won't Install on iPad OS 3.2

I'm building an app for iPhone/iTouch that I also want to run on iPads (not a universal app, but one that just runs on on iPad with the 1x/2x button in the lower right hand corner).
I'm using iPhone SDK 4.0 and setting the following:
Base SDK: 4.0
iPhone OS Deployment Target: 3.2
When I do this, I can build an app just fine and run it on an iPhone/iTouch, but when I try to install it on my iPad I get the following error: The Info.plist for application specifies a minimum OS version of 4.0
In addition, if I package up the binary and submit it to Apple and it becomes available on the iTunes store, it shows that it's only available for iPhone (not the iPad). When I go to the App Store icon on my iPad, it doesn't even list the app as available (because Apple thinks it won't run on iPad, I assume).
Now I'm really confused, because I thought I understood the difference between the Base SDK and the Deployment Target, but Xcode is telling me I don't.
Can anyone help explain this to me?
As an aside but related question, if I build with Base SDK = "iPhone Device 3.2" it works fine on my iPad, but by doing so would I lose the Base SDK 4.0 built-in multi-tasking feature?
Check the 'Targeted Device Family' setting in your target's build settings. It needs to be set to iPhone/iPad if you want to be able to deploy to both devices.
This build setting automatically sets the UIDeviceFamily entry in the app's Info.plist (You shouldn't update this yourself, though—use the build setting instead.)
UIDeviceFamily

iphone Xcode settings problems

I am going through the Apple provisioning profile walkthrough documentation to create the binary to submit to the app store but came across a very visible problem.
The documentation shows that when the user clicks on the "Overview" tab in Xcode they should have a list of options such as:
Device - iPhone OS 2.0,
Device - iPhone OS 2.1,
Device - iPhone OS 2.2 (Project Settings),
Simulator - iPhone OS 2.0,
Simulator - iPhone OS 2.1,
Simulator - iPhone OS 2.2
However, in my version of Xcode, the "Overview" tab brings up this:
Device,
Simulator
I am wondering if this could possibly be contributing to the reason that the app store will not accept my binary - the error stating that "Apple is not currently accepting apps built in this version of the OS." Any ideas on what I am doing wrong?
EDIT:I have checked everything that I can possibly think of - this is the final SDK 4.0 that is the most current. I have tried almost every combination of base SDK and target SDK that is allowed in the build menu - although I am pretty sure the correct way is to have the base SDK at 4.0 and the target SDK at the lowest that it would possibly work - none of this works. Is there some sort of help desk I can call at Apple because I have been working on this one tiny problem now for about 10 hours and I am not making any progress at all.
Seams that you have and old SDK, try to download SDK4 final (not the beta).
Or your compiling options are old, to edit them right click on the project icon in the left column and click "Get info".
In the second tab (build) you should find all the options you need.
Must have been some recent changes to xcode. Everything worked once I set the Base SDK to 4.0 and the target SDK to 3.2.