2017-10-11 15 views
1

私の設定ファイル(またはイオンコードの設定)に問題があります。それはプラットフォームを見つけることができませんが、私はイオスを既にインストールしていますが、PLUS ionicは存在するため追加して失敗します...下の例はエミュレートされたもので、同じエラーが$ionic cordova platform add iosによって生成されます。イオンがプラットフォームを見つけることができません

$ 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 

そして、これが私の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 

任意およびすべてのヒントやヒントが感謝!!

答えて

2

​​3210に<engine>タグがないため、Ionicはプラットフォームを見つけることができません。少しセットアップをクリーンアップしてみてください。

  • 実行cordova platform rm ios(あなたはプラットフォームが追加されていないというエラーが出る場合があります)
  • platformsフォルダを削除それはまだ
  • が存在する場合はたぶんもあればpluginsフォルダを削除あなたは彼らがnode_modulespackage-lock.json
  • を削除 package.json
  • でのiOSプラットフォームに関連するすべての参照を削除
  • を再インストールしたいです

そして、コルドバとイオンのCLIが最新であることを確認してください。そして、

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

ステップですべてのステップを復元:

個人的にI実行するようにcordovaコード番号CLIを介してコマンドを実行するだけです(ionic cordova ...を実行すると、イオンCLIはコードワのCLIにコードワード関連のコマンドを転送するだけで、エラーにつながる可能性があります)。アプリをビルドして実行するためには、より便利な組み合わせのコマンドを使用します。

最新のionic-angularバージョンの@ionic/app-scriptsの古いバージョンを使用していることに気付きました。これもアップグレードする必要があります。

+0

多くの感謝!このアプリケーションはXCode経由で実行されますが、Ionic CLIからは直接実行されません。 '> cordovaはios をエミュレートしますエラー:コマンドが失敗しました:xcrun simctl list --json dyld:ライブラリがロードされません:/Library/Developer/PrivateFrameworks/CoreSimulator.framework/バージョン/ A/CoreSimulator 参照先:/Applications/Xcode.app/Contents/Developer/usr/bin/simctl 理由:画像が見つかりません [エラー]コードバのエミュレートios(終了コード1)の実行中にエラーが発生しました。 ' – larslars

+0

XCodeおよび/またはXCodeコマンドラインツールを最新のバージョンに更新する必要があるかもしれません。また、しばらくの間あなたのMacを再起動することを確認してください、何もすべての更新でロックされます:) – David

+0

私はXCode 9.0(最新)を実行しています。ああ、イオンサーブも失敗する..再起動後に再試行します! :) – larslars

関連する問題