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.
This adds
build.sh xcframework [platforms]
which produces the following output with support for all of the listed platforms (or iOS, macOS, tvOS and watchOS if no platforms are specified):The main complication here is that loading swiftinterface files uses different scoping rules from normal Swift, which results in our module named Realm conflicting with the class named RealmSwift.Realm. To work around this, the build script statically links Realm into RealmSwift and then supplies a header-only framework named RealmObjc which exposes the relevant symbols.
This also reverts the change to make some of the pre-existing targets build single-platform xcframeworks rather than fat libraries, and makes
build.sh build
produce a xcframework when building with Xcode 11.The new installation tests currently aren't run on CI due to requiring Xcode 11, and will need to be enabled as part of enabling CI builds with Xcode 11. Everything in
examples/installation
is just a copy-paste of the existing examples with Realm.framework changed to Realm.xcframework, so it doesn't need much review attention.