Skip to content
This repository has been archived by the owner on Apr 8, 2022. It is now read-only.

Validating for the Mac App Store #3

Closed
ioanalexme opened this issue Sep 25, 2020 · 5 comments
Closed

Validating for the Mac App Store #3

ioanalexme opened this issue Sep 25, 2020 · 5 comments

Comments

@ioanalexme
Copy link

Hello,
Great framework you developed here. But I have a problem. When I try to validate an app with this embedded framework I receive an error when uploading/validating:

App Store Connect Operation Error
Bad Bundle Executable. You must include a valid CFBundleExecutable key in the nested bundle libtesseract [com.testapp.pkg/Payload/TestApp.app/Contents/Frameworks/libtesseract.framework] property list file.

Any idea?

@Steven0351
Copy link
Member

Hm, that's a head scratcher. According to the docs:

For a framework, it's the shared library framework and must have the same name as the framework but without the .framework extension.

I pulled down the framework as-is from jcenter and verified that the CFBundleExecutable key was libtesseract. Could you check the value of the Info.plist in the framework embedded in your App bundle and let me know what it says?

@Steven0351
Copy link
Member

Also, could you make a minimal repo that has the same project configuration as you're working with so I can reproduce the issue on my end?

@Steven0351
Copy link
Member

Not sure if this could also potentially be the issue, but there was a person who opened an issue on the main SwiftyTesseract repo having issues related to code signing SwiftyTesseract/SwiftyTesseract#75. Apparently Xcode 12 has an issue where it is not code signing Swift Packages

@ViktorSimko
Copy link

The problem here I think is that Xcode embeds libtesseract.framework into the app package.
This is a static framework so it shouldn't be embedded. I don't know if it's caused by SwiftPM or Xcode.
Possibly all binary SwiftPM targets are embedded now which will cause issues like this.
Unfortunately, I couldn't yet find a config for changing this behaviour.

I've temporarily solved this by adding a Run Script phase at the end of Build Phases for removing the framework from the package:

rm -rf "$(find $CODESIGNING_FOLDER_PATH -name 'libtesseract.framework')"

This also solves the other issue (SwiftyTesseract/SwiftyTesseract#75) related to missing code signature, since the binary won't be there unsigned.

@ioanalexme
Copy link
Author

Hello,
Indeed, the above solution worked, I also discovered it a few hours ago, but I removed the static .framework with Finder :)
I guess this is an XCode issue, it does not matter, but the solution is the one above.
Thanks a million!

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

No branches or pull requests

3 participants