Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19336] iOS9: WatchOS2 build settings have wrong values

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionInvalid
Resolution Date2015-08-11T18:36:33.000+0000
Affected Version/sRelease 5.0.0
Fix Version/sn/a
ComponentsTooling
LabelswatchOS2, watchkit
ReporterChee Kiat Ng
AssigneeChris Barber
Created2015-08-08T08:42:20.000+0000
Updated2017-03-17T18:06:41.000+0000

Description

Was trying to integrate my work on watch connectivity with the latest timobile SDK. There is an error when communicating between watch and phone simulators, stating that the watch app is not installed, but it is. Did some investigations and realised that the build settings on my native Xcode project vs the ti build generated Xcode project is different for targets watchapp and watch extension. See attached screenshots to see the difference. basically, the base SDK on watch app and watch extension should be WatchOS2, and not iOS9. I believe we need to change it to WatchOS2 with the correct architecture in order to get the watch app running on WatchOS2.

Steps to reproduce

1. *ti create* titanium app 2. enter project folder 3. *ti create* apple watch 4. enter extensions folder and open apple watch Xcode project 5. enter storyboard and add a new label with some text 6. *ti build -p ios -I 9.0 --launch-watch-app*

Actual result

you will see the label with the new text on the watch app, indicating it's correctly working. However, if you enter the build folder, and open the Xcode project, click on the watch app target and watch app extension target, they are NOT using watchOS2 as base SDK.

Expected result

It is supposed to be watchOS2. We can either automatically force all watch apps to watchOS2 for builds on Xcode 7, or we include a flag to indicate in ti build (or ti create) telling the CLI we want to build for watch kit 1.0 or watch OS2. *Note*: For watch app and watch extension targets, the base SDK in the build folder generated by *ti build*, *as well as* the base SDK of the Xcode project in the extensions folder created by *ti create*, are not WatchOS2.

Attachments

FileDateSize
correct watch app build setting.png2015-08-08T08:45:15.000+0000104098
correct watch ext build setting.png2015-08-08T08:45:19.000+0000104413
generated watch app build setting.png2015-08-08T08:45:11.000+0000125211
generated watch ext build setting.png2015-08-08T08:45:22.000+0000125382

Comments

  1. Chee Kiat Ng 2015-08-08

    Another note. I tried to change the build settings manually in the Xcode project in the extensions folder, to see if i can do a workaround. Then i got an error about bundle identifier. I changed these in the plist to com.appcelerator.sg.SGTestWatch3.watchkitapp and com.appcelerator.sg.SGTestwatch3.watchkitextension but i still get an error on CLI when i call *ti build -p ios -I 9.0 --launch-watch-app*. The error is {quote} [TRACE] ** CLEAN FAILED ** [TRACE] The following build commands failed: [TRACE] Check dependencies [TRACE] (1 failure) [ERROR] An error occurred during build after 1s 896ms [ERROR] 65 {quote}
  2. Chris Barber 2015-08-11

    This works just fine. WatchKit 1 apps use the iphoneos SDK to build. WatchKit 2 apps uses watchos.
  3. Chee Kiat Ng 2015-08-12

    [~cbarber], I seem to be able to only build for watchkit 1. Can you please explain to me what build options or flags i have to use to build watcheos2 specific app? Is my steps above correct?
  4. Chris Barber 2015-08-12

    [~cng] Here's all you need to do: 1. Create a new project: ti create --type app --name foo --id com.appc.foo --platforms all --url http://foo --workspace-dir . 2. cd into the project: cd foo 3. Add a WatchKit 2 app: ti create --type applewatch --name bar --template watchos2 4. Build the app: ti build -p ios -I 9.0 --launch-watch-app
  5. Lee Morris 2017-03-17

    Closing ticket as invalid.

JSON Source