Package ouisync-service dylib as OuisyncService.framework - #195
Merged
Merged
Conversation
…Apple A loose .dylib is rejected by App Store validation, so wrap the dynamic library the Dart FfiServer dlopen's as OuisyncService.framework on iOS and macOS. build-framework.sh repackages a built dylib into a framework (correct install name, Info.plist, ad-hoc signature); build-xcframework.sh now also regenerates the frameworks for each enabled target after the static xcframework. The podspec vendors the frameworks instead of loose dylibs and bindings.dart loads them via the framework path in the packaged app. Prebuilt frameworks/xcframework/output are gitignored (reproducible from the scripts).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Package the Rust native core (libouisync_service.dylib) as OuisyncService.framework
for iOS and macOS. App Store validation rejects loose .dylib files in app bundles;
this framework packaging resolves that blocker and enables TestFlight/App Store uploads.
Changes
build-framework.sh (new): Script to wrap a dylib into a .framework bundle with
proper install names (
@rpath/OuisyncService.framework/OuisyncService), Info.plist,and ad-hoc codesigning. Handles both iOS (flat layout) and macOS (versioned layout).
build-xcframework.sh: Added step 4 to automatically package macOS and iOS dylibs
as frameworks, integrated into the Rust build pipeline.
ouisync.podspec: Changed from
vendored_librariestovendored_frameworkssoCocoaPods embeds the framework and re-signs under the app's identity.
bindings.dart: Updated Dart FFI to load the framework at runtime:
DynamicLibrary.open('OuisyncService.framework/OuisyncService')..gitignore: Added framework and dylib artifacts (reproducible via build scripts).
Testing
Verify that
build-xcframework.shproduces valid frameworks with correct install namesand signatures. Integration tested in the Flutter app via CocoaPods embedding.