ビルド¶
iOS¶
-
メニュー File - Build Settingsを選択します。
-
Platformで iOS を選択し「Swith Platform」を実行します。
-
「Build」を実行します。
-
指定した出力先に生成されたXcodeプロジェクトファイルをXcodeで開きます。
-
Targetsで Unity-iPhone を選択し Signing & Capabilities タブを選択して適切なプロビジョニングプロファイルを選択します。
-
Targetsで NotificationService を選択し Signing & Capabilities タブを選択して適切なプロビジョニングプロファイルを選択します。
-
Targetsで NotificationContent を選択し Signing & Capabilities タブを選択して適切なプロビジョニングプロファイルを選択します。
-
Xcodeビルドを実行します。
プロビジョニングプロファイル
プロビジョニングプロファイルは事前準備で作成したプロビジョニングプロファイルを使用します。
作成したプロファイルがリストにない場合は、メニューの Import Profile または Download Profile から作成したプロファイルを適用してください。
Android¶
-
メニュー File - Build Settingsを選択します。
-
Platformで Android を選択し「Swith Platform」を実行します。
-
「Build」を実行します。
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-->