File tree Expand file tree Collapse file tree 4 files changed +24
-19
lines changed
Expand file tree Collapse file tree 4 files changed +24
-19
lines changed Original file line number Diff line number Diff line change @@ -33,8 +33,7 @@ rust/default/
3333ios /include /
3434ios /libs /
3535linux /bin /
36- macos /include /
37- macos /libs /
36+ macos /framework
3837
3938lib /git_versions.dart
4039rust /src /bin
Original file line number Diff line number Diff 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'
2524end
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
2+ set -e
3+ rm -rf build
24mkdir build
35echo ' ' $( git log -1 --pretty=format:" %H" ) ' ' $( date) >> build/git_commit_version.txt
46VERSIONS_FILE=../../lib/git_versions.dart
@@ -8,15 +10,19 @@ if [ ! -f "$VERSIONS_FILE" ]; then
810fi
911COMMIT=$( git log -1 --pretty=format:" %H" )
1012OS=" 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 "
1214cp -r ../../rust build/rust
1315cd build/rust
1416
1517rustup target add aarch64-apple-ios x86_64-apple-ios
1618
1719# building
1820cp 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
2228inc=../../../../ios/include
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
2+ set -e
3+ rm -rf build
24mkdir build
35echo ' ' $( git log -1 --pretty=format:" %H" ) ' ' $( date) >> build/git_commit_version.txt
46VERSIONS_FILE=../../lib/git_versions.dart
@@ -8,22 +10,21 @@ if [ ! -f "$VERSIONS_FILE" ]; then
810fi
911COMMIT=$( git log -1 --pretty=format:" %H" )
1012OSX=" 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 "
1214cp -r ../../rust build/rust
1315cd build/rust
1416
1517# building
1618cp target/epic_cash_wallet.h libepic_cash_wallet.h
1719cargo 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}
You can’t perform that action at this time.
0 commit comments