With the latest version of 7.0.0 i tried to build a sample hello world template and it won't compile on ios, but on android it works fine..
Environment
tns info
β Getting NativeScript components versions information...
β Component nativescript has 7.0.3 version and is up to date.
β Component @nativescript/core has 7.0.0 version and is up to date.
β Component @nativescript/ios has 7.0.0 version and is up to date.
β Component @nativescript/android has 7.0.0 version and is up to date.]
tns doctor
No issues were detected.
β Your ANDROID_HOME environment variable is set and points to correct directory.
β Your adb from the Android SDK is correctly installed.
β The Android SDK is installed.
β A compatible Android SDK for compilation is found.
β Javac is installed and is configured properly.
β The Java Development Kit (JDK) is installed and is configured properly.
β Xcode is installed and is configured properly.
β xcodeproj is installed and is configured properly.
β CocoaPods are installed.
β CocoaPods update is not required.
β CocoaPods are configured properly.
β Your current CocoaPods version is newer than 1.0.0.
β Python installed and configured correctly.
β The Python 'six' package is found.
β Xcode version 10.3.0 satisfies minimum required version 10.
β Getting NativeScript components versions information...
β Component nativescript has 7.0.3 version and is up to date.
β Component @nativescript/core has 7.0.0 version and is up to date.
β Component @nativescript/ios has 7.0.0 version and is up to date.
β Component @nativescript/android has 7.0.0 version and is up to date.
Describe the bug
With the latest version of 7.0.0 i tried to build a sample hello world template and it won't compile on ios, but on android it works fine..
To Reproduce
run tns debug ios or tns run ios
Expected behavior
Should compile and see debug builds
Output from tns debug ios
Entrypoint bundle = runtime.js vendor.js bundle.js
Entrypoint tns_modules/@nativescript/core/inspector_modules = runtime.js vendor.js tns_modules/@nativescript/core/inspector_modules.js
[../package.json] 949 bytes {bundle} {tns_modules/@nativescript/core/inspector_modules} [optional] [built]
[./ sync ^./app.(css|scss|less|sass)$] . sync nonrecursive ^./app.(css|scss|less|sass)$ 174 bytes {bundle} [built]
[./ sync recursive (?)(??).(xml|css|js|(?.)scss)$] . sync (?)(??).(xml|css|js|(?.)scss)$ 271 bytes {bundle} [built]
[./app-root.xml] 309 bytes {bundle} [optional] [built]
[./app.css] 1.84 KiB {bundle} [optional] [built]
[./main-page.ts] 1.36 KiB {bundle} [optional] [built]
[./main-page.xml] 1.87 KiB {bundle} [optional] [built]
[./main-view-model.ts] 1.04 KiB {bundle} [built]
[./main.ts] 1.95 KiB {bundle} [built]
+ 333 hidden modules
Webpack compilation complete. Watching for file changes.
Webpack build done!
Updating runtime package.json with configuration values...
Project successfully prepared (ios)
Building project...
Xcode build...
**/platforms/ios/internal/main.m:5:9: fatal error: 'NativeScript/NativeScript.h' file not found
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
note: Using new build systemnote: Planning buildnote: Constructing build description
* BUILD FAILED *
Hey @gregmeszaros - can you perhaps share the project, or at least the command used to create it? I've been building for ios with the latest CLI without issues. From the output of tns doctor everything looks normal. Perhaps try ns clean and then re-running the app.
Same issue here with nativescript 7.0.6 on a blank project created by cli :
The steps I followed
ns create test --template js
then :
cd test
npm i @nativescript/ios --save-dev
npm i @nativescript/android --save-dev
ns doctor
β Getting environment information
No issues were detected.
β Your ANDROID_HOME environment variable is set and points to correct directory.
β Your adb from the Android SDK is correctly installed.
β The Android SDK is installed.
β A compatible Android SDK for compilation is found.
β Javac is installed and is configured properly.
β The Java Development Kit (JDK) is installed and is configured properly.
β Xcode is installed and is configured properly.
β xcodeproj is installed and is configured properly.
β CocoaPods are installed.
β CocoaPods update is not required.
β CocoaPods are configured properly.
β Your current CocoaPods version is newer than 1.0.0.
β Python installed and configured correctly.
β The Python 'six' package is found.
β Xcode version 10.3.0 satisfies minimum required version 10.
β Getting NativeScript components versions information...
β Component nativescript has 7.0.6 version and is up to date.
β Component @nativescript/core has 7.0.0 version and is up to date.
β Component @nativescript/ios has 7.0.0 version and is up to date.
β Component @nativescript/android has 7.0.0 version and is up to date.
Then I try to run on iOS simulator :
ns run ios
[...]
/Users/[REMOVED]/dev/projects/perso/test/platforms/ios/internal/main.m:5:9: fatal error:
'NativeScript/NativeScript.h' file not found
#import <NativeScript/NativeScript.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
note: Using new build systemnote: Planning buildnote: Constructing build description
** BUILD FAILED **
Unable to apply changes on device: [REMOVED]. Error is: Command xcodebuild failed with exit code 65.
and right after the error :
ns doctor
β Getting environment information
Cannot read property 'filter' of null
Xcode version 10.3.0?
We can probably bump the requirement but what version of Xcode are you using?
@bil0u
Yes I'm using Xcode v10.3 (10G8) on macOS 10.13.6 !
Ah yeah thatβs the issue. The latest is Xcode 11.6 - can you update?
No, to update Xcode I need to update macOS to 10.14+, which is impossible for me for hardware reasons
Yes I had xcode 10.6 and MacOs Mojave after upgrading to MacOs Catalina and then upgrading to latest Xcode(11.x) solved the issue for me.
Is it possible to set some warnings in nativescript cli?
At the moment the CLI shows --> Xcode version 10.3.0 satisfies minimum required version 10
@gregmeszaros indeed that message should be updated - we'll have to track down the minimum version that will still work.
@NathanWalker do you think there's any tricks I can do in order to compile for iOS using Xcode 10.3 with NativeScript 7 ?
I have no idea how much work It would involve to make it work and if it's even possible.
Thanks for your time !
@NathanWalker do you think there's any tricks I can do in order to compile for iOS using Xcode 10.3 with NativeScript 7 ?
I have no idea how much work It would involve to make it work and if it's even possible.
Thanks for your time !
Did you ever find a workaround? I'm in the same situation. Was trying to do a cloud build instead of my older mac with circle ci like the nativescript documentation mention but have had no luck doing it.