Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dovgopoly committed Dec 18, 2024
1 parent 15a7723 commit ad16642
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion aptos-mobile/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "aptos-mobile"
name = "aptos_mobile"
version = "0.2.5"
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion aptos-mobile/build-android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ cargo ndk -o ./android/src/main/jniLibs \
build --release

# Create Kotlin bindings
cargo run --bin uniffi_bindgen generate --library ./target/debug/libaptos_rp_mobile.dylib --language kotlin --out-dir ./android/src/main/com/example
cargo run --bin uniffi_bindgen generate --library ./target/debug/libaptos_mobile.dylib --language kotlin --out-dir ./android/src/main/com/example
10 changes: 5 additions & 5 deletions aptos-mobile/build-ios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ rm -rf ./ios
cargo build

# Generate bindings
cargo run --bin uniffi_bindgen generate --library ./target/debug/libaptos_rp_mobile.dylib --language swift --out-dir ./bindings
cargo run --bin uniffi_bindgen generate --library ./target/debug/libaptos_mobile.dylib --language swift --out-dir ./bindings

# Add the iOS targets and build
for TARGET in \
Expand All @@ -21,18 +21,18 @@ do
done

# Rename *.modulemap to module.modulemap
mv ./bindings/aptos_rp_mobileFFI.modulemap ./bindings/module.modulemap
mv ./bindings/aptos_mobileFFI.modulemap ./bindings/module.modulemap

# Move the Swift file to the project
mkdir ios
mkdir ./ios/bindings
mv ./bindings/aptos_rp_mobile.swift ./ios/bindings/aptos_rp_mobile.swift
mv ./bindings/aptos_mobile.swift ./ios/bindings/aptos_mobile.swift

# Recreate XCFramework
rm -rf "ios/Mobile.xcframework"
xcodebuild -create-xcframework \
-library ./target/aarch64-apple-ios-sim/release/libaptos_rp_mobile.a -headers ./bindings \
-library ./target/aarch64-apple-ios/release/libaptos_rp_mobile.a -headers ./bindings \
-library ./target/aarch64-apple-ios-sim/release/libaptos_mobile.a -headers ./bindings \
-library ./target/aarch64-apple-ios/release/libaptos_mobile.a -headers ./bindings \
-output "ios/AptosWasmBindings.xcframework"

# Cleanup
Expand Down

0 comments on commit ad16642

Please sign in to comment.