Skip to content

Package ouisync-service dylib as OuisyncService.framework - #195

Merged
madadam merged 1 commit into
masterfrom
apple-framework-packaging
Sep 23, 2026
Merged

madadam merged 1 commit into
masterfrom
apple-framework-packaging

Conversation

@panfilov-vladislav

Copy link
Copy Markdown
Collaborator

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_libraries to vendored_frameworks so
    CocoaPods 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.sh produces valid frameworks with correct install names
and signatures. Integration tested in the Flutter app via CocoaPods embedding.

…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).

@madadam madadam left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks.

@madadam
madadam merged commit b532187 into master Sep 23, 2026
11 checks passed
@madadam
madadam deleted the apple-framework-packaging branch September 23, 2026 10:34
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 this pull request may close these issues.

2 participants