update target ios version to 12

This commit is contained in:
zhl 2023-02-17 14:00:37 +08:00
parent 740ca8fa3d
commit 30d6546611
2 changed files with 12 additions and 7 deletions

View File

@ -1926,7 +1926,7 @@
); );
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES; GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES;
HEADER_SEARCH_PATHS = ""; HEADER_SEARCH_PATHS = "";
IPHONEOS_DEPLOYMENT_TARGET = 9.0; IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/../external/ios/libs\""; LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/../external/ios/libs\"";
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "-DCC_NEW_RENDERER"; OTHER_CFLAGS = "-DCC_NEW_RENDERER";
@ -1973,7 +1973,7 @@
); );
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES; GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES;
HEADER_SEARCH_PATHS = ""; HEADER_SEARCH_PATHS = "";
IPHONEOS_DEPLOYMENT_TARGET = 9.0; IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/../external/ios/libs\""; LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/../external/ios/libs\"";
ONLY_ACTIVE_ARCH = NO; ONLY_ACTIVE_ARCH = NO;
OTHER_CFLAGS = ""; OTHER_CFLAGS = "";

View File

@ -335,15 +335,21 @@ void Application::showQRCode(const std::string &content, const std::string &titl
NSString *ntitle = [NSString stringWithCString:title.c_str() encoding:NSUTF8StringEncoding]; NSString *ntitle = [NSString stringWithCString:title.c_str() encoding:NSUTF8StringEncoding];
NSString *ncontent = [NSString stringWithCString:content.c_str() encoding:NSUTF8StringEncoding]; NSString *ncontent = [NSString stringWithCString:content.c_str() encoding:NSUTF8StringEncoding];
NSString *noid = [NSString stringWithCString:val.c_str() encoding:NSUTF8StringEncoding]; NSString *noid = [NSString stringWithCString:val.c_str() encoding:NSUTF8StringEncoding];
UIWindow* window = [[[UIApplication sharedApplication] delegate] window]; dispatch_async(dispatch_get_main_queue(), ^{
[window.rootViewController showRestoreQR:ncontent title:ntitle oid: noid]; UIWindow* window = [[[UIApplication sharedApplication] delegate] window];
[window.rootViewController showRestoreQR:ncontent title:ntitle oid: noid];
});
} }
void Application::saveKeyLocal(const std::string &account, const std::string &key) { void Application::saveKeyLocal(const std::string &account, const std::string &key) {
NSString *naccount = [NSString stringWithCString:account.c_str() encoding:NSUTF8StringEncoding]; NSString *naccount = [NSString stringWithCString:account.c_str() encoding:NSUTF8StringEncoding];
NSString *nkey = [NSString stringWithCString:key.c_str() encoding:NSUTF8StringEncoding]; NSString *nkey = [NSString stringWithCString:key.c_str() encoding:NSUTF8StringEncoding];
UIWindow* window = [[[UIApplication sharedApplication] delegate] window]; dispatch_async(dispatch_get_main_queue(), ^{
[window.rootViewController saveKey:naccount key: nkey]; UIWindow* window = [[[UIApplication sharedApplication] delegate] window];
[window.rootViewController saveKey:naccount key: nkey];
});
} }
void Application::loadKeyLocal(const std::string &account, std::string *outItem) { void Application::loadKeyLocal(const std::string &account, std::string *outItem) {
@ -356,7 +362,6 @@ void Application::loadKeyLocal(const std::string &account, std::string *outItem)
} else { } else {
outItem->assign(""); outItem->assign("");
} }
} }
void Application::toWallet(const std::string &url) { void Application::toWallet(const std::string &url) {