mopro
mopro copied to clipboard
Dylib Framework not accepted by App Store
Problem
When submitting example app to app store we get the following error:
We noticed one or more issues with a recent delivery for the following app:
MoproExampleApp
Version 1.0
Build 1
Please correct the following issues and upload a new binary to App Store Connect.
ITMS-90426: Invalid Swift Support - The SwiftSupport folder is missing. Rebuild your app using the current public (GM) version of Xcode and resubmit it.
Apple Developer Relations
This only happens when you do app submission, not when building the app locally.
Details
Brain dump of relevant things.
See https://github.com/oskarth/mopro/pull/106 for latest PR. This is the circuit dylib in an XCFramework and then embedded in app. https://github.com/oskarth/mopro/blob/main/scripts/cli/build_ios.sh#L198-L217
Dylib support https://github.com/oskarth/mopro/issues/11 issue.
We load circuit by path, so we need dylib path. If we naively convert to framework binary format with lipo it doesn't seem to be able to read. Problem doesn't mention dylib, but when removing it it works.
Some relevant links:
https://developer.apple.com/documentation/bundleresources/placing_content_in_a_bundle
Avoid using dynamic library files (.dylib files) for dynamic linking. An XCFramework can include dynamic library files, but only macOS supports these libraries for dynamic linking. Dynamic linking on iOS, watchOS, and tvOS requires the XCFramework to contain .framework bundles.
https://forums.swift.org/t/swift-package-with-dynamic-libraries-leads-to-app-store-validation-error/66857/12
Acceptance criteria
Successful submission to TestFlight/App store with circuit as dylib embedded.
Alt: Some other way of doing witness generation (see other issues)