tencent cloud

Feedback

Project Export

Last updated: 2022-06-08 14:34:00

    This document describes how to configure a Unity project export for the GME APIs for Unity.

    Project Export Configuration

    Project configuration is required before you can export executables from the Unity engine for different platforms:

    Note

    The GME SDK for Unity supports IL2CPP compilation.

    Export for iOS

    1. Determine the Xcode version

    Make sure that the Xcode version is 10.0 or later.

    2. Disable Bitcode

    If the following error occurs during the compilation, please disable Bitcode. Search for Bitcode under Targets > Build Settings and set the corresponding option to NO.

    3. Add access to iOS

    • Required background modes: allows running in the background (optional).
    • Microphone Usage Description: allows access to microphone.

    4. Add the library file

    If the following error occurs during compilation, please complete the library files.

    The list of library files is as follows:

    libc+.tbd
    CoreMedia.framework
    libresolv.tbd
    AVFoundation.framework
    Security.framework
    CoreAudio.framework
    AudioToolbox.framework
    libiconv.tbd
    libz.tbd
    SystemConfiguration.framework
    OpenAL.framework
    

    5. Add libresolv9.tbd

    If the following error occurs:

    Please add libresolv9.tbd to the UnityFramework.

    6. FAQs about exporting

    If you have any questions during exporting, please see Exporting for iOS.

    Export for Android

    1. Delete unnecessary lib files

    The GME SDK for Unity provides lib files for arm64-v8a, armeabi-v7a, and x86 by default. Please delete unnecessary files as needed.

    Architecture loss

    A crash will occur if the exported Android executable file lacks the specified architecture.

    After the executable `apk` file is exported, if a black screen or crash occurs when you open it, it is generally caused by the lack of corresponding architecture `lib` file. Please add or delete the corresponding architecture `lib` file according to the project.

    2. Configure permissions

    To export an Android executable, you need to configure relevant permissions in AndroidManifest.xml to avoid audio or permission errors.

     <uses-permission android:name="android.permission.RECORD_AUDIO" />
     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
     <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
     <uses-permission android:name="android.permission.INTERNET" />
     <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
     <uses-permission android:name="android.permission.BLUETOOTH"/>
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    

    In the above permissions, read and write permissions are not mandatory.

     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    
    • If you use the default log path (/SDCARD/Android/Data/files), it means that you do not call SetLogPath, and do not need Write_External_Storage permission.
    • If you call the setLogPath API to set the log path to an external storage device, and the storage path of the voice message recording is an external storage device, you need to apply for the Write_External_Storage permission to the user and get the user's approval.

    3. FAQs about exporting

    If you have any questions during exporting, please see Exporting for Android.

    Export for Windows

    If you have any questions during exporting, please see Exporting for Windows.

    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support