Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to distribute to App Store Connect, Invalid bundle #82

Closed
melih-veloxia opened this issue Feb 2, 2022 · 11 comments · Fixed by #84
Closed

Unable to distribute to App Store Connect, Invalid bundle #82

melih-veloxia opened this issue Feb 2, 2022 · 11 comments · Fixed by #84
Assignees
Labels
bug Something isn't working triaged

Comments

@melih-veloxia
Copy link

Starting from 2020x, Unity introduced a new standard for Unity's iOS builds wherein plugins and files are contained within UnityFramework.framework (which is where I see RevenueCat’s generated code and other files). That's why when we try to upload our binary with RevenueCat to Apple Store Connect through Xcode, we get the error: ERROR ITMS-90206: "Invalid Bundle. The bundle at 'APPNAME.app/Frameworks/UnityFramework.framework' contains disallowed file 'Frameworks'.". Before installing RevenueCat, there wasn't any problem.

  1. Environment

    1. Platform: iOS
    2. SDK version: 3.5.0
    3. OS + version: MacOS 11.3.1
    4. Xcode/Android Studio version: 12.5.1
    5. Unity version: 2020.3.25f1
    6. How widespread is the issue. Percentage of devices affected: 100%
  2. Debug logs that reproduce the issue
    None

  3. Steps to reproduce, with a description of expected vs. actual behavior

    1. Build to Xcode with Unity 2020.3.25f1 after RevenueCat installation
    2. Archive the build
    3. Try to distribute to App Store Connect
  4. Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.)
    As a workaround, one may follow the steps below:

    1. Build project to Xcode from Unity like you normally would
    2. In the project view, select the target that is your project (usually called "Unity-IPhone" from what I've seen)
    3. Click Build Phases
    4. Click that small plus sign that’s really easy to miss at the top of the build phases section of Xcode
    5. Choose New Run Script Phase
    6. Expand the newly added Run Script
    7. Paste this script in there:
      cd "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Frameworks/UnityFramework.framework/" if [[ -d "Frameworks" ]]; then rm -fr Frameworks fi

Additional context
These additional steps prevent us to use our CI/CD pipeline, that’s why an immediate fix is required.

References:
https://developer.apple.com/forums/thread/654980
https://support.wikitude.com/support/discussions/topics/5000096581

@melih-veloxia melih-veloxia added the bug Something isn't working label Feb 2, 2022
@ghost ghost added the status: needs-additional-info Issues that are missing steps from bug template label Feb 2, 2022
@ghost
Copy link

ghost commented Feb 2, 2022

Hello! It doesn't seem like we have quite enough information to send this to a human yet to help out. We would love if you could provide more details about your issue by following the template without modifying any of the pre-filled text. If you're looking for support, head over to our Community.

@aboedo
Copy link
Member

aboedo commented Feb 3, 2022

hi @melih-veloxia! Thanks for reporting! Sorry about the bot, the ticket is fine.
I'm gonna dig into this and report back

@aboedo
Copy link
Member

aboedo commented Feb 3, 2022

I can confirm that with Unity 2020.3.27f1, I am able to reproduce the error when validating a build of our Unity Subtester app with Organizer.

I'm a curious, though, about the setup that led to the .framework being there.
We use Cocoapods to distribute our .framework with Unity, through the External Dependency Manager.

Cocoapods doesn't actually create a Frameworks folder, it instead just creates a single, static library that embeds all frameworks.

You can even see this in the project's build phases.

I believe you're correct in the problem being a change in Unity. I don't think that it's entirely related to our SDK, although I'm still investigating and not discarding the possibility.

I'll report back when I know more.

Thanks again for reporting!

@melih-veloxia
Copy link
Author

@aboedo Thanks for your quick reply. Just like I said, we use bunch of other SDKs with cocoapods through EDM4U and without RevenueCat, there isn't any problem.

@aboedo
Copy link
Member

aboedo commented Feb 3, 2022

@melih-veloxia that's good to know. Could you provide a couple of examples of the SDKs that you have through cocoapods that do work with no problem, so I can try to see what they're doing differently?

@melih-veloxia
Copy link
Author

melih-veloxia commented Feb 3, 2022

@aboedo

  • Facebook SDK
  • Most of the tools from Firebase SDK
  • AppsFlyer SDK
  • IronSource SDK with most of the adaptors
  • GameAnalytics SDK
  • OneSignal SDK

@aboedo
Copy link
Member

aboedo commented Feb 3, 2022

Thanks!! I'll take a look

@taquitos taquitos added triaged and removed status: needs-additional-info Issues that are missing steps from bug template labels Feb 3, 2022
@aboedo
Copy link
Member

aboedo commented Feb 3, 2022

@melih-veloxia I made a PR for the fix, #84.
The PR adds a post install script that will ensure that ALWAYS_EMBED_SWIFT_LIBRARIES is set to NO.

It'll make it into a release soon.

In the meantime, you can also solve this for your project by clicking on the target in the Xcode project, then looking for ALWAYS_EMBED_SWIFT_LIBRARIES and setting it to NO (you may need to do it for other targets too).

I tried it in the same app that I used to reproduce the issue and the issue was gone.

image

Hope this helps!! Thanks again for reporting and for being so responsive!

@aboedo aboedo self-assigned this Feb 3, 2022
@melih-veloxia
Copy link
Author

Hey @aboedo! Thanks, will give it a try with the pull request and let you know! Thanks for the quick solution.

@melih-veloxia
Copy link
Author

I merged your 2 pull requests into our project and it works with the CI/CD pipeline!

Closing the issue right now, thanks for your cooperation.

@aboedo
Copy link
Member

aboedo commented Feb 4, 2022

Thanks for the confirmation @melih-veloxia!!! I'll be making an official release with both PRs today. Let us know if you run into any more issues!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants