Nativescript: Support for iOS GM SDK and Xcode 8?

Created on 12 Sep 2016  路  23Comments  路  Source: NativeScript/NativeScript

I expect you are fully aware that the current release version of NativeScript doesn't work with iOS10 GM? I've updated to the latest(?), v2.2.1, and can't compile my app because of the vast changes to the iOS libraries.

Any idea when a version will be released that lets me build with Xcode 8 using the iOS 10 SDK?

ios question

Most helpful comment

Hey @blairmacintyre,

We will release 2.3 before the end of this week.

All 23 comments

Hey @blairmacintyre,

We will release 2.3 before the end of this week.

Great. Was stupid/naive of me to install XCode8 before checking, I didn't reality there were so many changes to existing iOS APIs.

Doesn't work with official release of iOS10, need to have an issue ASAP, thanks a lot.

The upload of 2.3 that contains the support for the final Xcode 8 and iOS 10 will be done tomorrow. Enjoy!

Great! I really hoping recompiling with the iOS10 SDK will fix weird problems our app is exhibiting on iOS10 with the CoreMotion API ... long shot, but it all works fine pre-iOS 10.

Yay for version 2.3!!! 馃帀 馃巿 馃巶

the CLI update is available, did we also need to update the platform?

CLI: 2.3

So for some reason when i tns run ios or anything i have to tns platform remove ios then tns platform add ios before it works again. on a fresh platform add it launches the app, but lets say i ctrl+z to exit then run again i get this error

Expected "/*", "//" or "{" but "<" found.

if i make a change with tns livesync ios --watch i get this error:

10:57:02 AM - Compilation complete. Watching for file changes.

Executing before-prepare hook from /Users/ryanlebel/Apps/TeamReps/hooks/before-prepare/nativescript-dev-typescript.js
Unable to sync files. Error is: Expected "/*", "//" or "{" but "<" found.

posted in new issue: https://github.com/NativeScript/NativeScript/issues/2725

I have witnessed this as well...

  • App works again
  • Close, start new project, tns run it
  • Go back to first app, tns run
  • "Expected /*" error again...

All components should be updated to {N} 2.3 - CLI, platform, tns-core-modules.
Even if one of them is not 2.3+ you will experience different kind of issues.

If you continue to have problems with Xcode 8 once you project is fully updated, please let us know.

Update seteps:

rm -rf hooks
rm -rf node_modules
rm -rf paltforms
update versions in your package.json to 2.3.0
[for work with real deveces] open App_Resources/iOS/build.xcconfig, uncommend // DEVELOPMENT_TEAM = YOUR_TEAM_ID; and replac with your team id
tns run ios

Notes: We plan CLI 2.3.1 release with --teamId (or something similar) option that can allow you to specify the id, so that no modifications in build.xcconfig will be required.

Please note that with 2.3 you can stop tns commands with Ctrl + C.
Ctrl + Z will just put the process on background, but it will be still alive.

@dtopuzov hey man thanks! that worked to clear up my issue!

Ok, I got our app working.

We're using Typescript, btw: is there an automated way of getting typescript to see the ios.d.t files in the NativeScript/NativeScript repo? Right now I just downloaded them.

Thanks @jasssonpet ... So, I tried that, but clearly I need to do something else. If I don't already have the .d.ts files for the OS, then the "tsc build ios" steps fail because the typescript commands don't execute. Chicken and egg. Perhaps we need to change our project somehow?

@dtopuzov I tried all those exact steps, and I still get the error:
Expected "/*", "//" or "{" but "<" found.

The first prepare goes fine, but the 'tns run ios' command fails.

This is really frustrating... Every module is 2.3.0. There is nothing more to update. I am running Xcode 8 on macOS Sierra 10.12.

Hi, @manijak,

Have you tried removing and adding the ios again?
I always try these steps to be sure my app is with the new version and so on:

tns platform remove ios
tns platform add ios
tns prepare ios
tns run ios --emulator

Hope it helps!

Thanks @leocaseiro but it's not the first time I am dealing with {N} updates :) (been using it since 0.8.0).
I always remove the platform prior to update, so was the case for 2.3.0, several times...

First time seeing this error tho, never had it before.

I've got the same error and the steps above don't fix it for me... I'll let you know as soon as I've found the issue..

Hey guys, can you try the workaround described in https://github.com/NativeScript/nativescript-cli/issues/1639#issuecomment-200307798 and tell us if it works. It seems to be the same issue.

Also, what version of Cocoapods are you using and do you have any plugins installed or does this also happen when you create a fresh new app.

Thanks @jasssonpet, the workaround above did work for me. A fresh app worked fine, until I added a plugin with a podfile. The issue appeared after upgrading to xcode 8.

I have upgraded cocoapods from 1.0.1 to 1.1.0.rc.2 and this has solved the issue!

@jasssonpet Thanks! Forgot about that issue. I updated cocoapods to 1.0.1 ( I had 1.0.0rc1 installed). After that, removed and readded the /platform/ios/ folder, and the builds run fine now :)

Thanks again.

I also got the error Expected "/*", "//" or "{" but "<" found.

What fixed it for me was updating cocoapods as follows:

sudo gem install cocoapods --pre
tns platform remove ios
tns platform add ios
tns build ios

This took me from v1.0.1 to v.1.2.0.beta.1 of cocoapods (pod --version).

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings