メインコンテンツにスキップ
バージョン: v8

ネイティブエラー

コード署名エラー

Code Signing Error: Failed to create provisioning profile. The app ID "com.csform.ionic.yellow" cannot be registered to your development team. Change your bundle identifier to a unique string to try again. Code Signing Error: No profiles for 'com.csform.ionic.yellow' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.csform.ionic.yellow'. Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.1'

iOSデバイスでアプリを実行するには、プロビジョニングプロファイルが必要です。プロビジョニングプロファイルがまだ作成されていない場合は、次の手順に従ってください。

  1. パッケージIDを設定します。

    Capacitorの場合は、`capacitor.config.json`ファイルを開き、`appId`プロパティを変更します。

    Cordovaの場合は、`config.xml`ファイルを開き、ルート要素`<widget>`の`id`属性を変更します。詳細はCordovaのドキュメントを参照してください。

  1. Xcodeでプロジェクトを開きます。

    Capacitorの場合は、次のコマンドを実行してXcodeでアプリを開きます

    $ ionic capacitor open ios

    Cordovaの場合は、Xcodeを開きます。**ファイル** » **開く** を使用してアプリを見つけます。アプリの`platforms/ios`ディレクトリを開きます。

  1. **プロジェクトナビゲーター**で、プロジェクトルートを選択してプロジェクトエディターを開きます。 **ID**セクションで、設定したパッケージIDがバンドル識別子と一致することを確認します。

    Xcode showing the Identity section for an iOS app with fields for Display Name, Bundle Identifier, Version, and Build.

  1. **同じプロジェクトエディターの**署名**セクションで、**署名を自動的に管理**が有効になっていることを確認します。**次に、開発チームを選択します。開発チームを指定すると、Xcodeはプロビジョニングと署名の準備を自動的に試みます。

    Xcode showing the Signing section with &#39;Automatically manage signing&#39; enabled and a Development Team selected.

Xcodeビルドエラー65

Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/ionitron/projects/my-project/platforms/ios/cordova/build-debug.xcconfig,-workspace,SC project.xcworkspace,-scheme,SC project,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone X,build,CONFIGURATION_BUILD_DIR=/Users/ionitron/projects/my-project/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/ionitron/projects/my-project/platforms/ios/build/sharedpch

このエラーは、プロビジョニングの問題または古いcordovaの依存関係によって発生する可能性のあるXcodeのエラーコードです。このエラーを修正するには、まず上記の手順を使用してプロビジョニングプロファイルが生成されていることを確認し、次にXcodeからアプリを実行してみてください。

これでエラーが修正されない場合は、次のコマンドを実行してください

rm -rf node_modules
rm -rf platform
npm i
ionic cordova platform add ios
ionic cordova prepare ios
ionic cordova build ios --prod

これらのコマンドを実行したら、新たにビルドできます。

競合するGoogle Playサービスのバージョン

Error: more than one library with package name com.google.android.gms

このエラーは、2つの別々のプラグインが異なるバージョンの`Google Playサービス`を使用しようとしたときに発生します。この問題を修正するには、`cordova`バージョン`7.1.0`以降と`cordova-android` `6.3.0`以降を実行していることを確認してください。最新の`cordova`をインストールするには、次を実行します

npm install cordova@latest

また、`cordova-android`を更新するには、次を実行します

cordova platform update android

`Google Play開発サービス`に依存するプラグインは、同じバージョンを使用するように更新できるようになりました。たとえば、`pluginA`がバージョン11.0を使用し、`pluginB`がバージョン15.0を使用する場合、`config.xml`ファイルの次のスニペットを使用して同じバージョンを使用するように更新できます。

<plugin name="pluginA" spec="npm">
<variable name="PLAY_SERVICES_VERSION" value="15.0.0"/>
</plugin>
<plugin name="pluginB" spec="npm">
<variable name="PLAY_SERVICES_VERSION" value="15.0.0" />
</plugin>