コンテンツにスキップ

ビルド

iOS

  1. メニュー File - Build Settingsを選択します。

    Unityメニュー

  2. Platformで iOS を選択し「Swith Platform」を実行します。

    UnitySwithiOS

  3. 「Build」を実行します。

    UnityBuildiOS

  4. 指定した出力先に生成されたXcodeプロジェクトファイルをXcodeで開きます。

  5. Targetsで Unity-iPhone を選択し Signing & Capabilities タブを選択して適切なプロビジョニングプロファイルを選択します。

    XcodeTargetApp

  6. Targetsで NotificationService を選択し Signing & Capabilities タブを選択して適切なプロビジョニングプロファイルを選択します。

    XcodeTargetNSE

  7. Targetsで NotificationContent を選択し Signing & Capabilities タブを選択して適切なプロビジョニングプロファイルを選択します。

    XcodeTargetNCE

  8. Xcodeビルドを実行します。

プロビジョニングプロファイル

プロビジョニングプロファイルは事前準備で作成したプロビジョニングプロファイルを使用します。
作成したプロファイルがリストにない場合は、メニューの Import Profile または Download Profile から作成したプロファイルを適用してください。

XcodeProfile


Android

  1. メニュー File - Build Settingsを選択します。

    Unityメニュー

  2. Platformで Android を選択し「Swith Platform」を実行します。

    UnitySwithAndroid

  3. 「Build」を実行します。

    UnityBuildAndroid

Build Settingsで Export Project を有効にしている場合は、エクスポートされたプロジェクトをAndroid Studioでビルドしてください。
Android Studio側で設定する項目はありません。


トラブルシューティング

エディタのバージョンを変更したり、FCM SDKを更新したりすると次のようなエラーが発生することがあります。

エラー1

Cannot parse project property android.enableR8='' of type 'class java.lang.String' as boolean. Expected 'true' or 'false'.

(解決方法)
Assets/Plugins/Android/gradleTemplate.propertiesのandroid.enableR8の値をtrueに変更


エラー2

Error:Element property at AndroidManifest.xml:31:5-87 annotated with 'tools:node="removeAll"' cannot have other attributes : xmlns:tools

(解決方法)
Assets/Plugins/Android/AndroidManifest.xmlの下記の箇所を書き換える。

変更前: <property tools:node="removeAll" />
変更後: <!--AnalyticsFixPropertyRemover-->