iOS App Distribution and Deployment Target - objective-c

I need to build app for distribution via app store.
Application is tested and working on iOS 5.0, 5.1 and 6.0.
Do I need to build different archives for each iOS version (change iOS Deployment Target setting for each build)?
Is there any difference to compiled output when I change iOS Deployment Target setting?

You just need to do one build with the lowest iOS version you want to support, and then you go through all the upload process.

Basically the SDK version you are using is highest iOS version it will run and Deployment Target is the lowest.
So set your Deployment Target to 5.0, compile using iOS SDK 6.0 (you don't have any other option, though) and that's it. Submit to the App Store.
I don't know if there are some differences in binary when changing Deployment Target, but there are some during compilation for sure. For example when you set it to iOS 6, you may get deprecation warnings from the latest API changes.

Related

How to test my app on ios 7 using Xcode 6 simulator

I'm trying to test my app with ios7 using Xcode 6's simulator but I can't find the option to change it. Currently it only loads ios8 while my deployment target is set to 7.
Also according to this message from Apple:
Starting February 1, 2015, new iOS apps uploaded to the App Store must include 64-bit support and be built with the iOS 8 SDK, included in Xcode 6 or later. To enable 64-bit in your project, we recommend using the default Xcode build setting of “Standard architectures” to build a single binary with both 32-bit and 64-bit code.
Does this mean that new apps cannot run on ios7 anymore?
Thank you for your help.
First, Change Deployment Target to 7.You can change Deployment target from target under Deployment Info.
Go to Xcode Preferences, Select Downloads tab and download iOS7 Simulator.
Now go to Xcode, you can find iOS7 Simulator on target device list, if not than quit and restart Xcode.
Hope it will help.
The deployment target is the minimum version of iOS that your application will be expected to run on. It effects how your app is BUILT and not where you run it. You need to choose an iOS 7 device from the run destinations menu and then do a Build&Run to build, install, and run the app on the iOS 7 device.
If you don't have an iOS 7 simulator device in the run destinations menu, go download the iOS 7 runtime from Xcode -> Preferences -> Downloads
Yes you can, go to xcode(7) preferences>select Components here you can download Simulater and Documents also.

Static Library and deployment target issue

I am working on iphone app with deployment target 5.1.1 and now i am adding google ios sdk in my project. I am not giving this functionality to user who has iOS 5.1.1 in device.
But google iOS Sdk needs to set Other Linker flag (-ObjC) in build setting and it creates problem in iOS 5.1.1.
is there any way to set Other Linker flag conditionally? i need to give support for iOS 5.1.1.
I tried below steps but not able to run app in iOS 5.1.1.
At the end compiler will generate single binary. Whether you provide certain feature in iOS 5.1.1 or not does not matter to compiler. So if you need to set deployment target to iOS 5.1.1 then all the static libraries you link must also support that particular deployment target.
More details on ObjC flag

What's the meaning of Base SDK, iOS deployment target, Target, and Project in xcode

Say I set base SDK to 7, what does it mean? It could mean that the app would run on iOS 7. But that's what iOS deployment target is for.
Also why do I specify those 3 values in both project and target. It doesn't make sense. Why specify the same thing twice?
In the iOS 7 TechTalk, session Architecting Modern Apps, Part 2, they explain this clearly
Good read Hi! I'm #available!
So, a modern App might use iOS 9 as the Target SDK, and iOS 7 as the deployment target. This means that you can run on iOS 7, iOS 8 and iOS 9, and that you have available to you any iOS 9 calls when actually running on iOS 9.
You can read more in my post SDK and Deployment Target
The base SDK is what you build your app against (i.e. include and library files and frameworks). As you say, it doesn't affect the deployment target, except that base sdk >= deployment target.
You specify build settings on 2 levels as each project can have multiple targets and you might not want the same settings for all targets. The project-level settings override the default settings and the target-level settings override the project-level settings.
For example I have projects with both OSX and iOS targets and some are ARC and some are MRR. I'd have to have different projects for each if I was unable to specify build settings with the level of granularity that Xcode allows.
Base SDK is the SDK you link against. Deployment Target is the minimum required iOS version you application needs to run. You can build an application with SDK 7 that runs under iOS 6. But then you have to take care to not use any function or method that is not available on iOS 6. If you do, your application will crash on iOS 6 as soon as this function is used.
See the apple documentation for more details: https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html

Deployment Target in xcode

Im using xcode4.6 for retina display screen size. When i use Deployment target 5 i didn't get any warnings. When i use Deployment target 6.1 i get warnings shouldAutoRotation is deprecated. But i used both shouldAutorotateToInterfaceOrientation, willAnimateRotationToInterfaceOrientation in same viewcontroller.m file for iphone4 &5. I have plan to upload my app. Which Deployment target i use for app works in both iphone4 &5. If i use Deployment target 6.1, my app will work in iphone4? or it will work on only iphone5?. (or) app store reject my app or not for getting warnings?
It's "deployment target", not "development target". The deployment target defines the minimum version of iOS your app supports. If you set it to iOS 6.1 then your app will only work on devices that have iOS 6.1 or later installed. If you set it to iOS 5.0 then your app will run on any device with iOS 5.0 or later.
If you set the deployment target to 5.0 or 5.1 then your app must properly deal with the change in APIs. View controller rotation changed a lot in iOS 6.0. Therefore all of your view controllers must implement the older and the new rotation related methods. If your deployment target is 6.0 or later then you don't need to add any of the older 5.x rotation related methods.

Can I build for 4.x simulator but run in 3.x simulator?

Ok, there have been some questions alluding to this before, and I've even read some second-hand reports of people successfully doing this, but so far I haven't found a concrete answer.
Basically, I want to build an application for simulator using iOS 4.x, and then run it on a 3.x simulator.
I have both SDKs installed, so all I need is the last mile of getting the app to show up in the 3.x simulator.
I tried just copying the app across from Library/Application Support/iPhone Simulator/4.2/Applications to Library/Application Support/iPhone Simulator/3.0/Applications but it doesn't show up when I load the 3.x simulator. There's a binary plist called applicationstate.plist, which I'm guessing keeps track of what apps are installed on the simulator, but I don't know what the binary format is so I'm kind of stuck at this point.
Has anyone managed to load a 4.x app onto a 3.x simulator? And if so, how did you do it?
Why are you even trying to do this? What are you trying to achieve? If what you really just want to do is ensure the app works on iOS 3.x then simply state that in xcode and don't worry about the actual simulator. The simulator could be running iOS 5.0 for all you should care as long as you have set 'iOS Deployment Target' to '3.0' in xcode's project settings. That will ensure the application is compatible with iOS 3.x and above. Obviously you then still need to ensure you're not calling methods from SDK 4.x when it will run on an iOS 3.x device. If that is what you're trying to test then what you're doing won't actually work. You should (as Apple advises) always grab hold of a real device running the target firmware version and test it on that. Grab an old iPod for example with iOS 3.x and try testing your app on that to ensure you haven't called iOS 4.x methods when running under an older firmware.
The answer is: No, you cannot build for 4.x simulator and run on a 3.1.x simulator or earlier due to fundamental changes in the way the simulator works.
The only way to test 3.x support is to either run it on a 3.x device (after setting min deployment target), or build on an older xcode that supports 3.x simulator (which isn't feasible if you use Xcode 4, except for iPad 3.2).
Note: Setting the deployment target does not test compatibility with older operating systems. It's the operating system that it actually RUNS on that matters (such as "iPhone 4.3 Simulator", "iPhone 4.0 Simulator", "iPad 3.2 Simulator", or an actual device).
Of course, now that 3.x users make up less than 10% of the total population, it's not really worth the trouble to support it anymore.