Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing library on ios #2003

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cw_monero/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,8 @@ packages:
dependency: "direct main"
description:
path: "impls/monero.dart"
ref: "127c54599c612d7d3d226e4c016d5812e7a0966d"
resolved-ref: "127c54599c612d7d3d226e4c016d5812e7a0966d"
ref: "9301097ff504525070cc0cb915fe2f1bb0670345"
resolved-ref: "9301097ff504525070cc0cb915fe2f1bb0670345"
url: "https://github.com/mrcyjanek/monero_c"
source: git
version: "0.0.0"
Expand Down
2 changes: 1 addition & 1 deletion cw_monero/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependencies:
monero:
git:
url: https://github.com/mrcyjanek/monero_c
ref: 127c54599c612d7d3d226e4c016d5812e7a0966d
ref: 9301097ff504525070cc0cb915fe2f1bb0670345
path: impls/monero.dart
mutex: ^3.1.0
ledger_flutter_plus: ^1.4.1
Expand Down
4 changes: 2 additions & 2 deletions cw_wownero/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -471,8 +471,8 @@ packages:
dependency: "direct main"
description:
path: "impls/monero.dart"
ref: "127c54599c612d7d3d226e4c016d5812e7a0966d"
resolved-ref: "127c54599c612d7d3d226e4c016d5812e7a0966d"
ref: "9301097ff504525070cc0cb915fe2f1bb0670345"
resolved-ref: "9301097ff504525070cc0cb915fe2f1bb0670345"
url: "https://github.com/mrcyjanek/monero_c"
source: git
version: "0.0.0"
Expand Down
2 changes: 1 addition & 1 deletion cw_wownero/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependencies:
monero:
git:
url: https://github.com/mrcyjanek/monero_c
ref: 127c54599c612d7d3d226e4c016d5812e7a0966d # monero_c hash
ref: 9301097ff504525070cc0cb915fe2f1bb0670345 # monero_c hash
path: impls/monero.dart
mutex: ^3.1.0

Expand Down
4 changes: 2 additions & 2 deletions cw_zano/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,8 @@ packages:
dependency: "direct main"
description:
path: "impls/monero.dart"
ref: "127c54599c612d7d3d226e4c016d5812e7a0966d"
resolved-ref: "127c54599c612d7d3d226e4c016d5812e7a0966d"
ref: "9301097ff504525070cc0cb915fe2f1bb0670345"
resolved-ref: "9301097ff504525070cc0cb915fe2f1bb0670345"
url: "https://github.com/mrcyjanek/monero_c"
source: git
version: "0.0.0"
Expand Down
2 changes: 1 addition & 1 deletion cw_zano/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dependencies:
monero:
git:
url: https://github.com/mrcyjanek/monero_c
ref: 127c54599c612d7d3d226e4c016d5812e7a0966d # monero_c hash
ref: 9301097ff504525070cc0cb915fe2f1bb0670345 # monero_c hash
path: impls/monero.dart
dev_dependencies:
flutter_test:
Expand Down
1 change: 0 additions & 1 deletion ios/monero_libwallet2_api_c.dylib

This file was deleted.

1 change: 0 additions & 1 deletion ios/wownero_libwallet2_api_c.dylib

This file was deleted.

1 change: 0 additions & 1 deletion ios/zano_libwallet2_api_c.dylib

This file was deleted.

8 changes: 4 additions & 4 deletions scripts/ios/app_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ TYPES=($MONERO_COM $CAKEWALLET $HAVEN)
APP_IOS_TYPE=$1

MONERO_COM_NAME="Monero.com"
MONERO_COM_VERSION="1.20.0"
MONERO_COM_BUILD_NUMBER=110
MONERO_COM_VERSION="1.20.2"
MONERO_COM_BUILD_NUMBER=112
MONERO_COM_BUNDLE_ID="com.cakewallet.monero"

CAKEWALLET_NAME="Cake Wallet"
CAKEWALLET_VERSION="4.23.0"
CAKEWALLET_BUILD_NUMBER=293
CAKEWALLET_VERSION="4.23.2"
CAKEWALLET_BUILD_NUMBER=296
CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet"

HAVEN_NAME="Haven"
Expand Down
12 changes: 8 additions & 4 deletions scripts/ios/build_monero_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@ cd "$(dirname "$0")"
for COIN in monero wownero zano;
do
pushd ../monero_c
rm -rf external/ios/build
./build_single.sh ${COIN} aarch64-apple-ios -j$MAKE_JOB_COUNT
./build_single.sh ${COIN} aarch64-apple-iossimulator -j$MAKE_JOB_COUNT
popd
done

unxz -f ../monero_c/release/monero/aarch64-apple-ios_libwallet2_api_c.dylib.xz
unxz -f ../monero_c/release/wownero/aarch64-apple-ios_libwallet2_api_c.dylib.xz
unxz -f ../monero_c/release/zano/aarch64-apple-ios_libwallet2_api_c.dylib.xz
unxz -fk ../monero_c/release/monero/aarch64-apple-ios_libwallet2_api_c.dylib.xz
unxz -fk ../monero_c/release/wownero/aarch64-apple-ios_libwallet2_api_c.dylib.xz
unxz -fk ../monero_c/release/zano/aarch64-apple-ios_libwallet2_api_c.dylib.xz

unxz -fk ../monero_c/release/monero/aarch64-apple-iossimulator_libwallet2_api_c.dylib.xz
unxz -fk ../monero_c/release/wownero/aarch64-apple-iossimulator_libwallet2_api_c.dylib.xz
unxz -fk ../monero_c/release/zano/aarch64-apple-iossimulator_libwallet2_api_c.dylib.xz
46 changes: 11 additions & 35 deletions scripts/ios/gen_framework.sh
Original file line number Diff line number Diff line change
@@ -1,47 +1,23 @@
#!/bin/sh
# Assume we are in scripts/ios
IOS_DIR="$(pwd)/../../ios"
DYLIB_NAME="monero_libwallet2_api_c.dylib"
DYLIB_LINK_PATH="${IOS_DIR}/${DYLIB_NAME}"
FRWK_DIR="${IOS_DIR}/MoneroWallet.framework"

if [ ! -f $DYLIB_LINK_PATH ]; then
echo "Dylib is not found by the link: ${DYLIB_LINK_PATH}"
exit 0
if [[ "$1" == "--simulator" ]];
then
simulator=simulator
fi

cd $FRWK_DIR # go to iOS framework dir
lipo -create $DYLIB_LINK_PATH -output MoneroWallet

echo "Generated ${FRWK_DIR}"
# also generate for wownero
IOS_DIR="$(pwd)/../../ios"
DYLIB_NAME="wownero_libwallet2_api_c.dylib"
DYLIB_LINK_PATH="${IOS_DIR}/${DYLIB_NAME}"
FRWK_DIR="${IOS_DIR}/WowneroWallet.framework"

if [ ! -f $DYLIB_LINK_PATH ]; then
echo "Dylib is not found by the link: ${DYLIB_LINK_PATH}"
exit 0
fi

cd $FRWK_DIR # go to iOS framework dir
lipo -create $DYLIB_LINK_PATH -output WowneroWallet
FRWK_DIR="${IOS_DIR}/MoneroWallet.framework"
cd $FRWK_DIR
lipo -create "../../scripts/monero_c/release/monero/aarch64-apple-ios${simulator}_libwallet2_api_c.dylib" -output MoneroWallet

echo "Generated ${FRWK_DIR}"
FRWK_DIR="${IOS_DIR}/WowneroWallet.framework"
cd $FRWK_DIR
lipo -create "../../scripts/monero_c/release/wownero/aarch64-apple-ios${simulator}_libwallet2_api_c.dylib" -output WowneroWallet

# also generate for zano
IOS_DIR="$(pwd)/../../ios"
DYLIB_NAME="zano_libwallet2_api_c.dylib"
DYLIB_LINK_PATH="${IOS_DIR}/${DYLIB_NAME}"
FRWK_DIR="${IOS_DIR}/ZanoWallet.framework"
cd $FRWK_DIR
lipo -create "../../scripts/monero_c/release/zano/aarch64-apple-ios${simulator}_libwallet2_api_c.dylib" -output ZanoWallet

if [ ! -f $DYLIB_LINK_PATH ]; then
echo "Dylib is not found by the link: ${DYLIB_LINK_PATH}"
exit 0
fi

cd $FRWK_DIR # go to iOS framework dir
lipo -create $DYLIB_LINK_PATH -output ZanoWallet

echo "Generated ${FRWK_DIR}"
2 changes: 1 addition & 1 deletion scripts/prepare_moneroc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if [[ ! -d "monero_c/.git" ]];
then
git clone https://github.com/mrcyjanek/monero_c --branch master monero_c
cd monero_c
git checkout 127c54599c612d7d3d226e4c016d5812e7a0966d
git checkout 9301097ff504525070cc0cb915fe2f1bb0670345
git reset --hard
git submodule update --init --force --recursive
./apply_patches.sh monero
Expand Down
1 change: 1 addition & 0 deletions tool/download_moneroc_prebuilds.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ final List<String> triplets = [
// "x86_64-host-apple-darwin", // not available on CI (yet)
"aarch64-host-apple-darwin", // apple silicon macbooks (local builds)
"aarch64-apple-ios",
"aarch64-apple-iossimulator",
];

Future<void> main() async {
Expand Down