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

Error while uploading to iTunesConnect for beta testing #22

Closed
ararog opened this issue Nov 2, 2017 · 15 comments · Fixed by #81
Closed

Error while uploading to iTunesConnect for beta testing #22

ararog opened this issue Nov 2, 2017 · 15 comments · Fixed by #81

Comments

@ararog
Copy link

ararog commented Nov 2, 2017

Here's the message while uploading to itunesconnect:

ERROR ITMS-90206: "Invalid Bundle. The bundle at 'myapp.app/Frameworks/InputMask.framework' contains disallowed file 'Frameworks'."

@ararog
Copy link
Author

ararog commented Nov 4, 2017

I found a fix, I set "Always Embed Swift Standard Libraries" to false on both RNTextInputMask and its InputMask dependency, now I can publish to Apple Store without a problem.

@lnikkila
Copy link
Contributor

lnikkila commented Nov 15, 2017

We’re also seeing this, the above works. It seems “Always Embed Swift Standard Libraries” should be set on the app you’re publishing, not the library project. Additionally it should not be set on any app extensions you might have. More info about that error here, although CocoaPods specific: CocoaPods/CocoaPods#4203

The above link also has a bash script you can use as a workaround to delete the extra Frameworks directory during the build so you don’t need to modify InputMask.xcodeproj. Modifications to the project are wiped if you reinstall the module.

Here’s the script we’re using, careful with the paths:

EXTRA_DIR="${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Frameworks/InputMask.framework/Frameworks"

if [[ -d "${EXTRA_DIR}" ]]; then
  rm -rf "${EXTRA_DIR}"
fi

@Chleba
Copy link

Chleba commented Dec 7, 2017

Setting “Always Embed Swift Standard Libraries” isn't worked for me. I'm still unable to upload my App on Itunes Store.

@deehuey
Copy link

deehuey commented Dec 15, 2017

Thanks @lnikkila !

@aliemre
Copy link

aliemre commented Dec 22, 2017

Hi @lnikkila

We have encountered same error. However, we could not manage to solve the issue with the way you suggest. Could you explain further? Thanks!

@lnikkila
Copy link
Contributor

@aliemre

See the screenshot below, make sure it’s the last build phase defined in your target. Also make sure “Always embed Swift standard libraries” is enabled in the target’s build settings, but not enabled on any libraries you have (except for InputMask which we’re working around with this script) or any app extension targets you may have.

workaround

@MadGeorge
Copy link

The only question is why this is not in the Readme? I spent a hours to find the answer in google.

@Baskerville42
Copy link

I have the same issue. I have fixed it by adding New Run Script Phase into Building Phase(s) with the script provided by @lnikkila
Thank you very much!

@erhanbicer
Copy link

thank you @lnikkila . it's worked

j-francisco added a commit to j-francisco/LearnCash that referenced this issue Oct 23, 2018
- Added upside down orientation for iPad
- Added workaround for issue with InputMask: react-native-text-input-mask/react-native-text-input-mask#22
@adrienthiery
Copy link
Contributor

Hi there.
I've encountered that issue and I'm trying to fix it since yesterday.

I'm no iOS dev so I'm kind of struggling to get this one.

Even though I added the script, I still have the frameworks in the binary uploaded to AppStoreConnect.

I finally figured out that the script is trying to delete the wrong folder. It's trying to delete ~/Library/Developer/Xcode/DerivedData/MyApp-gcykowogazswsdfkqlcyslvyjgxa/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/BuildProductsPath/Release-iphoneos/MyApp.app/Frameworks/InputMask.framework/Frameworks but this one does not exists and just after, I see warnings of "not copying" files:

[14:48:42]: ▸ Running script 'Fabric'
[14:48:42]: ▸ Copying ~/Library/Developer/Xcode/DerivedData/MyApp-gcykowogazswsdfkqlcyslvyjgxa/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/InputMask.framework/Frameworks/libswiftCoreImage.dylib
# And some more

which leaves me puzzled, as I thought that React Native bundling was all done in the ios/build folder.

In addition, the solution of changing the library is not gonna work for me, as I need all of that to run on our CI.

Any ideas, help, lead on how to go past that one?

How could I target the IntermediateBuildFilesPath/UninstalledProducts/iphoneos/InputMask.framework/Frameworks folder instead of the BuildProductsPath/Release-iphoneos/MyApp.app/Frameworks/InputMask.framework/Frameworks ?

Thanks a lot in advance.

(Using XCode 9.4, RN 0.55.4 and react-native-text-input-mask@0.8.0, if that's any help)

@adrienthiery
Copy link
Contributor

adrienthiery commented Oct 31, 2018

Small update here.

I finally managed to fix that on the CI ! (Verifying it now)

A bit point that I might have missed was that the build script needs to be the LAST one (after the *Embed frameworks* step).

Also, to disable the Always embed swift standard libraries to false in the RNTextInputMask and InputMask dependencies, I created an npm script (in my package.json) :

"fix-rn-text-input-mask": "sed -i '' -E 's/ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;/ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;/g' ./node_modules/react-native-text-input-mask/ios/RNTextInputMask/RNTextInputMask.xcodeproj/project.pbxproj && sed -i '' -E 's/ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;/ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;/' ./node_modules/react-native-text-input-mask/ios/RNTextInputMask/InputMask/InputMask.xcodeproj/project.pbxproj",

That I run in the postinstall hook.

@Iskander508
Copy link

Iskander508 commented Nov 28, 2018

I don't understand this workaround. One (maybe silly) question: Why don't we unset the flag directly in this repo by modifying the pbxproj files? Is it needed for something? Thank you for explanation.
https://github.com/react-native-community/react-native-text-input-mask/blob/master/ios/RNTextInputMask/RNTextInputMask.xcodeproj/project.pbxproj#L288

@lasersox
Copy link

Just ran into this today. The suggested fixes are not very good as they need to be re-applied every time we reinstall node_modules (something that happens constantly with react-native).

@cassmtnr
Copy link

cassmtnr commented Feb 13, 2019

Documentation pull request: #81

Fix pull request: #99

@cassmtnr
Copy link

Hey @ivanzotov, should close the issue when the pull request gets merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.