Search Unity

Bug Unity ads 4.4.1 has xcode error "contains disallowed file 'Frameworks'"

Discussion in 'Unity Ads & User Acquisition' started by enhawk, Feb 21, 2023.

  1. enhawk

    enhawk

    Joined:
    Aug 22, 2013
    Posts:
    833
    When I try to build with the 4.4.1 Advertisement package (from Unity Editor), I get this error when submitting an archive to Apple:

    contains disallowed file 'Frameworks'

    If I recompile my project with ads 4.3.0, I can submit to Apple without error.
     
    Last edited: Mar 3, 2023
  2. aylin_unity3d

    aylin_unity3d

    Unity Technologies

    Joined:
    Apr 6, 2015
    Posts:
    48
    Hi
    I think the problem is with Always Embed Swift Standard Libraries setting for the xcode project. It should be No for UnityFramework and Yes for Unity-iPhone. Could you add a postbuild script to change it and test?
     
  3. Sidereus

    Sidereus

    Joined:
    Nov 7, 2016
    Posts:
    3
    After googling, stackoverflowing, try&error I might have found (at least) a workaround for this.
    • Target Unity-iPhone, set Always Embed Swift Standard Libraries to yes
    • Target Unity-iPhone Tests, set Always Embed Swift Standard Libraries to no
    • Target UnityFramework, set Always Embed Swift Standard Libraries to no
    Then what I also did I have deleted the references for com.unity.ads in the Xcode project tree (Unity-iPhone/Frameworks/com.unity.ads).

    Upload to TestFlight was successful and also I could see the ads showing in the game. Hope that setup passes the production release as well. :D
     
    enhawk likes this.
  4. enhawk

    enhawk

    Joined:
    Aug 22, 2013
    Posts:
    833
    the only solution I’ve found is to use 4.3 for ios.

    there is a bug in 4.3 for android banners, I need to build android with 4.4
     
  5. Yasuyuki

    Yasuyuki

    Unity Technologies

    Joined:
    Sep 11, 2014
    Posts:
    153
  6. Sidereus

    Sidereus

    Joined:
    Nov 7, 2016
    Posts:
    3
    Yasuyuki, thanks for the hint. After building the xcode project with unity I have followed the hint from unity ads documentation:

    If your project does not use Swift, add an empty Swift file to your project in Xcode by selecting File > New > Swift file.

    I've added the empty swift file and enabled the bridge (as unity builds xcode project in objective-c). As a result submission was fine, without any errors.
     
    FamishedMammal and Yasuyuki like this.
  7. enhawk

    enhawk

    Joined:
    Aug 22, 2013
    Posts:
    833
  8. enhawk

    enhawk

    Joined:
    Aug 22, 2013
    Posts:
    833
    tests should be set to “yes”

    finally this is the change I made and everything worked. It’s a unity editor version problem according to some comments. Some versions of Unity set these values correctly.
     
    FamishedMammal likes this.
  9. FamishedMammal

    FamishedMammal

    Joined:
    Nov 3, 2015
    Posts:
    113
    This is the correct answer
     
    Last edited: Jun 21, 2023
    enhawk likes this.
  10. Sidereus

    Sidereus

    Joined:
    Nov 7, 2016
    Posts:
    3
    Actually, I have one more update to this. After updating Xcode to 14.3 there are no errors anymore. (I am wondering why I didn't think about that earlier :oops: )
     
    FamishedMammal likes this.
  11. FamishedMammal

    FamishedMammal

    Joined:
    Nov 3, 2015
    Posts:
    113
    Updating XCode does not solve it for me... (Unity 2021.3)
     
    Last edited: May 31, 2023