Skip to content

Apple Watch app building #4993

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ReeceReynolds opened this issue Aug 29, 2019 · 2 comments
Closed

Apple Watch app building #4993

ReeceReynolds opened this issue Aug 29, 2019 · 2 comments
Assignees

Comments

@ReeceReynolds
Copy link

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 5.4.0
  • Cross-platform modules: 5.4.2
  • iOS Runtime: 5.4.2

Describe the bug
I'm trying to add an Apple Watch app to a NativeScript project I am working on. I have followed the documentation on how to add the Watch app to the App_Resources although the project won't build and I receive the following error:
Unable to apply changes on device: (Device UDID). Error is: Expected "/*", ";", or [ \t\n\r] but "E" found..
Both the iOS app and Watch app build and run as expected prior to copying the Watch app into the resources.

Expected behavior
Watch app and iOS app build successfully.

Additional context
I usually run the project with tns run ios --bundle but have tried without bundle. I have also erased all content from the emulator, tested on personal iPhone and Apple Watch and restarted my machine but no luck.

After reading around I believe this could be do with signing stated here #4589

The watch app inside NativeScript application support only Automatic code signing. Any provision configuration inside App_Resources/iOS/build.xcconfig will be ignored. And the application build will most probably fail.
I am signing the project and have my provisional profiles set up with my devices. Watch app is set to "Automatically manage singing" for both apps.

@ReeceReynolds ReeceReynolds changed the title Apple Watch apps Apple Watch app building Aug 29, 2019
@KristianDD
Copy link
Contributor

Hi @ReeceReynolds,
I am sorry for the late response. We were concentrating our efforts on delivering the NativeScript v6.1.0 release.

I have encountered the same error lately and it turned out to be a bug that manifests itself, when the Apple Watch Extension contains an .entitlements file and the extension has a space in the name(which is by default when created in Xcode). As a workaround you should rename the extension, so that it doesn't contain a space in the name.
1 Rename the extension folder
2 Rename the .entitlements file to match the extension
3 Inside the Info.plist of the extension, change all occurrences of the extension name.

You can check this issue for more information and to track the progress of the fix.

@ReeceReynolds
Copy link
Author

Thank you, fixed the error message I was getting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants