Skip to content

Commit 024fda8

Browse files
Add debug symbols for iOS and macOS builds (#49)
* Add debug symbols and dysm for ios and macos builds * chore: update versions * chore: bump versions --------- Co-authored-by: stevensJourney <[email protected]>
1 parent 87b638b commit 024fda8

File tree

6 files changed

+37
-22
lines changed

6 files changed

+37
-22
lines changed

Cargo.lock

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+6-1
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,19 @@ strip = true
1717
opt-level = "z"
1818
lto = true
1919

20+
[profile.release_apple]
21+
inherits = "release"
22+
strip = false
23+
debug = true
24+
2025
[profile.wasm]
2126
inherits = "release"
2227

2328
[profile.wasm_asyncify]
2429
inherits = "wasm"
2530

2631
[workspace.package]
27-
version = "0.3.8"
32+
version = "0.3.9"
2833
edition = "2021"
2934
authors = ["JourneyApps"]
3035
keywords = ["sqlite", "powersync"]

android/build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins {
66
}
77

88
group = "co.powersync"
9-
version = "0.3.8"
9+
version = "0.3.9"
1010
description = "PowerSync Core SQLite Extension"
1111

1212
repositories {

android/src/prefab/prefab.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"name": "powersync_sqlite_core",
33
"schema_version": 2,
44
"dependencies": [],
5-
"version": "0.3.8"
5+
"version": "0.3.9"
66
}

powersync-sqlite-core.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'powersync-sqlite-core'
3-
s.version = '0.3.8'
3+
s.version = '0.3.9'
44
s.summary = 'PowerSync SQLite Extension'
55
s.description = <<-DESC
66
PowerSync extension for SQLite.

tool/build_xcframework.sh

+24-14
Original file line numberDiff line numberDiff line change
@@ -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>
3636
EOF
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
@@ -75,12 +85,12 @@ EOF
7585
rm -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

8696
createXcframework

0 commit comments

Comments
 (0)