2017-10-11 2 views
1

Was ist los mit meinen Konfigurationsdateien (OR Ionic Cordova Setup); es kann keine Plattformen finden, aber ich habe bereits ios installiert, PLUS ionic versucht hinzuzufügen und schlägt fehl, weil es existiert ... Das folgende Beispiel stammt von emulate, die gleichen Fehler werden auch von $ionic cordova platform add ios generiert.Ionic kann die Plattform nicht finden

$ ionic cordova emulate ios 
> cordova platform add ios --save 
✖ Running command - failed! 
[WARN] Platform already added. Saving platforms to config.xml. 
> cordova platform save 
✔ Running command - done! 
[INFO] Running app-scripts build: --platform ios --target cordova 

[22:44:34] build dev started ... 
[22:44:34] clean started ... 
[22:44:34] clean finished in 11 ms 
[22:44:34] copy started ... 
[22:44:34] transpile started ... 
[22:44:38] transpile finished in 4.45 s 
[22:44:38] preprocess started ... 
[22:44:38] deeplinks started ... 
[22:44:39] deeplinks finished in 264 ms 
[22:44:39] preprocess finished in 265 ms 
[22:44:39] webpack started ... 
[22:44:39] copy finished in 4.89 s 
[22:44:50] webpack finished in 11.63 s 
[22:44:50] sass started ... 
[22:44:51] sass finished in 1.04 s 
[22:44:51] postprocess started ... 
[22:44:51] removed unused font files 
[22:44:51] postprocess finished in 10 ms 
[22:44:51] lint started ... 
[22:44:51] build dev finished in 17.47 s 
> ionic cordova prepare 
[WARN] No Cordova platforms listed in config.xml. Nothing to prepare. 

    You can save your installed platforms to config.xml with the ionic cordova platform save command. 
[22:44:53] lint finished in 2.11 s 

Und das ist meine Datei config.xml:

<?xml version='1.0' encoding='utf-8'?> 
<widget id="com.nkt.pms" version="2.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> 
    <name>Sys</name> 
<description>System</description> 
<author email="[email protected]" href="http://XXXX">The XXXX Team</author> 
<content src="index.html" /> 
<access origin="*" /> 
<allow-navigation href="http://ionic.local/*" /> 
<allow-navigation href="http://XXXX:8100" /> 
<allow-intent href="http://*/*" /> 
<allow-intent href="https://*/*" /> 
<allow-intent href="tel:*" /> 
<allow-intent href="sms:*" /> 
<allow-intent href="mailto:*" /> 
<allow-intent href="geo:*" /> 
<preference name="AndroidLaunchMode" value="singleTask" /> 
<preference name="webviewbounce" value="false" /> 
<preference name="UIWebViewBounce" value="false" /> 
<preference name="DisallowOverscroll" value="true" /> 
<preference name="android-minSdkVersion" value="16" /> 
<preference name="BackupWebStorage" value="none" /> 
<preference name="SplashMaintainAspectRatio" value="true" /> 
<preference name="FadeSplashScreenDuration" value="300" /> 
<preference name="SplashShowOnlyFirstTime" value="false" /> 
<preference name="SplashScreen" value="screen" /> 
<preference name="SplashScreenDelay" value="3000" /> 
<preference name="orientation" value="portrait" /> 
<platform name="ios"> 
    <allow-intent href="itms:*" /> 
    <allow-intent href="itms-apps:*" /> 
    <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" /> 
    <splash height="1136" src="resources/ios/splash/[email protected]~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/[email protected]~ipad.png" width="2048" /> 
    <splash height="2048" src="resources/ios/splash/[email protected]~ipadpro.png" width="2732" /> 
    <splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" /> 
    <splash height="2048" src="resources/ios/splash/[email protected]~ipad.png" width="1536" /> 
    <splash height="2732" src="resources/ios/splash/[email protected]~ipadpro.png" width="2048" /> 
    <splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" /> 
    <splash height="960" src="resources/ios/splash/[email protected]~iphone.png" width="640" /> 
    <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" /> 
</platform> 
<feature name="StatusBar"> 
    <param name="ios-package" onload="true" value="CDVStatusBar" /> 
</feature> 
<icon src="resources/newicon.png" /> 
<icon src="resources/android/icon/drawable-xhdpi-icon.png" /> 
<plugin name="cordova-plugin-camera" spec="~2.4.1"> 
    <variable name="CAMERA_USAGE_DESCRIPTION" value=" " /> 
    <variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value=" " /> 
</plugin> 
<plugin name="cordova-plugin-console" spec="^1.1.0" /> 
<plugin name="cordova-plugin-customurlscheme" spec="^4.3.0"> 
    <variable name="URL_SCHEME" value="com.nkt.pms" /> 
    <variable name="ANDROID_SCHEME" value="com.nkt.pms" /> 
    <variable name="ANDROID_HOST" value="pmsys.eu.auth0.com" /> 
    <variable name="ANDROID_PATHPREFIX" value="/cordova/com.nkt.pms/callback" /> 
</plugin> 
<plugin name="cordova-plugin-device" spec="^1.1.6" /> 
<plugin name="cordova-plugin-file" spec="~4.3.3" /> 
<plugin name="cordova-plugin-file-transfer" spec="~1.6.3" /> 
<plugin name="cordova-plugin-filepath" spec="~1.0.2" /> 
<plugin name="cordova-plugin-safariviewcontroller" spec="^1.4.7" /> 
<plugin name="cordova-plugin-splashscreen" spec="^4.0.3" /> 
<plugin name="cordova-plugin-statusbar" spec="^2.2.3" /> 
<plugin name="cordova-plugin-whitelist" spec="^1.3.2" /> 
<plugin name="cordova-sqlite-storage" spec="^2.0.4" /> 
<plugin name="ionic-plugin-keyboard" spec="^2.2.1" /> 

$ ionic info 

cli packages: (/Users/larsbrenna/Desktop/dev/app/node_modules) 

@ionic/cli-utils : 1.9.2 
ionic (Ionic CLI) : 3.9.2 

global packages: 

Cordova CLI : 7.0.1 

local packages: 

@ionic/app-scripts : 2.1.4 
Cordova Platforms : ios 
Ionic Framework : ionic-angular 3.7.1 

System: 

Node : v6.9.1 
npm : 5.4.2 
OS : macOS Sierra 
Xcode : Xcode 9.0 Build version 9A235 

Jede und alle Tipps und Hinweise geschätzt !!

Antwort

2

Ionic kann die Plattform nicht finden, da das <engine>-Tag in config.xml fehlt. Versuchen Sie Reinigung Ihrer Einrichtung ein bisschen:

  • Run cordova platform rm ios (möglicherweise eine Fehlermeldung erhalten, dass die Plattform nicht hinzugefügt wird)
  • Entfernen Sie den platforms Ordner, wenn es noch Vielleicht
  • besteht auch die plugins Ordner entfernen, wenn Sie wollen, dass sie
  • entfernen Sie alle Verweise im Zusammenhang mit der iOS-Plattform neu installiert in package.json
  • löschen node_modules und package-lock.json

Dann stellen Sie sicher, cordova und ionische CLIs auf dem neuesten Stand sind:

(sudo) npm install -g [email protected] [email protected] 

Dann wird alles Schritt für Schritt wieder her:

ich persönlich gerne die cordova laufen Befehle nur über die cordova CLI nicht über die ionische CLI (beim Ausführen von ionic cordova ... leitet die ionische CLI nur cordova-bezogene Befehle an die cordova CLI weiter, was zu Fehlern führen kann). Nur zum Erstellen und Ausführen der App verwende ich die kombinierten Befehle, weil es bequemer ist.

Ich bemerkte auch, dass Sie eine alte Version von @ionic/app-scripts mit der neuesten ionic-angular Version verwenden. Sie sollten dies auch aktualisieren.

+0

Vielen Dank! Die App läuft jetzt über XCode, aber nicht direkt von Ionic CLI: '> cordova emulieren ios Fehler: Befehl fehlgeschlagen: xcrun simctl list --json dyld: Bibliothek nicht geladen: /Library/Developer/PrivateFrameworks/CoreSimulator.framework/ Versionen/A/CoreSimulator Referenziert von: /Applications/Xcode.app/Contents/Developer/usr/bin/simctl Grund: Bild nicht gefunden [ERROR] Beim Ausführen von cordova emulate ios (Exit Code 1) ist ein Fehler aufgetreten. ' – larslars

+0

Sie müssen wahrscheinlich XCode und/oder XCode Kommandozeilen-Tools auf die neueste Version aktualisieren. Stellen Sie außerdem sicher, dass Sie Ihren Mac von Zeit zu Zeit neu starten, damit nichts mit der ganzen Aktualisierung blockiert wird :) – David

+0

Ich verwende XCode 9.0 (neuste Version). Oh, und ionischer Aufschlag versagt auch ..Wird nach einem Neustart erneut versuchen! :) – larslars

Verwandte Themen