跳轉至

Unreal iOS

在使用 Hive SDK Unreal iOS 完成應用程式開發後,您需要在構建應用程式時配置以下項目。

  1. 在Unreal編輯器菜單中,點擊編輯 > 項目設置。項目設置窗口將顯示在屏幕上。
  2. 在項目設置窗口中,選擇左側面板中平台標題下的iOS菜單。iOS設置屏幕將顯示。根據每個組的指導設置項目。

按組設定

以下是逐組設置說明。

  • 套件資訊群組:在套件識別碼欄位中輸入您遊戲的 AppID。

  • 作業系統資訊組:從 Unreal Engine 4.25 開始,支援的作業系統版本已更改為 11.0 或更高。將最小作業系統版本欄位值設置為 11.0。

  • 建立群組:在附加非運輸鏈接器標誌欄位和附加運輸鏈接器標誌欄位中輸入 -ObjC。

額外的 Plist 數據組設置

根據以下列出的設置項目,在附加 PList 數據字段中輸入代碼行。所有代碼必須在一行中輸入。

訪問權限請求設定

要設置訪問權限請求,請將以下代碼添加到附加 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、微信、Line 設定

如果您使用 Facebook、QQ、VK、微信或 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 SignIn,请将以下代码添加到项目文件夹 > 配置 > DefaultEngine.ini 文件中。

bEnableSignInWithAppleSupport=True

多語言設置

要在多種語言中服務您的應用程式,您需要添加多語言設定檔。下載multilingual setting file,解壓縮,並將localize資料夾的內容複製到/Plugins/HIVESDK/Source/HIVESDK/ThirdParty/iOS/resource