[TIMOB-2999] iOS: XCode Project Settings and Base SDK
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-07-05T15:43:09.000+0000 |
Affected Version/s | Release 1.7.0, Release 2.1.0 |
Fix Version/s | Sprint 2012-14 Core, Release 2.1.2, Release 3.0.0 |
Components | iOS |
Labels | core, qe-review, qe-testadded |
Reporter | Jon Alter |
Assignee | Neeraj Gupta |
Created | 2011-04-15T03:34:25.000+0000 |
Updated | 2013-06-25T16:31:02.000+0000 |
Description
Feature
Customer wants to be able to specify a custom Base SDK in a Titanium file, and have it influence the generated XCode project. Also, future customers may want control of other XCode Project Settings.
Proposed Solution
Added additional elements to the iphone element in the tiapp.xml to allow the user to customize the XCode Project Settings. The relevant Titanium scripts would take these into account when generating an XCode project.
What Properties Need To Be Exposed
I will ask the customer to comment on the specific properties they would like exposed.
Associated Helpdesk Ticket
http://developer.appcelerator.com/helpdesk/view/68641">http://developer.appcelerator.com/helpdesk/view/68641
Attachments
File | Date | Size |
---|---|---|
screenshot-1.jpg | 2011-10-20T14:14:36.000+0000 | 377114 |
Actually, the Base SDK can probably continue to default to "latest iOS" or the value of the latest iOS version that a particular release of Titanium is supporting (not sure what Titanium is doing now).
The Xcode project build property in question is called "iOS Deployment Target" and is used to specify the minimum supported version.
Developers need to be able to set minimum SDK manually without opening Xcode. This feature needs to be added to the tiapp.xml elements.
One use case provided by Enterprise customers is that they need to limit their device testing and app deployment to certain SDKs. Only 4.2 and up for example. This allows them to only test on 4.2 and 4.3 devices. Currently 1.7.2 allows down to 3.1 and they are not interested on deploy on 3.1 devices. Even after 1.8 is released and minimum SDK is bumped to 4.0, iOS 5 will be out and users may want to deploy to 4.1 or 4.2 SDK and up only.
Changed the reporter to Alan, as he is carrying this forward at the moment.
The workaround is to generate your project from Titanium Studio, find and open the generated Xcode project file and change the setting "iOS Deployment Target" to the minimum iOS version you want to support for each of the three targets and the generic project target. See attached screenshots. Note that in 1.8 you may set it to any iOS version greater than or equal to 4.0.
TESTING
---- For testing you will need: * A new (clean) TiStudio project * An iOS device with 5.0 or later * An iOS device with 4.3 or earlierTest 1: Version < 4.0 (minimum support)
Edit the
tiapp.xml
to include the following:Clean project
Build project for simulator (any)
PASS: Log contains this output:FAIL: Log contains this output:
Test 2: Version > latest (maximum support)
Edit the
tiapp.xml
to include the following:Clean project
Build project for simulator (5.1)
PASS: Log contains this output:FAIL: Log contains this output:
Test 3: Nonsense value
Edit the
tiapp.xml
to include the following:Clean project
Build project for simulator (any)
PASS: Log contains this output (may also contain a minimum/maximum warning, but this must appear):Test 4: No value
Edit the
tiapp.xml
to remove the<ios-min-ver>
tag.Clean project
Build project for simulator (any)
PASS: Log contains this output (and *does not* contain a minimum/maximum or other warning):Test 5: iOS 4.0 minimum on device
Edit the
tiapp.xml
to include the following:Clean project
Build project for device (any)
PASS: App installs on both pre-5.0 and post-5.0 devices.Test 5: iOS 5.0 minimum on device
Edit the
tiapp.xml
to include the following:Clean project
Build project for device (any)
PASS: App installs on post-5.0 devices, but *does not* install on pre-5.0 devices. iTunes will issue a warning about needing to update to a later version of iPod software.PR merged https://github.com/appcelerator/titanium_mobile/pull/2505
this is a feature I was waiting for. we can take advantage of this : building project for IOS 4.3+ should remove the 'armv6' flag compilation since Apple stops support for this devices in IOS 4.3 and above.
Vincent - Please watch TIMOB-9632 and TIMOB-9932. These are our tickets for disabling unnecessary armv6.
Fixed by https://github.com/appcelerator/titanium_mobile/pull/2753 in 2_1_X
Followed steps to modify tiapp.xml in a new project as per Test 5 above. Built with 2.1.2.v20120824144611.ed7f777 using "titanium run --platform=iphone". Build output shows "Minimum iOS version: 5.0" but I still see "IPHONEOS_DEPLOYMENT_TARGET = 4.0" in the generated project.pbxproj file. Built for device using Titanium Studio 2.1.1.201207271312 and the same SDK as the command line build and still saw 4.0 as the deployment target in the project file. In addition, my app file has an armv6 architecture.
Verified feature works as expected with "run on device" using SDK 2.1.2.v20120824144611 and the following: Lion - Xcode 4.2 Lion - Xcode 4.3.3 Lion - Xcode 4.4.1 Mountain Lion - Xcode 4.4.1 Also verified packaged ipas with ad-hoc provisioning work as expected in Lion and Mountain Lion both with Xcode 4.4.1. As noted by Paul, generated Xcode projects do in fact contain (for packaged and run on device projects) 4.0 as the deployment target. We will verify if transport.py completes successfully. @Paul - Track TIMOB-9632 and TIMOB-9932 regarding your armv6 comment, this ticket will make no change to that behavior.
Closing this bug as the feature is working as deigned. Opening a new bug to track the Xcode project setting issue as well as its effect on transport.py.