コンテンツにスキップ

Unreal iOS

Unreal iOSのHive SDKを使用してアプリ開発を完了した後、アプリをビルドする際に以下の項目を設定する必要があります。

  1. Unreal Editor メニューで、Edit > Project Settingsをクリックします。プロジェクト設定ウィンドウが画面に表示されます。
  2. プロジェクト設定ウィンドウで、左パネルの Platform タイトルの下にあるiOSメニューを選択します。iOS 設定画面が表示されます。各グループによって案内された項目を設定します。

グループによる設定

グループごとの設定手順はこちらです。

  • バンドル情報グループ: ゲームのAppIDをバンドル識別子フィールドに入力してください。

  • OS情報グループ: Unreal Engine 4.25以降、サポートされるOSバージョンは11.0以上に変更されました。Minimum OSVersionフィールドの値を11.0に設定してください。

  • ビルドグループ: 追加の非配送リンカフラグフィールドと追加の配送リンカフラグフィールドに -ObjC を入力します。

追加のPlistデータグループ設定

以下に示す設定項目に従って、追加のPListデータフィールドにコード行を入力してください。以下のコードはすべて1行で入力する必要があります。

アクセス権限リクエスト設定

アクセス許可リクエストを設定するには、次のコードを追加のPListデータフィールドに追加してください。

<key>NSCameraUsageDescription</key>
<string>Approval required to take pictures.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Approval required to upload image files.</string>
<key>NSUserTrackingUsageDescription</key>
<string>We need your permission to use the Advertising Identifiers (IDFA) for promotion targeting and tracking analysis.</string>

認証: Facebook, QQ VK, WeChat, Line 設定

Facebook、QQ、VK、WeChat、またはLine認証を使用している場合は、サーバーのホワイトリストを設定するために、追加のPListデータフィールドに次のコードを追加してください。

<key>LSApplicationQueriesSchemes</key>
<array>
    <string>weixin</string>
    <string>vk-share</string>
    <string>vkauthorize</string>
    <string>vk</string>
    <string>weixinULAPI</string>
    <string>fbapi</string>
    <string>fb-messenger-api</string>
    <string>fbauth2</string>
    <string>fbshareextension</string>
    <string>mqqOpensdkSSoLogin</string>
    <string>mqqopensdkapiV2</string>
    <string>lineauth2</string>
    <string>mqqopensdkapiV3</string>
    <string>wtloginmqq2</string>
    <string>mqq</string>
    <string>mqqapi</string>
</array>

Facebookを使用する際は、以下のコードを使用してFacebook AppIDとClientTokenを追加してください。ゲームのためにFacebook AppIDとClientTokenの値を必ず入力してください。

<key>FacebookAppID</key><string>926000000000000</string>
<key>FacebookClientToken</key><string>d123783h7sdfyh8031h23unf81h3</string>

各IdPのURLスキームを設定します。

<key>CFBundleURLTypes</key>
<array>

<!--For Facebook usage. Please insert your app's Facebook App ID value-->
<dict><key>CFBundleTypeRole</key><string>Editor</string><key>CFBundleURLSchemes</key><array><string>fb926000000000000</string></array></dict>

<!--For using deep links on the Hive platform. Please insert your AppID value-->
<dict><key>CFBundleTypeRole</key><string>Editor</string><key>CFBundleURLSchemes</key><array><string>com.com2us.misample.normal.freefull.apple.global.ios.universal</string></array></dict>

<!--For Google Sign-in. Please insert the Google Sign-in key value of your app-->
<dict><key>CFBundleTypeRole</key><string>Editor</string><key>CFBundleURLSchemes</key><array><string>com.googleusercontent.apps.270000000000-0m7r8tb2co1q00000000000000000000</string></array></dict>

<!--For QQ Sign-in. Please insert the QQ key value of your app-->
<dict><key>CFBundleTypeRole</key><string>Editor</string><key>CFBundleURLName</key><string>tencent</string>
<key>CFBundleURLSchemes</key><array><string>tencent1106227203</string></array></dict>

<!--For Wechat Sign-in. Please insert the Wechat key value of your app-->
<dict><key>CFBundleTypeRole</key><string>Editor</string><key>CFBundleURLName</key><string>weixin</string><key>CFBundleURLSchemes</key><array><string>wx78176cf0c698c0f9</string></array></dict>

<!--For VK Sign-in. Please insert the VK key value of your app-->
<dict><key>CFBundleTypeRole</key><string>Editor</string><key>CFBundleURLName</key><string>vk6270065</string><key>CFBundleURLSchemes</key><array><string>vk6270065</string></array></dict>

<!--For Line Sign-in-->
<dict><key>CFBundleTypeRole</key><string>Editor</string>
<key>CFBundleURLSchemes</key><array><string>line3rdp.$(PRODUCT_BUNDLE_IDENTIFIER)</string></array></dict>

</array>

以下は、上記の値を追加のPListデータフィールドに挿入した例です。

<key>NSCameraUsageDescription</key>
<string>Approval required to take pictures.</string>
<key>NSContactsUsageDescription</key>
<string>You must agree to add friends from your Contacts.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Approval required to upload image files.</string>
<key>NSUserTrackingUsageDescription</key>
<string>We need your permission to use the Advertising Identifiers (IDFA) for promotion targeting and tracking analysis.</string>
<key>FacebookAppID</key>
<string>1809615065921877</string>
<key>FacebookClientToken</key>
<string>c41e47ba5512ea3fb5bfb29d5cfeb244</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>line3rdp.$(PRODUCT_BUNDLE_IDENTIFIER)</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>fb926000000000000</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>com.com2us.hivesdk.normal.freefull.apple.global.ios.universal</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>com.googleusercontent.apps.331526026701-s41n272jsv6c0f72kt5o7of0jns350gl</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>tencent</string>
<key>CFBundleURLSchemes</key>
<array>
<string>tencent1106227203</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>weixin</string>
<key>CFBundleURLSchemes</key>
<array>
<string>wx78176cf0c698c0f9</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>vk6270065</string>
<key>CFBundleURLSchemes</key>
<array>
<string>vk6270065</string>
</array>
</dict>
</array>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>weixin</string>
<string>vk-share</string>
<string>vkauthorize</string>
<string>vk</string>
<string>weixinULAPI</string>
<string>fbapi</string>
<string>fb-messenger-api</string>
<string>fbauth2</string>
<string>fbshareextension</string>
<string>mqqOpensdkSSoLogin</string>
<string>mqqopensdkapiV2</string>
<string>lineauth2</string>
<string>mqqopensdkapiV3</string>
<string>wtloginmqq2</string>
<string>mqq</string>
<string>mqqapi</string>
</array>

Appleサインイン設定

Apple SignInをサポートするには、Project Folder > Config > DefaultEngine.iniファイルに以下のコードを追加してください。

bEnableSignInWithAppleSupport=True

多言語設定

アプリを複数の言語でサービスするには、多言語設定ファイルを追加する必要があります。多言語設定ファイルをダウンロードし、解凍して、localizeフォルダーの内容を/Plugins/HIVESDK/Source/HIVESDK/ThirdParty/iOS/resourceにコピーしてください。