Search Unity

2019.3 - validation on upload to store gives "UnityFramework.framework contains disallowed file"

Discussion in 'iOS and tvOS' started by Firewalker, Sep 26, 2019.

  1. swifter14

    swifter14

    Joined:
    Mar 2, 2017
    Posts:
    165
    So many different answers!! What's the correct answer? "Always Embed Swift Standard Libraries". Set No to all targets? (Unity-iphone,Unity iphone tests, unityFramework) Or YES to Unity-iphone and no to unityFramework. I'm afraid to disable something that I actually need.
     
  2. Dev_GTS

    Dev_GTS

    Joined:
    Mar 8, 2021
    Posts:
    5
    This worked for me.Thankyou
     
  3. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,454
    In our case, this exact issue was caused by a Google Plugin for Unity - Unity-Jar-Resolver (or alternatively confusingly named External Dependency Manager) in version 1.2.171. The more recent 1.2.172 fixed the plugin adding the Always Embed Swift Libraries entry to the Xcode project where it shouldn't be - Link

    Now that plugin just causes another irritating issue in Unity 2022+ versions where Unity constantly errors that Non-secure network connections are disabled in Player Settings (which is a good thing imo) but that is caused by the plugin having Analytics enabled.
     
    Starbox, ing_unity, Geoffl and 3 others like this.
  4. G-Locasso

    G-Locasso

    Joined:
    Aug 28, 2018
    Posts:
    5
    Hey, thank you so much for pointing out these situations, I was dealing with the deployment of a project that I didn't develop and I had no idea that it had this plugin (also thank you² for clarifying the name, I wouldn't be able to tell it was google jar resolver if it was not for it) on the project. After a lot of trial and error with others' contributions, this is what solved for me!
     
  5. Dev_GTS

    Dev_GTS

    Joined:
    Mar 8, 2021
    Posts:
    5
  6. abcjjy

    abcjjy

    Joined:
    Mar 6, 2015
    Posts:
    35
    It seems that this issue is related to Google's External Dependency Manager rather than Unity. EDM adds a dummy swift file and sets ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES to resolve swift lib loading problem on older systems.

    They have removed ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES settings in EDM post build script in the latest release v1.2.172.
     
  7. livingtarget

    livingtarget

    Joined:
    Apr 21, 2015
    Posts:
    83
    Just adding the fix that worked for me, assuming you already have a post process for iOS the following code should fix it. Maybe not in all cases, but it did for me in 2020. It's simply adapted from this thread.

    Code (CSharp):
    1. PBXProject pbxProject = new PBXProject();
    2. pbxProject.ReadFromFile (projectPath);
    3.  
    4. string frameworkGuid = pbxProject.GetUnityFrameworkTargetGuid();
    5. pbxProject.SetBuildProperty(frameworkGuid, "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES", "NO");
    This only disables it for the UnityFramework in the xcode project which I think is supposed to be the correct behaviour.
     
  8. el_Guero

    el_Guero

    Joined:
    Sep 15, 2017
    Posts:
    185
    Worked for me too. Nothing else needed. Just set the first to yes, the second to no.
    Thanks a lot!
     
  9. omermesebuken

    omermesebuken

    Joined:
    Jan 10, 2022
    Posts:
    1
    Bro thats actually works haha. Thanks a lot.
     
  10. microperts

    microperts

    Joined:
    Jan 25, 2016
    Posts:
    11
    This worked for me. Thank you sir
     
    sfilo likes this.
  11. fizzyfrosty

    fizzyfrosty

    Joined:
    Mar 3, 2016
    Posts:
    18
    You are a LIFE SAVER!! This had never happened to me, but for some reason I got this error right away after I switched to an Android build for the first time (after like 80% into the project). Then when I switched back to iOS, I got that error out of the blue. Timing was too coincidental if you ask me. But yeah, this fix in Xcode before archiving worked! Thank you!!
     
    sfilo likes this.
  12. yuliyF

    yuliyF

    Joined:
    Nov 15, 2012
    Posts:
    197
    SplenShepard likes this.
  13. enhawk

    enhawk

    Joined:
    Aug 22, 2013
    Posts:
    833
    worked for me!
    Unity 2021.3.16 LTS (iOS)
    Xcode 13.4.1
    Cocoapods 1.11.3
    MacOS 12.6
    FB SDK 14.1
     
  14. Apollych

    Apollych

    Joined:
    Oct 7, 2019
    Posts:
    8
    Didn't work for me. I can upload the build after this but it crashes some seconds after start on the device
     
  15. Edan-Smith

    Edan-Smith

    Joined:
    Jan 21, 2015
    Posts:
    27
    The exact same behavior is happening to me, did you find a solution?
     
  16. Calvin2274

    Calvin2274

    Joined:
    Sep 11, 2014
    Posts:
    17
  17. ing_unity

    ing_unity

    Joined:
    Nov 30, 2020
    Posts:
    12
    Thanks a lot, i have settting ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES correct in code, But from a certain time it doesn't working
     
    ROBYER1 likes this.
  18. Maverickyy

    Maverickyy

    Joined:
    Jun 14, 2023
    Posts:
    3
    Thank you, it worked for me
    unity 2022.3.5f1
    xcode 14.3.1
     
  19. triple_why

    triple_why

    Joined:
    Jun 9, 2018
    Posts:
    47
    Same at Unity 2022.3.13 and Xcode Version 15.0.1.

    At Xcode; project navigator > select project > select UnityFramework target > build settings > build options > set "Always Embed Swift Standard Libraries" to "No".
     
  20. Starbox

    Starbox

    Joined:
    Sep 17, 2014
    Posts:
    470
    I have this error with the app that goes to the background.
    I'm on the latest Unity 2022 LTS and Xcode 15.3.

    People say it's crashing but I don't think it does. You can find your app moving to the background almost immediately on launch, about one second of wait time or slightly more at worse. Then if you go fetch that app from the cards menu and try to bring it back to the foreground, it instantly goes back into the background. It's like the app is... super shy.
    The app doesn't crash, it's still "running"... more like hanging.
    Your iPhone saves logs of crashing events:

    The list might be long but if your app crashed the file's name would have it at the beginning of its string. I will bet that you won't find such a log file in this specific case.

    Incidentally you can look into Xcode's Instruments (Xcode > Open Developer Tools > Instruments) and let it launch the app when your device it plugged into your computer, and you shall find that a thread is blocked.
    Developpers can also start a recording in Settings > Developper > Logging, FWIW.

    I haven't added this script yet BUT I already use the Xcode Workspace option for the Cocoapods integration so I doubt that option is what solves the issue.

    The real question is why can't this be set from within Unity without using any third party's script? It should be very easy to carry on the "no" value along the Unity.framework during the creation of the Xcode project by Unity.
     
  21. Starbox

    Starbox

    Joined:
    Sep 17, 2014
    Posts:
    470
    One can also check directly into the Xcode project folder (terminal, cd "path") and type
    You will see several FB related elements and their versions, including FBAEMKit (which I'm sure relates to the Aggregated Event Measurement functions), and maybe some of them in need of an update.