Search Unity

How to remove some Default frameworks ?

Discussion in 'iOS and tvOS' started by aurelien-morel-ubiant, Apr 23, 2019.

  1. aurelien-morel-ubiant

    aurelien-morel-ubiant

    Joined:
    Sep 27, 2017
    Posts:
    275
    Hello,
    we have one "major" issue due to some native files in our project on iOS (.mm / .h) they all have 15 default frameworks enabled (and it's impossible to edit them).
    But due to some iOS limitations now it compulsory to add some message when the CoreLocation is embedded to warn the user that we gonna use its location informations.
    But our plugin doesn't use it and its enabled by default...

    upload_2019-4-23_10-9-17.png

    How can we remove this one cause we gonna need to warn the user for something that is not needed in our project ?!

    We try to switch to inspector in Debug but it's still greyed.
    Meta doesn't have those informations too.. :(

    Thanks in advance !
     
  2. Neonlyte

    Neonlyte

    Joined:
    Oct 17, 2013
    Posts:
    516
    1. Any system framework is not embedded but linked.
    2. If you are not comfortable with linking to these frameworks, you still have a chance to remove them in the exported Xcode project when you build the Unity project. But I suspect these are required by Unity's iOS playback engine, so expect linker errors.
    3. If no call is made to location service (including Unity API "Input.location"), you do not need to provide usage description in Info.plist even if you linked it. The description is only displayed when the app actually asks for location permission. iOS will crash your app and print warning message in the debug output if you do ask for permission but the description does not exist in Info.plist.
    4. There is a player setting in Unity that you could provide the description and Unity will add it into Info.plist for you. Personally I would write something like "We do not use location in this app. If you see this, something is wrong. "
     
  3. aurelien-morel-ubiant

    aurelien-morel-ubiant

    Joined:
    Sep 27, 2017
    Posts:
    275
    In our custom builder, we add this entry with a nice message (even if we don't use it). We beta test our app and the message never poped up so I don't what thing need it but....
    I though it was linked to the unity bug where they included CoreLocation without any reason but it must be fixed since 2018.3 and on some older version.

    Ok I figured out what library use it !
    And we don't use this part of our third party library (so the user will never see this message). I thought Unity strips it but I think some classes have some references on this code part..