Skip to content

Commit ed8cc16

Browse files
committed
Merge branch 'main' into feat/overhaul
2 parents 968133d + 7af247d commit ed8cc16

File tree

4 files changed

+24
-19
lines changed

4 files changed

+24
-19
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ rust/default/
3333
ios/include/
3434
ios/libs/
3535
linux/bin/
36-
macos/include/
37-
macos/libs/
36+
macos/framework
3837

3938
lib/git_versions.dart
4039
rust/src/bin

macos/flutter_libepiccash.podspec

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,11 @@ A new Flutter plugin project.
1414
s.author = { 'Your Company' => 'email@example.com' }
1515

1616
s.source = { :path => '.' }
17-
s.source_files = 'Classes/**/*'
18-
s.static_framework = true
19-
s.vendored_libraries = "**/*.a"
17+
s.source_files = 'Classes/**/*'
18+
s.vendored_frameworks = 'framework/EpicWallet.xcframework'
2019
s.dependency 'FlutterMacOS'
2120

22-
s.platform = :osx, '10.11'
21+
s.platform = :osx, '10.15'
2322
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=macosx*]' => 'x86_64' }
2423
s.swift_version = '5.0'
2524
end

scripts/ios/build_all.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/usr/bin/env bash
2+
set -e
3+
rm -rf build
24
mkdir build
35
echo ''$(git log -1 --pretty=format:"%H")' '$(date) >> build/git_commit_version.txt
46
VERSIONS_FILE=../../lib/git_versions.dart
@@ -8,15 +10,19 @@ if [ ! -f "$VERSIONS_FILE" ]; then
810
fi
911
COMMIT=$(git log -1 --pretty=format:"%H")
1012
OS="IOS"
11-
sed -i '' "/\/\*${OS}_VERSION/c\\/\*${OS}_VERSION\*\/ const ${OS}_VERSION = \"$COMMIT\";" $VERSIONS_FILE
13+
sed -i '' '/\/\*${OS}_VERSION/c\'$'\n''/\*${OS}_VERSION\*\/ const ${OS}_VERSION = "'"$COMMIT"'";' "$VERSIONS_FILE"
1214
cp -r ../../rust build/rust
1315
cd build/rust
1416

1517
rustup target add aarch64-apple-ios x86_64-apple-ios
1618

1719
# building
1820
cp target/epic_cash_wallet.h libepic_cash_wallet.h
19-
cargo lipo --release
21+
22+
export IPHONEOS_DEPLOYMENT_TARGET=15.0
23+
export RUSTFLAGS="-C link-arg=-mios-version-min=15.0"
24+
cargo build --release --target aarch64-apple-ios
25+
#cargo lipo --release
2026

2127
# moving files to the ios project
2228
inc=../../../../ios/include

scripts/macos/build_all.sh

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/usr/bin/env bash
2+
set -e
3+
rm -rf build
24
mkdir build
35
echo ''$(git log -1 --pretty=format:"%H")' '$(date) >> build/git_commit_version.txt
46
VERSIONS_FILE=../../lib/git_versions.dart
@@ -8,22 +10,21 @@ if [ ! -f "$VERSIONS_FILE" ]; then
810
fi
911
COMMIT=$(git log -1 --pretty=format:"%H")
1012
OSX="OSX"
11-
sed -i '' "/\/\*${OS}_VERSION/c\\/\*${OS}_VERSION\*\/ const ${OS}_VERSION = \"$COMMIT\";" $VERSIONS_FILE
13+
sed -i '' '/\/\*${OS}_VERSION/c\'$'\n''/\*${OS}_VERSION\*\/ const ${OS}_VERSION = "'"$COMMIT"'";' "$VERSIONS_FILE"
1214
cp -r ../../rust build/rust
1315
cd build/rust
1416

1517
# building
1618
cp target/epic_cash_wallet.h libepic_cash_wallet.h
1719
cargo lipo --release --targets aarch64-apple-darwin
1820

19-
# moving files to the ios project
20-
inc=../../../../macos/include
21-
libs=../../../../macos/libs
21+
xcodebuild -create-xcframework \
22+
-library target/aarch64-apple-darwin/release/libepic_cash_wallet.a \
23+
-headers libepic_cash_wallet.h \
24+
-output ../EpicWallet.xcframework
2225

23-
rm -rf ${inc} ${libs}
24-
25-
mkdir ${inc}
26-
mkdir ${libs}
27-
28-
cp libepic_cash_wallet.h ${inc}
29-
cp target/aarch64-apple-darwin/release/libepic_cash_wallet.a ${libs}
26+
# moving files to the macos project
27+
fwk=../../../../macos/framework/
28+
rm -rf ${fwk}
29+
mkdir ${fwk}
30+
mv ../EpicWallet.xcframework ${fwk}

0 commit comments

Comments
 (0)