Skip to content

Commit 8c326bf

Browse files
authored
Merge pull request #37 from superwall/ir/fix/spm-module-headers
Fix SPM namespaces by moving headers post build
2 parents 11f5406 + a070062 commit 8c326bf

3 files changed

Lines changed: 28 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# CHANGELOG
22

3+
4+
## 1.0.5
5+
6+
## Fixes
7+
- Fixes namespaces for SPM module headers
8+
39
## 1.0.4
410

511
## Enhancements

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cel-eval"
3-
version = "1.0.4"
3+
version = "1.0.5"
44
edition = "2021"
55

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.htmlž

build_ios.sh

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,4 +213,24 @@ xcodebuild -create-xcframework \
213213
-library ./target/xcframeworks/watchos-device/libcel.a -headers ./target/xcframeworks/headers/watchos-device \
214214
-output ./target/xcframeworks/libcel.xcframework
215215

216-
echo "XCFramework built at ./target/xcframeworks/libcel.xcframework"
216+
echo "XCFramework built at ./target/xcframeworks/libcel.xcframework"
217+
218+
# Restructure module maps to avoid SPM conflicts
219+
echo "Restructuring module maps to avoid SPM conflicts"
220+
XCFW_PATH="./target/xcframeworks/libcel.xcframework"
221+
222+
# For each slice in the xcframework
223+
for slice_dir in "$XCFW_PATH"/*/; do
224+
if [ -f "$slice_dir/Headers/module.modulemap" ]; then
225+
slice_name=$(basename "$slice_dir")
226+
echo " Processing $slice_name"
227+
228+
# Create Modules directory
229+
mkdir -p "$slice_dir/Modules"
230+
231+
# Move module.modulemap from Headers to Modules
232+
mv "$slice_dir/Headers/module.modulemap" "$slice_dir/Modules/module.modulemap"
233+
fi
234+
done
235+
236+
echo "Module map restructuring complete - SPM compatible"

0 commit comments

Comments
 (0)