Skip to content

Commit 3c433dc

Browse files
committed
1
1 parent d2c1849 commit 3c433dc

File tree

7 files changed

+18
-7
lines changed

7 files changed

+18
-7
lines changed

installer/macOS/KeyChain Installer.xcodeproj/project.pbxproj

+2
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,7 @@
422422
"$(inherited)",
423423
"@executable_path/../Frameworks",
424424
);
425+
MACOSX_DEPLOYMENT_TARGET = 10.10;
425426
PRODUCT_BUNDLE_IDENTIFIER = "io.array.Keychain-Uninstaller";
426427
PRODUCT_NAME = "$(TARGET_NAME)";
427428
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -444,6 +445,7 @@
444445
"$(inherited)",
445446
"@executable_path/../Frameworks",
446447
);
448+
MACOSX_DEPLOYMENT_TARGET = 10.10;
447449
PRODUCT_BUNDLE_IDENTIFIER = "io.array.Keychain-Uninstaller";
448450
PRODUCT_NAME = "$(TARGET_NAME)";
449451
PROVISIONING_PROFILE_SPECIFIER = "";

keychain_lib/src/keychain.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ keychain::keychain()
4848
{
4949
#if defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
5050
auto key_dir = bfs::path(getenv("HOME"));
51-
key_dir += bfs::path("/"KEY_DEFAULT_PATH_);
51+
key_dir += bfs::path("/" KEY_DEFAULT_PATH_);
5252
#else
5353
bfs::path key_dir(KEY_DEFAULT_PATH_);
5454
#endif
@@ -141,4 +141,4 @@ void keychain_app::secure_dlg_mod_base::connect(keychain_app::keychain_base &key
141141
void keychain_app::gui_mod_base::connect(keychain_app::keychain_base &keychain_) const
142142
{
143143
keychain_.select_key.connect(std::bind(&gui_mod_base::select_key, this));
144-
}
144+
}

keychain_lib/src/keychain_logger.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ logger_singleton::logger_singleton(std::string postfix)
2020
{
2121
#if defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
2222
auto dir = bfs::path(getenv("HOME"));
23-
dir += bfs::path("/"LOG_DEFAULT_PATH);
23+
dir += bfs::path("/" LOG_DEFAULT_PATH);
2424
#else
2525
bfs::path dir(LOG_DEFAULT_PATH);
2626
#endif

keychain_lib/src/keyfile_singleton.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void keyfile_singleton::keydata_load()
4747
{
4848
#if defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
4949
auto key_dir = bfs::path(getenv("HOME"));
50-
key_dir += bfs::path("/"KEY_DEFAULT_PATH_);
50+
key_dir += bfs::path("/" KEY_DEFAULT_PATH_);
5151
#else
5252
bfs::path key_dir(KEY_DEFAULT_PATH_);
5353
#endif
@@ -80,7 +80,7 @@ void keyfile_singleton::signlog_load()
8080
{
8181
#if defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
8282
auto dir = bfs::path(getenv("HOME"));
83-
dir += bfs::path("/"SIGN_LOGS_DEFAULT_PATH_);
83+
dir += bfs::path("/" SIGN_LOGS_DEFAULT_PATH_);
8484
#else
8585
bfs::path dir(SIGN_LOGS_DEFAULT_PATH_);
8686
#endif
@@ -263,7 +263,7 @@ void keyfile_singleton::flush_keyfile_impl(const value_t& keyfile_data) const
263263
{
264264
#if defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
265265
auto filepath = bfs::path(getenv("HOME"));
266-
filepath += bfs::path("/"KEY_DEFAULT_PATH_"/");
266+
filepath += bfs::path("/" KEY_DEFAULT_PATH_"/");
267267
#else
268268
bfs::path filepath(KEY_DEFAULT_PATH_"/");
269269
#endif
@@ -310,7 +310,7 @@ void keyfile_singleton::flush_all() const
310310
{
311311
#if defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
312312
auto keyfile_dir = bfs::path(getenv("HOME"));
313-
keyfile_dir += bfs::path("/"KEY_DEFAULT_PATH_);
313+
keyfile_dir += bfs::path("/" KEY_DEFAULT_PATH_);
314314
#else
315315
bfs::path keyfile_dir(KEY_DEFAULT_PATH_);
316316
#endif

keymanager_mac/KeyManager.xcodeproj/project.pbxproj

+2
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,7 @@
476476
"$(inherited)",
477477
"$(PROJECT_DIR)",
478478
);
479+
MACOSX_DEPLOYMENT_TARGET = 10.14;
479480
OTHER_CPLUSPLUSFLAGS = (
480481
"$(OTHER_CFLAGS)",
481482
"-std=c++14",
@@ -548,6 +549,7 @@
548549
"$(inherited)",
549550
"$(PROJECT_DIR)",
550551
);
552+
MACOSX_DEPLOYMENT_TARGET = 10.14;
551553
OTHER_CPLUSPLUSFLAGS = (
552554
"$(OTHER_CFLAGS)",
553555
"-std=c++14",

keymanager_mac/KeyManager/CPlusPlusBridger.mm

+5
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ - (void) reloadData {
5656
- (void) deleteKey:(NSString *)publicKey {
5757
auto& keyfiles = keyfile_singleton::instance();
5858
auto pkey = dev::Public([publicKey UTF8String]);
59+
// keyfiles.remove(pkey, std::bind(&remove_unlock))
5960
// keyfiles.remove(pkey, std::bind(&remove_unlock, my_unlock_functor));
6061
}
6162

@@ -65,6 +66,7 @@ - (void) deleteKey:(NSString *)publicKey {
6566
NSLog(@"publicKey %@", publicKey);
6667
printf("%s", [publicKey UTF8String]);
6768
auto pkey = dev::Public([publicKey UTF8String]);
69+
try {
6870
auto& logs = keyfiles.get_logs(pkey);
6971
for (NSUInteger i = 0; i < std::distance(logs.begin(), logs.end()); i++) {
7072
auto& log = logs[i];
@@ -96,6 +98,9 @@ - (void) deleteKey:(NSString *)publicKey {
9698
// logItem.transaction = log.transaction;
9799
[logsArray addObject:logItem];
98100
}
101+
} catch (fc_light::exception& e) {
102+
NSLog(@"%@", [NSString stringWithUTF8String: e.to_detail_json_string().c_str()]);
103+
}
99104
return logsArray;
100105
}
101106

keymanager_mac/KeyManager/ViewController.swift

+2
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ class ViewController: NSViewController, NSTableViewDelegate, NSTableViewDataSour
8686
}
8787
} else if tableView == self.transactionTableView {
8888
if selectedPublicKey != "" {
89+
print("self.transactionTableView")
8990
let log = CPlusPlusBridger().getTransactionLog(forPublicKey: selectedPublicKey)
9091
}
9192
}
@@ -98,6 +99,7 @@ class ViewController: NSViewController, NSTableViewDelegate, NSTableViewDataSour
9899
return CPlusPlusBridger().getKeyfilesCount()
99100
} else {
100101
if selectedPublicKey != "" {
102+
print("numberOfRows")
101103
return CPlusPlusBridger().getTransactionLog(forPublicKey: selectedPublicKey).count
102104
} else {
103105
return 0

0 commit comments

Comments
 (0)