Jose Antonio Quiles (7) [Avatar] Offline
#1
Hello.
I have just upgraded to version 2.5 and blank template does not work for iOS.

$ tns create BlankProject --template tns-template-blank
......
Project BlankProject was successfully created.

$ cd BlankProject
$ tns run ios --emulator

We have failed to check if we need to add a compatability LaunchScreen.xib due to: Error: ENOENT: no such file or directory, open '/Users/joseanquiles/MyProjects/Nativescript/BlankProject/app/App_Resources/iOS/Info.plist' ENOENT: no such file or directory, scandir '/Users/joseanquiles/MyProjects/Nativescript/BlankProject/platforms/ios/BlankProject/Resources'

However, if I create a new project using default template (without --template option), it run ok in iOS emulator.

Before, with NativeScript 2.4.2, it worked perfectly, using blank template.

Is there any problem with blank template and 2.5 for iOS ?

Jose Antonio


Nick (11) [Avatar] Offline
#2
Does tns build ios work correctly?
Jose Antonio Quiles (7) [Avatar] Offline
#3
$ tns build ios

Same error:

Preparing project...
We have failed to check if we need to add a compatability LaunchScreen.xib due to: Error: ENOENT: no such file or directory, open '/Users/joseanquiles/MyProjects/Nativescript/BlankProject/app/App_Resources/iOS/Info.plist'
ENOENT: no such file or directory, scandir '/Users/joseanquiles/MyProjects/Nativescript/BlankProject/platforms/ios/BlankProject/Resources'
# build ios


However, using de default template (without --template, all is ok)

Nick (11) [Avatar] Offline
#4
I would try reinstalling NativeScript again maybe. There was a release yesterday I believe for 2.5.1.

npm install -g nativescript

It seems like a dependency wasn't installed correctly or maybe you need an XCode update.
Jose Antonio Quiles (7) [Avatar] Offline
#5
I have just upgrade to 2.5.1, but the error remains.

$ npm install -g nativescript
$ tns --version
2.5.1
$ tns platform remove ios
$ tns run ios --emulator

The build process for Android also fails:

$tns build android

:processF0DebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processF0DebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/local/opt/android-sdk/build-tools/25.0.2/aapt'' finished with non-zero exit value 1

Perhaps this template hasn't been updated for NativeScript 2.5 ....



Jose Antonio Quiles (7) [Avatar] Offline
#6
Hello, It seems that the blank template does not generate the App_Resources directory. It does not exist after project creation. I have copied this directory from another project (created with the default template) and now it works!
I don't know if it is a tns-template-blank bug or it is a problem in my environment. Has anybody detected a similar problem wtih blank or another templates?
Nick (11) [Avatar] Offline
#7
Sorry for the delayed reply. It appears I didn't have this issues because I had upgraded previous projects of mine so it could be the case that the template has not been updated yet.

I'm going to reach out to some of the NativeScript devs and see if I can't get a concrete answer on this. Meanwhile, you can try creating a new project without using the --template parameter as everything appears to be working correctly there still.