Search Unity

5.1.2 Forced to Disable Bitcode "iTunes optimization"

Discussion in 'iOS and tvOS' started by Sickwitit, Sep 30, 2015.

  1. Sickwitit

    Sickwitit

    Joined:
    Dec 22, 2014
    Posts:
    123
    I'm forced to change "Enable Bitcode" in xcode build settings to "NO", because of an error it is producing. "OneSignal.o does not contain bitcode, you must build it with bitcode enabled". "clang: error: linker command failed with exit code 1". Well, I have bitcode enabled! But it still throws the error until I turn off enable bitcode.

    Any ideas? I'm using iOS Native

    The problem is that iTunes optimizes based on this option, so it is unfortunate I have to turn it off.

    I found this:
    "Bitcode is an intermediate representation of a compiled program. Apps you upload to iTunes Connect that contain bitcode will be compiled and linked on the App Store. Including bitcode will allow Apple to re-optimize your app binary in the future without the need to submit a new version of your app to the store."
    http://stackoverflow.com/questions/30722606/what-does-enable-bitcode-do-in-xcode-7

    Is this a bug? Will this actually prevent apple from proceeding with optimization?
     
  2. JKasten

    JKasten

    Joined:
    Apr 11, 2013
    Posts:
    23
    Hello,

    We just release version 1.11.2 of our OneSignal Unity SDK with bitcode enabled on the library. You can get it here:
    https://github.com/one-signal/OneSignal-Unity-SDK/releases

    Correct you will need this new version of OneSignal for bitcode to be fully enabled for your app so Apple can optimize the size of your app per device. This is new feature Apple released and you must build your app with Xcode 7.0.1+ for everything to work.

    Thanks.
     
  3. Sickwitit

    Sickwitit

    Joined:
    Dec 22, 2014
    Posts:
    123
    @JKasten Thanks! But when I import the package, errors are thrown showing that I'm missing OneSignalPush.json
     
  4. JKasten

    JKasten

    Joined:
    Apr 11, 2013
    Posts:
    23
    @Sickwitit I am not able to reproduce a build error with Unity and OneSignal. Can you make sure you have the following file in your project:
    `Assets/Plugins/OneSignal/MiniJSON.cs`

    Could you also let us know what version of Unity your using and send us the full error message you're getting.

    Thanks.