@@ -28,41 +28,51 @@ function createXcframework() {
2828 <key>MinimumOSVersion</key>
2929 <string>11.0</string>
3030 <key>CFBundleVersion</key>
31- <string>0.3.8 </string>
31+ <string>0.3.9 </string>
3232 <key>CFBundleShortVersionString</key>
33- <string>0.3.8 </string>
33+ <string>0.3.9 </string>
3434</dict>
3535</plist>
3636EOF
3737)
3838 echo " ===================== create ios device framework ====================="
3939 mkdir -p " ${BUILD_DIR} /ios-arm64/powersync-sqlite-core.framework"
4040 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"
4242 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"
4345
4446 echo " ===================== create ios simulator framework ====================="
4547 mkdir -p " ${BUILD_DIR} /ios-arm64_x86_64-simulator/powersync-sqlite-core.framework"
4648 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"
4850 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"
4953
5054 echo " ===================== create macos framework ====================="
5155 mkdir -p " ${BUILD_DIR} /macos-arm64_x86_64/powersync-sqlite-core.framework/Versions/A/Resources"
5256 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"
5458 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"
5864
5965 echo " ===================== create xcframework ====================="
6066 rm -rf " ${BUILD_DIR} /powersync-sqlite-core.xcframework"
67+ # "-debug-symbols" requires the absolute path
6168 xcodebuild -create-xcframework \
6269 -framework " ${BUILD_DIR} /ios-arm64/powersync-sqlite-core.framework" \
70+ -debug-symbols " $( pwd -P) /${BUILD_DIR} /ios-arm64/powersync-sqlite-core.framework.dSYM" \
6371 -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" \
6473 -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" \
6676
6777 cp -Rf " ${BUILD_DIR} /powersync-sqlite-core.xcframework" " powersync-sqlite-core.xcframework"
6878 zip -r --symlinks powersync-sqlite-core.xcframework.zip powersync-sqlite-core.xcframework LICENSE README.md
7585rm -rf powersync-sqlite-core.xcframework
7686
7787# 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
7989# 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
8292# 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
8595
8696createXcframework
0 commit comments