Did anyone manage to upload the app to the App Sto...
# compose-ios
s
Did anyone manage to upload the app to the App Store? After making my shared.xcframework static I get this error if I try to upload to TestFlight.
Copy code
NSLocalizedDescription = "Asset validation failed";
Copy code
NSLocalizedFailureReason = "Invalid bundle structure. The \U201cAshampoo <http://Photos.app/Frameworks/shared.framework/shared\U201d|Photos.app/Frameworks/shared.framework/shared\U201d> binary file is not permitted. Your app cannot contain standalone executables or libraries, other than a valid CFBundleExecutable of supported bundles. For details, visit: <https://developer.apple.com/documentation/bundleresources/placing_content_in_a_bundle> (ID: f5184756-fbce-47be-8fd2-79b8b8ddd3c6)";
d
Where do you get this error? Is it in Xcode build logs?
s
No, the IPA builds fine. It happens if I try to upload to TestFlight via GitHub Action.
Copy code
xcrun altool --upload-app --type ios \
  --file ashampoo-photos.ipa \
  --username "${{ secrets.APP_STORE_CONNECT_USERNAME }}" \
  --password "${{ secrets.APP_STORE_CONNECT_PASSWORD }}" --verbose
I now wonder if you tried to publish a sample Compose for iOS App to TestFlight and if Apple even allows static XCFrameworks to be used.
Maybe I get the message
Your app cannot contain standalone executables or libraries
wrong. Is a static library considered a "standalone library"?
I should add for completeness: Since I use SQLDelight in my shared.xcframework I also needed to add
-lsqlite3
to "other linker flags" in Xcode. Without that it doesn't compile so I'm unable to say what the exact reason for the failure is.
d
Ok, thanks for this info!
c
Could it be that your are embedding the shared.xcframework? AFAIK there is no need for that since it is already statically linked into your app binary
s
Thanks for the hint, I will check that.
c
s
What did you end up doing for this after all Stefan? I asked this here https://kotlinlang.slack.com/archives/C3PQML5NU/p1707819730482879?thread_ts=1658418868.118959&amp;cid=C3PQML5NU too as I am trying to figure out how to solve this issue for ourselves too.
s
SKIKO cannot be included dynamic. So Compose for iOS will need static imports.
Maybe in the mean time it can, but that was my conclusion back then and it works with static
s
Right, so you kept that it's static, but how did you end up app store happy with it? Was it
Copy code
tasks.named("embedAndSignAppleFrameworkForXcode").configure {
    enabled = false
}
? As the discussion in the issue implies?
s
No. I sign and embed.
s
Hmm, so what was the solution after all? I am in a bit of unknown waters for me with all this, so I am having a bit of a hard time following you, sorry about that
s
I kept everything else as it was. Just made the framework static and added
-lsqlite3
Ok, looked it up. I do not embed actually.
But I also don't use that gradle task
s
Oh, and that one just worked for you? I am in the situation where we are not even using SQLDelight, so
-lsqlite3
doesn't really apply to us at all, yet we still experience this issue
ITMS-90171: Invalid bundle structure - The "App.app/Frameworks/lib.framework/lib" binary file is not permitted. Your app cannot contain standalone executables or libraries, other than a valid CFBundleExecutable of supported bundles. For details, visit: https://developer.apple.com/documentation/bundleresources/placing_content_in_a_bundle
Aha! 👀 Lemme try that too then
Which Gradle task are you using?
s
Just the regular assembleXCFramework
There are a lot of configurations that don't work for some reasons and I finally figured out something custom that works and hopefully will not break anytime soon. 😅
s
Haha I totally relate. We are in the scenario where something broke and I am looking to fix it and I can't get it all to click together yet. Trying to use KMMBridge to get most of the work already done for us, but hit this roadblock for now. Will hack away with it a bit more until I figure out what I gotta do, thanks for the help so far, I appreciate it 😊
155 Views