Skip to content

Unreal iOS

After completing game app development with Hive SDK Unreal Engine 4 iOS or Hive SDK Unreal Engine 5 iOS, you need to configure the following items when building the game app.

  1. In the Unreal Editor menu, clickEdit > Project Settings. The project settings window will appear on the screen.
  2. In the project settings window, select the iOS menu under the Platform title in the left panel. The iOS settings screen will appear. Set the items guided by each group.

Settings by group

Here are the group-by-group setting instructions.

  • Bundle Information group: Enter your game's AppID in the Bundle Identifier field.

  • OS Info group: Starting with Unreal Engine 4.25, the supported OS version has been changed to 11.0 or higher. Set the Minimum OSVersion field value to 11.0.

  • Build group: Enter -ObjC in the Additional Non-Shipping Linker Flags field and the Additional Shipping Linker Flags field.

Extra Plist Data group settings

Enter the code lines according to the setting items listed below in the Additional PList Data field. All the code below must be entered in one line.

Access permission request settings

To set access permission requests, add the following code to the Additional PList Data field.

<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>

Authentication: Facebook, QQ, VK, WeChat, LINE settings

If you are using Facebook, QQ, VK, WeChat, or LINE authentication, add the following code to the Additional PList Data field to set the server whitelist.

<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>

When using Facebook, add the Facebook AppID and ClientToken using the following code. Be sure to enter the Facebook AppID and ClientToken values for your game.

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

Set the URL Scheme for each IdP.

<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>

The following is an example of the values above inserted into the Additional PList Data field.

<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>

Sign in with Apple settings

To support Sign in with Apple, add the following code to theProject Folder > Config > DefaultEngine.ini file.

bEnableSignInWithAppleSupport=True

Multilingual settings

To provide your app in multiple languages, add multilingual setting files. Download the multilingual setting file and extract it. The localize folder contains a separate .lproj folder for each language.

Note

The languages supported by the app displayed on the App Store are determined based on the .lproj folders included in the app. Add only the .lproj folders for the languages your app actually supports. You must include Base.lproj, which contains the default text displayed on devices set to an unsupported language. The list of languages supported by the app displayed on the App Store is determined based on the .lproj folders included in the app bundle. Therefore, add only the .lproj folders for the languages your app actually supports.

However, you must include Base.lproj, which contains the default text displayed on devices set to an unsupported language.

Unreal Engine creates a new Xcode project each time you build, so multilingual files added directly in Xcode are lost in the next build. Configure the app module's Build.cs file to register the multilingual folder as app bundle resources.

  1. Copy the .lproj folders you want to use to the localize folder under the app module folder. (For example: Source/MyGame/localize/Base.lproj and Source/MyGame/localize/ko.lproj)
  2. Add the following code to the constructor of the app module's Build.cs file (for example, Source/MyGame/MyGame.Build.cs).

    if (Target.Platform == UnrealTargetPlatform.IOS)
    {
        string localizeDir = System.IO.Path.Combine(ModuleDirectory, "localize");
        if (System.IO.Directory.Exists(localizeDir))
        {
            foreach (string lprojDir in System.IO.Directory.GetDirectories(localizeDir, "*.lproj"))
            {
                AdditionalBundleResources.Add(new BundleResource(lprojDir));
            }
        }
    }
    
  3. After building for iOS, verify that the .lproj folders are included at the top level of the generated app bundle (.app).

Note

After applying the multilingual files, the permission request popup displays the text from InfoPlist.strings that matches the device language.

Text entered directly in Additional PList Data in the Unreal Engine project settings serves as the default value when the .lproj folder has not been added or the corresponding language set is unavailable.