@@ -28,41 +28,51 @@ function createXcframework() {
28
28
<key>MinimumOSVersion</key>
29
29
<string>11.0</string>
30
30
<key>CFBundleVersion</key>
31
- <string>0.3.8 </string>
31
+ <string>0.3.9 </string>
32
32
<key>CFBundleShortVersionString</key>
33
- <string>0.3.8 </string>
33
+ <string>0.3.9 </string>
34
34
</dict>
35
35
</plist>
36
36
EOF
37
37
)
38
38
echo " ===================== create ios device framework ====================="
39
39
mkdir -p " ${BUILD_DIR} /ios-arm64/powersync-sqlite-core.framework"
40
40
echo " ${plist} " > " ${BUILD_DIR} /ios-arm64/powersync-sqlite-core.framework/Info.plist"
41
- cp -f " ./target/aarch64-apple-ios/release /libpowersync.dylib" " ${BUILD_DIR} /ios-arm64/powersync-sqlite-core.framework/powersync-sqlite-core"
41
+ cp -f " ./target/aarch64-apple-ios/release_apple /libpowersync.dylib" " ${BUILD_DIR} /ios-arm64/powersync-sqlite-core.framework/powersync-sqlite-core"
42
42
install_name_tool -id " @rpath/powersync-sqlite-core.framework/powersync-sqlite-core" " ${BUILD_DIR} /ios-arm64/powersync-sqlite-core.framework/powersync-sqlite-core"
43
+ # Generate dSYM for iOS Device
44
+ dsymutil " ${BUILD_DIR} /ios-arm64/powersync-sqlite-core.framework/powersync-sqlite-core" -o " ${BUILD_DIR} /ios-arm64/powersync-sqlite-core.framework.dSYM"
43
45
44
46
echo " ===================== create ios simulator framework ====================="
45
47
mkdir -p " ${BUILD_DIR} /ios-arm64_x86_64-simulator/powersync-sqlite-core.framework"
46
48
echo " ${plist} " > " ${BUILD_DIR} /ios-arm64_x86_64-simulator/powersync-sqlite-core.framework/Info.plist"
47
- lipo ./target/aarch64-apple-ios-sim/release /libpowersync.dylib ./target/x86_64-apple-ios/release /libpowersync.dylib -create -output " ${BUILD_DIR} /ios-arm64_x86_64-simulator/powersync-sqlite-core.framework/powersync-sqlite-core"
49
+ lipo ./target/aarch64-apple-ios-sim/release_apple /libpowersync.dylib ./target/x86_64-apple-ios/release_apple /libpowersync.dylib -create -output " ${BUILD_DIR} /ios-arm64_x86_64-simulator/powersync-sqlite-core.framework/powersync-sqlite-core"
48
50
install_name_tool -id " @rpath/powersync-sqlite-core.framework/powersync-sqlite-core" " ${BUILD_DIR} /ios-arm64_x86_64-simulator/powersync-sqlite-core.framework/powersync-sqlite-core"
51
+ # Generate dSYM for iOS Simulator
52
+ dsymutil " ${BUILD_DIR} /ios-arm64_x86_64-simulator/powersync-sqlite-core.framework/powersync-sqlite-core" -o " ${BUILD_DIR} /ios-arm64_x86_64-simulator/powersync-sqlite-core.framework.dSYM"
49
53
50
54
echo " ===================== create macos framework ====================="
51
55
mkdir -p " ${BUILD_DIR} /macos-arm64_x86_64/powersync-sqlite-core.framework/Versions/A/Resources"
52
56
echo " ${plist} " > " ${BUILD_DIR} /macos-arm64_x86_64/powersync-sqlite-core.framework/Versions/A/Resources/Info.plist"
53
- lipo ./target/x86_64-apple-darwin/release /libpowersync.dylib ./target/aarch64-apple-darwin/release /libpowersync.dylib -create -output " ${BUILD_DIR} /macos-arm64_x86_64/powersync-sqlite-core.framework/Versions/A/powersync-sqlite-core"
57
+ lipo ./target/x86_64-apple-darwin/release_apple /libpowersync.dylib ./target/aarch64-apple-darwin/release_apple /libpowersync.dylib -create -output " ${BUILD_DIR} /macos-arm64_x86_64/powersync-sqlite-core.framework/Versions/A/powersync-sqlite-core"
54
58
install_name_tool -id " @rpath/powersync-sqlite-core.framework/powersync-sqlite-core" " ${BUILD_DIR} /macos-arm64_x86_64/powersync-sqlite-core.framework/Versions/A/powersync-sqlite-core"
55
- ln -s A " ${BUILD_DIR} /macos-arm64_x86_64/powersync-sqlite-core.framework/Versions/Current"
56
- ln -s Versions/Current/powersync-sqlite-core " ${BUILD_DIR} /macos-arm64_x86_64/powersync-sqlite-core.framework/powersync-sqlite-core"
57
- ln -s Versions/Current/Resources " ${BUILD_DIR} /macos-arm64_x86_64/powersync-sqlite-core.framework/Resources"
59
+ ln -sf A " ${BUILD_DIR} /macos-arm64_x86_64/powersync-sqlite-core.framework/Versions/Current"
60
+ ln -sf Versions/Current/powersync-sqlite-core " ${BUILD_DIR} /macos-arm64_x86_64/powersync-sqlite-core.framework/powersync-sqlite-core"
61
+ ln -sf Versions/Current/Resources " ${BUILD_DIR} /macos-arm64_x86_64/powersync-sqlite-core.framework/Resources"
62
+ # Generate dSYM for macOS
63
+ dsymutil " ${BUILD_DIR} /macos-arm64_x86_64/powersync-sqlite-core.framework/Versions/A/powersync-sqlite-core" -o " ${BUILD_DIR} /macos-arm64_x86_64/powersync-sqlite-core.framework.dSYM"
58
64
59
65
echo " ===================== create xcframework ====================="
60
66
rm -rf " ${BUILD_DIR} /powersync-sqlite-core.xcframework"
67
+ # "-debug-symbols" requires the absolute path
61
68
xcodebuild -create-xcframework \
62
69
-framework " ${BUILD_DIR} /ios-arm64/powersync-sqlite-core.framework" \
70
+ -debug-symbols " $( pwd -P) /${BUILD_DIR} /ios-arm64/powersync-sqlite-core.framework.dSYM" \
63
71
-framework " ${BUILD_DIR} /ios-arm64_x86_64-simulator/powersync-sqlite-core.framework" \
72
+ -debug-symbols " $( pwd -P) /${BUILD_DIR} /ios-arm64_x86_64-simulator/powersync-sqlite-core.framework.dSYM" \
64
73
-framework " ${BUILD_DIR} /macos-arm64_x86_64/powersync-sqlite-core.framework" \
65
- -output " ${BUILD_DIR} /powersync-sqlite-core.xcframework"
74
+ -debug-symbols " $( pwd -P) /${BUILD_DIR} /macos-arm64_x86_64/powersync-sqlite-core.framework.dSYM" \
75
+ -output " ${BUILD_DIR} /powersync-sqlite-core.xcframework" \
66
76
67
77
cp -Rf " ${BUILD_DIR} /powersync-sqlite-core.xcframework" " powersync-sqlite-core.xcframework"
68
78
zip -r --symlinks powersync-sqlite-core.xcframework.zip powersync-sqlite-core.xcframework LICENSE README.md
75
85
rm -rf powersync-sqlite-core.xcframework
76
86
77
87
# iOS
78
- cargo build -p powersync_loadable --release --target aarch64-apple-ios -Zbuild-std
88
+ cargo build -p powersync_loadable --profile release_apple --target aarch64-apple-ios -Zbuild-std
79
89
# Simulator
80
- cargo build -p powersync_loadable --release --target aarch64-apple-ios-sim -Zbuild-std
81
- cargo build -p powersync_loadable --release --target x86_64-apple-ios -Zbuild-std
90
+ cargo build -p powersync_loadable --profile release_apple --target aarch64-apple-ios-sim -Zbuild-std
91
+ cargo build -p powersync_loadable --profile release_apple --target x86_64-apple-ios -Zbuild-std
82
92
# macOS
83
- cargo build -p powersync_loadable --release --target aarch64-apple-darwin -Zbuild-std
84
- cargo build -p powersync_loadable --release --target x86_64-apple-darwin -Zbuild-std
93
+ cargo build -p powersync_loadable --profile release_apple --target aarch64-apple-darwin -Zbuild-std
94
+ cargo build -p powersync_loadable --profile release_apple --target x86_64-apple-darwin -Zbuild-std
85
95
86
96
createXcframework
0 commit comments