Xcode project for different iOS versions, swift - ios

I am stuck! I sent my first app to the AppStore, which was approved but it was only for iPhone starting at iOS9.
I developed the app for iPad iOS7, iPad iOS8, iPhone iOS7, iPhone iOS8 and iPhone iOS9.
Some files stay the same between each versions, even if some features will be not available for iOS7. But the Library imported (Podfile) changed regarding to iOS versions.
But I have no idea of how I have to proceed to send it to the AppStore. I found nothing about creating a project for different iOS.. :(
Do I have to create a project with many targets corresponding to my versions? ( How can I set up the version for each target? How to manage the sharing of the files between each target?)
Or do I have to create many projects and send to the AppStore one by one?
Thank you a lot!!!

You specify the minimum iOS version you are supporting, in your case it's iOS 7. You do it in the left panel - click on your project, choose the target, go to General tab, and there you have Deployment Target. Edit it to the version you want (iOS 7)

Related

I set the deployment target to iOS8 and App store says "Compatibility: Requires iOS 7.0 or later". Can I force app to install only in iOS8 only?

I released an iOS 8 version of my app today and wanted to limit it only to users running iOS 8 (because it uses some new Core Motion APIs that only work with iOS 8). It seems like iOS7 users are still able to download my app, even though the deployment target is iOS8 and the App Store says "Compatibility: Requires iOS 7.0 or later". Can I force app to run in iOS8 only? Does the Deployment Target option in Xcode still control which version of the OS is required on the App Store?
The answer is, you have to set the Deployment Target in three different places, in the project, in the app target, and (in my case) in the extension. If you don't set it in all three locations the app won't show as iOS 8 only.
Deployment target on all your TARGETS is the correct option. It's important to understand the different between "Deployment target" and "Base SDK". Both regard a iOS SDK version, but they have different meanings. To learn what read here.

xcode 5 : can i still create application for ios 5?

Is it possible to create an application that could be executed on iOS 5 devices with the new Xcode 5? On the software update page, within the app store, there is an Xcode 5 update available, but i am wondering if it would be a wise thing to do to update to Xcode 5.
My major concern is whether i could still create applications targeting iOS 5, and if i could still work on old projects targeting iOS 5.
I have searched through SO but seems there is not much related resources yet. Please shed some light on this. Thanks!
in xcode5 Preference you can download the simulator for iOS 5.0, iOS 5.1, iOS 6.0, iOS 6.1 like below image from Xcode Download preference:
After set Deployment Target:-
here you getting option for testing which simulatore:-
One thing of note:
The iOS 5 simulator is only available for download if you're running Xcode 5 under Mountain Lion. If you're running Mavericks then you can't download or use it.
Yes , you can create and test your application on iOS 5.0 simulator too in Xcode 5.
They would just be created with the iOS 7.0 SDK as the base SDK
Yes you can still do App compatible with iOS5
Just set the in your projets settings (General tab)
But you have to be aware that by default, XCode will use the last SDK (7.0), this means that your app will have the new iOS7 native design on iOS7 devices
Yes it is possible, in the project configuration you have to select the correct Deployment Target (in your case 5.0).
The only problem is that you are creating an app with the new SDK 7.0, so your application will use the new user experience.

What determines if an iOS app gets the new look in iOS 7

What exactly does iOS 7 use to determine whether the application should be displayed with the traditional iOS 6 style UI (aka iOS6 compatibility mode), or the newer iOS 7 UI?
If I build our app in Xcode 5, with base SDK set to 7 I get the iOS 7 UI as expected
If I build our app in Xcode 5, with base SDK set to 6 I still get the iOS 7 UI (unexpected, happens on real device and simulator)
If I build in Xcode 4.x, I get the older UI as expected
In all cases, the deployment target is set to 5.
Since our app has fairly custom UI we're not ready to move to the new look of iOS 7 yet. However we do need to make some backend changes to support iOS 7 which we need to release now. Can we still submit apps built with Xcode 4.x and expect them to be accepted?
For the time being, you are able to. Apple will make an announcement when they stop accepting apps built with Xcode 4.x. My company is currently submitting apps with Xcode 4.6 since we do not have a new enough operating system for 5. I suspect it will be at least a few months until they stop.
Running against 6.1 Base SDK should do it.
However, as I discovered yesterday. Anything less than 7.0 Base SDK isn't supported by Xcode 5 (officially) and so it is undefined behaviour.
My app suddenly switched from iOS6 UI to iOS7 UI with no code changes.
In the end I restarted my mac and phone, deleted the app, deleted derived data and reinstalled cocoapods and it was working on iOS6 UI again.
Make sure that you set the Base SDK to iOS 6 in both the Project build settings & the target build settings - that should do the trick. Even though the target settings are supposed to override the project, I found that when just the target was set to 6 - it compiled with 7.
Regarding XCode 5, it's true that it doesn't officially ship with the iOS 6 SDK. However, you can extract it from XCode 4.6 and use it in 5.
You'll find the SDK in the XCode app under:
Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
Simply copy it from an existing installation of XCode 4.6 or from its .dmg (which can still be downloaded from Apple's website) to the corresponding folder in XCode 5, restart and you should now be able to select it as the Base SDK. Note that you'll have to do this after every update of XCode so you might find it easier to use a symbolic link rather than copying.
We've successfully submitted apps built this way to the App Store although as has been said before me, it would be a good idea to transition to iOS 7 ASAP before Apple makes it compulsory.

Can't test on my IPad - iOS version reported as too old

My iPad2 device is running iOS 6.1. Since I upgraded XCode from 4.5->4.6 I get an error that my device is not running a new enough version of iOS!
I use no advanced features and in XCode my project iOS Deployment Target is 5.0.
Here are my settings:
Here are my provisioning stuff, it looks fine to me:
I am using Xcode 4.6 and see I have all deployable targets available. See screenshots. Though note the base SDK is set to iOS 6.1.
Apple always suggests building against the latest SDK and then setting the deployment target to whatever you want it to be. Also make sure any IB item has the correct deployment version set as well.
Just a helper for newer developers (like me):
I had problems testing my iPhone app on a new iPad and it was due to not running Organizer to initialising the new device (iPhone or iPad).
(You also have to select that the device is used for debugging)
It will update your new device with the necessary libraries and then deploying is simple.
You can run Organizer from the Xcode->Windows menu.

Use an iPad 1 for development and debugging in the latest Xcode (4.5), how?

I still have an iPad 1. I use the latest version of XCode for app development which will only debug apps on devices that run iOS 6.
Unfortunately, iTunes will not allow you to upgrade an iPad 1 past iOS 5. Can XCode be configured to debug apps on iOS versions older than version 6?
Another approach would be to upgrade the device to iOS 6 via jailbreaking. I have read that jailbreaking an iPad 1 will give you a path to upgrade it to iOS 6, but I haven't found anything specific to development.
EDIT
It turns out that this problem only occurs when I create a new app using XCode. However if I open sample code from some existing apps (for example SpeakHere), my iPad 1 suddenly appears on the XCode "run list" and I can test on the iPad 1! I suspect that there is something about these apps that is "old" that causes them to work. Can I simulate that somehow on new apps I build using XCode?
No, you cannot use a first generation iPad for iOS 6 specific development.
You can, on the other hand, use the latest Xcode and iOS 6 SDK, and still use your iPad 1 for debugging purposes. You naturally can't use iOS 6 features, because the iPad is maxed at iOS 5.
To enable this, you can download 'Device Debugging Support' packages, to allow you to do this. Go to Xcode->Preferences->Downloads->Components, and see if it's available.
It sounds like you're just accepting the default deployment target of 6.0 for new projects. This means you won't be able to run the application on older versions of iOS, much less debug them. You need to set the deployment target for your project or target to 4.x.

Resources