-
Notifications
You must be signed in to change notification settings - Fork 6
feat: add watchOS support (tentative) #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for getting started on this!
fn main() { | ||
let mut cfg = cc::Build::new(); | ||
let target = std::env::var("TARGET").unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we building crates/shell
and crates/sqlite
for watchOS somewhere? These are mostly used for testing and development, IIRC we don't ship them for iOS either. So I wonder if the changes are necessary.
<key>CFBundleVersion</key> | ||
<string>0.3.12</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>0.3.12</string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice if we could extract the common prefix of those files into a shared variable, e.g. this one uses 0.3.12 while our other builds are at 0.3.14. Keeping those in sync would be easier that way.
|
||
cp -Rf "${BUILD_DIR}/powersync-sqlite-core.xcframework" "powersync-sqlite-core.xcframework" | ||
zip -r --symlinks powersync-sqlite-core.xcframework.zip powersync-sqlite-core.xcframework LICENSE README.md | ||
zip -r --symlinks powersync-sqlite-core.xcframework.zip powersync-sqlite-core.xcframework "${BUILD_DIR}/watchos-arm64/powersync-sqlite-core.framework/libpowersync.a" "${BUILD_DIR}/watchos-arm64-simulator/powersync-sqlite-core.framework/libpowersync.a" LICENSE README.md |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also not a watchOS expert, but is there a reason for requiring static libraries here? Why would the regular framework not work?
|
||
function createXcframework() { | ||
plist=$(cat << EOF | ||
ios_plist=$( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's technically not just ios, we're using this for macOS too. I don't know what a better name would be either though, maybe common_plist
?
Not a watchOS expert, so carefully review and guidance required.