Search code examples
iosxcodeunity-game-engineamplitude

Amplitude Unity iOS 'Amplitude\Amplitude.h' file not found


I added the Amplitude SDK to an existing Unity project, on Android it was fine, but for iOS when I try to build I get this error in xcode ... "'Amplitude\Amplitude.h' file not found"

Project uses Unity 2021.3.9f1 and Ar foundation

I get the same issue with a brand new Unity 2021.3.9f1 project, with nothing in it but the Amplitude SDK. I used the 2.6.0 amplitude-unity.unitypackage file from here https://github.com/amplitude/unity-plugin/releases

Has anyone else encountered this issue and is there a fix or workaround?

enter image description here


Solution

  • So they had two unitypackages available to download on their github site. On Amplitudes website they say "Download the latest amplitude-unity.unitypackage" This is the smaller file, the one I used.

    But it seems for ios you must.

    1. Download the bigger file called "amplitude-unity-all.unitypackage"
    2. In unity goto Assets\External Dependency manager\iOS resolver\Install cocoapods
    3. build xcode project
    4. In xcode click on unity framework target, then Build Settings\Build Options and set enable bitcode to No

    After taking these steps I was able to build and Amplitude worked on iOS