Skip to content

Configure Info

Before you begin

  • You must Install Soha SDK.
  • You have downloaded and installed the .p12 and .mobileprovision files provided by SohaGame.

Configure Info.plist file

Configure the Info.plist file with an XML snippet that contains data about your app.

Right-click Info.plist, and choose Open As ▸ Source Code.

SDK and Service Configuration

Add the following keys to configure the SohaGame SDK and its integrated services.

  1. Add SohaGameAppID, GameID.

    <key>SohaGameAppID</key>
    <string>SOHA-APP-ID</string>
    <key>GameID</key>
    <string>GAME-ID</string>
    
    Replace SOHA-APP-ID with App ID provided by SohaGame.
    Replace GAME-ID with GameID provided by SohaGame (like: SG388).

  2. Add the Facebook app configuration.

    <key>FacebookAppID</key>
    <string>FACEBOOK-APP-ID</string>
    <key>FacebookClientToken</key>
    <string>FACEBOOK-TOKEN</string>
    
    Replace FACEBOOK-APP-ID with Facebook App ID provided by SohaGame.
    Replace FACEBOOK-TOKEN with Facebook Client Token provided by SohaGame.

  3. Add LSApplicationQueriesSchemes.

    <key>LSApplicationQueriesSchemes</key>
    <array>
        <string>fbauth2</string>
        <string>fbapi</string>
        <string>fb-messenger-share-api</string>
    </array>
    

  4. Add CFBundleURLTypes.

    <key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>GOOGLE-REVERSED-CLIENT-ID</string>
                <string>fb{FACEBOOK_APP_ID}</string>
                <string>sh{SOHA_APP_ID}</string>
            </array>
        </dict>
    </array>
    
    In the value GOOGLE-REVERSED-CLIENT-ID, replace GOOGLE-REVERSED-CLIENT-ID with Google Reversed Client ID provided by SohaGame.
    In the value fb{FACEBOOK_APP_ID}, replace {FACEBOOK_APP_ID} with the Facebook App ID provided by SohaGame. Keep the fb prefix and remove the braces. For example, if the App ID is 123456789, use fb123456789.
    In the value sh{SOHA_APP_ID}, replace {SOHA_APP_ID} with the Soha App ID provided by SohaGame. Keep the sh prefix and remove the braces. For example, if the App ID is 123456789, use sh123456789.

  5. Add NSAdvertisingAttributionReportEndpoint.

    <key>NSAdvertisingAttributionReportEndpoint</key>
    <string>https://adjust-skadnetwork.com/</string>
    

Permission Usage Descriptions

Add the following usage descriptions to explain why the app requests each permission. Tracking is used for personalized advertising. Photo library, microphone, and camera access support the issue reporting feature.

  1. Add NSUserTrackingUsageDescription.

    <key>NSUserTrackingUsageDescription</key>
    <string>Mã nhận dạng này sẽ được sử dụng để phân phối quảng cáo được cá nhân hóa cho bạn.</string>
    

  2. Add NSPhotoLibraryUsageDescription.

    <key>NSPhotoLibraryUsageDescription</key>
    <string>Ứng dụng cần truy cập thư viện ảnh để bạn chọn ảnh minh họa lỗi, giúp bộ phận hỗ trợ hiểu rõ vấn đề bạn đang gặp.</string>
    

  3. Add NSMicrophoneUsageDescription.

    <key>NSMicrophoneUsageDescription</key>
    <string>Ứng dụng cần sử dụng micro để thu âm khi bạn quay video minh họa lỗi, giúp bộ phận hỗ trợ hiểu rõ vấn đề bạn đang gặp.</string>
    

  4. Add NSCameraUsageDescription.

    <key>NSCameraUsageDescription</key>
    <string>Ứng dụng cần sử dụng camera để bạn chụp ảnh hoặc quay video minh họa lỗi, giúp bộ phận hỗ trợ hiểu rõ vấn đề bạn đang gặp.</string>
    

Adding AdServices.framework

  1. Navigate to the Build Phases tab.
  2. Expand the Link Binary With Libraries section.
  3. Click the "+" button at the bottom left of the section.
  4. In the search bar, type AdServices and select AdServices.framework from the list.
  5. Click Add.
  6. Once added, locate AdServices.framework in the list and click on the Status column next to it, change it from Required to Optional.

Adding AdServices.framework

Add a GoogleService-Info.plist file

  1. Download GoogleService-Info.plist file. The download link for the GoogleService-Info.plist file is available in the .xlsx file.

  2. Move your config file into the root of your Xcode project. If prompted, select to add the config file to all targets. Make sure the config file name is not appended with additional characters.

GoogleService-Info.plist file

Configure Signing

Bunlde ID & Provisoning Profile

Bundle ID will be provided by SohaGame, you need to configure the correct Bundle ID along with Provisioning Profile

Screenshot

  1. Select game target.
  2. Select Signing & Capabilities tab.
  3. Fill in the correct bundle id.
  4. Select the .mobileprovision file corresponding to the bundle id

Code Signin

  1. In the game target select Build Settings tab.
  2. Chose Signing ▸ Code Signing.
  3. Select the certificate file (.p12 file) that SohaGame has provided for you.

Screenshot

Configure Capabilities

Select Signing & Capabilities tab. Click + Capability button, find and add the following Capabilities:

  • In-App Purchase
  • Push Notifications
  • Sign in with Apple

Configure SceneDelegate

Follow SceneDelegate to set up the scene lifecycle and forward login URL callbacks to SohaSDK.