diff --git a/CHANGELOG.md b/CHANGELOG.md index 571d0ed..c1cc01f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +- fixed: Remove invalid const qualifier from std::vector element types to fix Xcode 26 builds + ## 0.2.6 (2026-01-29) - changed: Update `zano_native_lib` to `239d4a39` diff --git a/ios/ZanoModule.mm b/ios/ZanoModule.mm index 496bfea..c011578 100644 --- a/ios/ZanoModule.mm +++ b/ios/ZanoModule.mm @@ -18,7 +18,7 @@ + (BOOL)requiresMainQueueSetup { return NO; } // Re-package the arguments: NSUInteger length = [arguments count]; - std::vector strings; + std::vector strings; strings.reserve(length); for (NSUInteger i = 0; i < length; ++i) { NSString *string = [arguments objectAtIndex:i]; diff --git a/src/jni/jni.cpp b/src/jni/jni.cpp index e5b6cc3..3e79f28 100644 --- a/src/jni/jni.cpp +++ b/src/jni/jni.cpp @@ -23,7 +23,7 @@ Java_app_edge_rnzano_RnZanoModule_callZanoJNI( // Re-package the arguments: jsize length = env->GetArrayLength(arguments); - std::vector strings; + std::vector strings; strings.reserve(length); for (jsize i = 0; i < length; ++i) { jstring string = (jstring)env->GetObjectArrayElement(arguments, i); diff --git a/src/zano-wrapper/zano-methods.cpp b/src/zano-wrapper/zano-methods.cpp index f1e2119..809ddfe 100644 --- a/src/zano-wrapper/zano-methods.cpp +++ b/src/zano-wrapper/zano-methods.cpp @@ -4,12 +4,12 @@ #include "zano-methods.hpp" -std::string hello(const std::vector &args) { +std::string hello(const std::vector &args) { printf("Zano says hello\n"); return "hello"; } -std::string init(const std::vector &args) { +std::string init(const std::vector &args) { return plain_wallet::init( args[0], // address args[1], // cwd @@ -17,7 +17,7 @@ std::string init(const std::vector &args) { ); } -std::string initWithIpPort(const std::vector &args) { +std::string initWithIpPort(const std::vector &args) { return plain_wallet::init( args[0], // ip args[1], // port @@ -26,112 +26,112 @@ std::string initWithIpPort(const std::vector &args) { ); } -std::string reset(const std::vector &args) { +std::string reset(const std::vector &args) { return plain_wallet::reset(); } -std::string setLogLevel(const std::vector &args) { +std::string setLogLevel(const std::vector &args) { return plain_wallet::set_log_level(std::stoi(args[0])); } -std::string getVersion(const std::vector &args) { +std::string getVersion(const std::vector &args) { return plain_wallet::get_version(); } -std::string getWalletFiles(const std::vector &args) { +std::string getWalletFiles(const std::vector &args) { return plain_wallet::get_wallet_files(); } -std::string getExportPrivateInfo(const std::vector &args) { +std::string getExportPrivateInfo(const std::vector &args) { return plain_wallet::get_export_private_info(args[0]); } -std::string deleteWallet(const std::vector &args) { +std::string deleteWallet(const std::vector &args) { return plain_wallet::delete_wallet(args[0]); } -std::string getAddressInfo(const std::vector &args) { +std::string getAddressInfo(const std::vector &args) { return plain_wallet::get_address_info(args[0]); } -std::string getAppconfig(const std::vector &args) { +std::string getAppconfig(const std::vector &args) { return plain_wallet::get_appconfig(args[0]); } -std::string setAppconfig(const std::vector &args) { +std::string setAppconfig(const std::vector &args) { return plain_wallet::set_appconfig(args[0], args[1]); } -std::string generateRandomKey(const std::vector &args) { +std::string generateRandomKey(const std::vector &args) { return plain_wallet::generate_random_key(std::stoull(args[0])); } -std::string getLogsBuffer(const std::vector &args) { +std::string getLogsBuffer(const std::vector &args) { return plain_wallet::get_logs_buffer(); } -std::string truncateLog(const std::vector &args) { +std::string truncateLog(const std::vector &args) { return plain_wallet::truncate_log(); } -std::string getConnectivityStatus(const std::vector &args) { +std::string getConnectivityStatus(const std::vector &args) { return plain_wallet::get_connectivity_status(); } -std::string open(const std::vector &args) { +std::string open(const std::vector &args) { return plain_wallet::open(args[0], args[1]); } -std::string restore(const std::vector &args) { +std::string restore(const std::vector &args) { return plain_wallet::restore(args[0], args[1], args[2], args[3]); } -std::string generate(const std::vector &args) { +std::string generate(const std::vector &args) { return plain_wallet::generate(args[0], args[1]); } -std::string getOpenedWallets(const std::vector &args) { +std::string getOpenedWallets(const std::vector &args) { return plain_wallet::get_opened_wallets(); } -std::string getWalletStatus(const std::vector &args) { +std::string getWalletStatus(const std::vector &args) { return plain_wallet::get_wallet_status(std::stoll(args[0])); } -std::string closeWallet(const std::vector &args) { +std::string closeWallet(const std::vector &args) { return plain_wallet::close_wallet(std::stoll(args[0])); } -std::string invoke(const std::vector &args) { +std::string invoke(const std::vector &args) { return plain_wallet::invoke(std::stoll(args[0]), args[1]); } -std::string asyncCall(const std::vector &args) { +std::string asyncCall(const std::vector &args) { return plain_wallet::async_call(args[0], std::stoull(args[1]), args[2]); } -std::string tryPullResult(const std::vector &args) { +std::string tryPullResult(const std::vector &args) { return plain_wallet::try_pull_result(std::stoull(args[0])); } -std::string syncCall(const std::vector &args) { +std::string syncCall(const std::vector &args) { return plain_wallet::sync_call(args[0], std::stoull(args[1]), args[2]); } -std::string isWalletExist(const std::vector &args) { +std::string isWalletExist(const std::vector &args) { bool exists = plain_wallet::is_wallet_exist(args[0]); return std::to_string(exists); } -std::string getWalletInfo(const std::vector &args) { +std::string getWalletInfo(const std::vector &args) { return plain_wallet::get_wallet_info(std::stoll(args[0])); } -std::string resetWalletPassword(const std::vector &args) { +std::string resetWalletPassword(const std::vector &args) { return plain_wallet::reset_wallet_password(std::stoll(args[0]), args[1]); } -std::string getCurrentTxFee(const std::vector &args) { +std::string getCurrentTxFee(const std::vector &args) { uint64_t fee = plain_wallet::get_current_tx_fee(std::stoull(args[0])); return std::to_string(fee); } diff --git a/src/zano-wrapper/zano-methods.hpp b/src/zano-wrapper/zano-methods.hpp index 1ffe3ea..cd04388 100644 --- a/src/zano-wrapper/zano-methods.hpp +++ b/src/zano-wrapper/zano-methods.hpp @@ -7,7 +7,7 @@ struct ZanoMethod { const char *name; int argc; - std::string (*method)(const std::vector &args); + std::string (*method)(const std::vector &args); }; extern const ZanoMethod zanoMethods[]; extern const unsigned zanoMethodCount;