diff --git a/Frameworks/CrashReporter/src/CrashReporter.mm b/Frameworks/CrashReporter/src/CrashReporter.mm index 61cb5b5a..afd51c21 100644 --- a/Frameworks/CrashReporter/src/CrashReporter.mm +++ b/Frameworks/CrashReporter/src/CrashReporter.mm @@ -1,5 +1,6 @@ #import "CrashReporter.h" #import "find_reports.h" +#import #import #import #import @@ -101,7 +102,11 @@ namespace _has_sent.insert(reportsSent.begin(), reportsSent.end()); std::vector updatedHasSent; std::set_intersection(_could_send.begin(), _could_send.end(), _has_sent.begin(), _has_sent.end(), back_inserter(updatedHasSent)); - CFPreferencesSetAppValue((CFStringRef)kUserDefaultsCrashReportsSent, cf::wrap(updatedHasSent), kCFPreferencesCurrentApplication); + + NSMutableArray* array = [NSMutableArray array]; + for(auto path : updatedHasSent) + [array addObject:[NSString stringWithCxxString:path]]; + [[NSUserDefaults standardUserDefaults] setObject:array forKey:kUserDefaultsCrashReportsSent]; delete this; } diff --git a/Frameworks/CrashReporter/target b/Frameworks/CrashReporter/target index e8683777..024fd333 100644 --- a/Frameworks/CrashReporter/target +++ b/Frameworks/CrashReporter/target @@ -1,5 +1,8 @@ SOURCES = src/*.{mm,cc} EXPORT = src/CrashReporter.h -LINK += cf ns io plist network +LINK += cf ns io plist network OakFoundation FRAMEWORKS = Foundation AddressBook LIBS += z + +OBJCXX_FLAGS += -fobjc-arc +LN_FLAGS += -fobjc-arc-cxxlib=libc++