I'm compiling for the first time on the Mac, for the iPhone, when I type the command to compile:
cordova build ios
The error appears:
[ERROR] An error occurred while running cordova build ios (exit code 1).
I do not know what I'm doing wrong ....
Here's my config:
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.vovocooks.vovocooksv7862011" version="1.6.2"
xmlns="http://www.w3.org/ns/widgets"
xmlns:cdv="http://cordova.apache.org/ns/7.0">
<name>VovóCooks</name>
<description>
Comidas deliciosas ou especiarias que não se encontram em restaurantes,
começam com o VoVóCooks App.
</description>
<author email="[email protected]"
href="http://vovocooks.com.br/">
Vovó Cooks
</author>
<content src="index.html" />
<access origin="*" />
<access origin="http://google.com" />
<access origin="https://google.com" />
<access origin="http://maps.google.com" />
<access origin="http://*.google.com" />
<access origin="content:///*" />
<access origin="*" />
<preference name="LoadUrlTimeoutValue" value="70000" />
<preference name="webviewbounce" value="false" />
<preference name="UIWebViewBounce" value="false" />
<preference name="DisallowOverscroll" value="true" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="8000" />
<preference name="FadeSplashScreenDuration" value="0000" />
<preference name="android-minSdkVersion" value="16" />
<preference name="BackupWebStorage" value="none" />
<preference name="xwalkVersion" value="xwalk_core_library:23+" />
<preference name="xwalkVersion" value="23+" />
<preference name="UseLegacySwiftLanguageVersion" value="true" />
<preference name="android-build-tool" value="gradle" />
<feature name="StatusBar">
<param name="ios-package" onload="true" value="CDVStatusBar" />
</feature>
<feature name="SocialSharing">
<param name="android-package" value="nl.xservices.plugins.SocialSharing" />
</feature>
<platform name="ios">
<icon height="57" src="resources/ios/icon/icon.png" width="57" />
<icon height="114" src="resources/ios/icon/[email protected]" width="114" />
<icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
<icon height="80" src="resources/ios/icon/[email protected]" width="80" />
<icon height="120" src="resources/ios/icon/[email protected]" width="120" />
<icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
<icon height="100" src="resources/ios/icon/[email protected]" width="100" />
<icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
<icon height="120" src="resources/ios/icon/[email protected]" width="120" />
<icon height="180" src="resources/ios/icon/[email protected]" width="180" />
<icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
<icon height="144" src="resources/ios/icon/[email protected]" width="144" />
<icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
<icon height="152" src="resources/ios/icon/[email protected]" width="152" />
<icon height="167" src="resources/ios/icon/[email protected]" width="167" />
<icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
<icon height="58" src="resources/ios/icon/[email protected]" width="58" />
<icon height="87" src="resources/ios/icon/[email protected]" width="87" />
<icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" />
<splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
<splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
<splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
<splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
<splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
<splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
<splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
<splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
<splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
<splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
<splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
<splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
<splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
</platform>
<allow-navigation href="http://*/*" />
<allow-navigation href="https://*/*" />
<allow-navigation href="data:*" />
<allow-navigation href="http://192.168.1.15:8100" />
<allow-navigation href="http://192.168.1.23:8100" />
<allow-navigation href="http://192.168.1.7:8101" />
<allow-intent href="*" />
<allow-navigation href="http://189.37.196.163:8100" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<engine name="android" spec="^6.2.2" />
<plugin name="cordova-plugin-device" spec="^1.1.6" />
<plugin name="cordova-plugin-statusbar" spec="^2.2.3" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.2" />
<plugin name="ionic-plugin-keyboard" spec="^2.0.1" />
<plugin name="cordova-plugin-network-information" spec="^1.3.3" />
<plugin name="cordova-plugin-geolocation" spec="^2.4.3" />
<plugin name="cordova-plugin-camera" spec="^2.4.1" />
<plugin name="cordova-plugin-splashscreen" spec="git+https://github.com/apache/cordova-plugin-splashscreen.git" />
<plugin name="cordova-plugin-file-transfer" spec="^1.6.3" />
<plugin name="cordova-plugin-file" spec="^2.1.0" />
<plugin name="fr._46cl.focus" spec="git+https://github.com/46cl/cordova-android-focus-plugin.git" />
<plugin name="cordova-plugin-crosswalk-webview" spec="^2.3.0" />
<plugin name="cordova.plugins.diagnostic" spec="^3.6.2" />
<plugin name="cordova-plugin-x-socialsharing" spec="^5.1.8" />
<plugin name="es6-promise-plugin" spec="^4.1.1" />
<plugin name="Geolocation" />
<plugin name="cordova-plugin-inappbrowser" spec="^1.7.1" />
<plugin name="cordova-plugin-filepath" spec="^1.1.0" />
<plugin name="cordova-plugin-actionsheet" spec="^2.3.3" />
<plugin name="phonegap-plugin-push" spec="^2.0.0">
<variable name="SENDER_ID" value="MEUID" />
</plugin>
</widget>
The complete compilation data follows:
Mini-de-Andre:vovocooks-v10 andregnvlima$ ionic cordova build ios
The Ionic CLI has an update available (3.14.0 => 3.15.0)!
[WARN] No write permissions for global node_modules--automatic CLI updates are disabled.
To fix, see https://docs.npmjs.com/getting-started/fixing-npm-permissions
Or, install the CLI update manually:
npm i -g ionic@latest
[WARN] Not performing Ionic build for project type: ionic1.
> cordova build ios
Discovered plugin "Geolocation" in config.xml. Adding it to the project
Failed to restore plugin "Geolocation" from config.xml. You might need to try adding it again. Error: Error: Registry returned 404 for GET on https://registry.npmjs.org/Geolocation
1 error generated.
** BUILD FAILED **
The following build commands failed:
CompileC /Users/andregnvlima/Library/Developer/Xcode/DerivedData/VovóCooks-bzqaqcezjlluijhhnpogbliimghx/Build/Intermediates.noindex/VovóCooks.build/Debug-iphonesimulator/VovóCooks.build/Objects-normal/x86_64/AppDelegate.o VovóCooks/Classes/AppDelegate.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/andregnvlima/Library/Developer/Xcode/DerivedData/VovóCooks-bzqaqcezjlluijhhnpogbliimghx/Build/Intermediates.noindex/VovóCooks.build/Debug-iphonesimulator/VovóCooks.build/Objects-normal/x86_64/MainViewController.o VovóCooks/Classes/MainViewController.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/andregnvlima/app/vovocooks-v10/platforms/ios/cordova/build-debug.xcconfig,-workspace,VovóCooks.xcworkspace,-scheme,VovóCooks,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone X,build,CONFIGURATION_BUILD_DIR=/Users/andregnvlima/app/vovocooks-v10/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/andregnvlima/app/vovocooks-v10/platforms/ios/build/sharedpch
[ERROR] An error occurred while running cordova build ios (exit code 1).
When I install the Geolocation plugin it gives the message:
cordova plugin add cordova-plugin-geolocation
Installing "cordova-plugin-geolocation" for android
Plugin dependency "[email protected]" already fetched, using that version.
Dependent plugin "cordova-plugin-compat" already installed on android.
ANDROID_HOME=/Users/andregnvlima/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home
Failed to install 'cordova-plugin-geolocation': CordovaError: Requirements check failed for JDK 1.8 or greater
at /Users/andregnvlima/app/vovocooks-v10/platforms/android/cordova/lib/check_reqs.js:367:19
at _fulfilled (/Users/andregnvlima/app/vovocooks-v10/platforms/android/cordova/node_modules/q/q.js:854:54)
at self.promiseDispatch.done (/Users/andregnvlima/app/vovocooks-v10/platforms/android/cordova/node_modules/q/q.js:883:30)
at Promise.promise.promiseDispatch (/Users/andregnvlima/app/vovocooks-v10/platforms/android/cordova/node_modules/q/q.js:816:13)
at /Users/andregnvlima/app/vovocooks-v10/platforms/android/cordova/node_modules/q/q.js:624:44
at runSingle (/Users/andregnvlima/app/vovocooks-v10/platforms/android/cordova/node_modules/q/q.js:137:13)
at flush (/Users/andregnvlima/app/vovocooks-v10/platforms/android/cordova/node_modules/q/q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
Error: Requirements check failed for JDK 1.8 or greater