Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19270] Building iOS 9 app with a WatchKit 2 app needs to specify -destination

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2015-08-03T17:23:17.000+0000
Affected Version/sRelease 5.0.0
Fix Version/sRelease 5.0.0
ComponentsiOS, Tooling
Labelsqe-5.0.0, watchkit
ReporterChris Barber
AssigneeChris Barber
Created2015-07-28T21:59:45.000+0000
Updated2017-03-14T21:28:12.000+0000

Description

By default, xcodebuild performs a iphoneos (device/dist) build. In order for it to build for the simulator, we need to specify the -sdk, but then the watch apps would fail to build because they don't support the iphonesimulator SDK. So, we can fix this by specifying a -destination and Xcode will pick the appropriate simulator SDK for each target. The param will look like:
"-destination', "platform='iOS Simulator',OS=" + appc.version.format(iosVersion, 2, 2) + ",name='iPhone 6'"
The device name will need to match whatever the selected simulator is. Also, we'll need to have a scheme. The default Titanium project doesn't have one, so we'll need to add one and make sure it's "shared".

Comments

  1. Chris Barber 2015-08-03

    PR: https://github.com/appcelerator/titanium_mobile/pull/7003
  2. Lee Morris 2017-03-14

    Closing ticket as fixed.

JSON Source