Terminating app due to uncaught exception 'IOException', reason: 'File cannot be created'
*** First throw call stack:
(
0 CoreFoundation 0x000000011062ec65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x00000001102c7bb7 objc_exception_throw + 45
2 SparkseePractObjC 0x000000010facf9ae _wrap_sparksee_gdb_STSPlatformStatistics_getNumCPUs + 0
3 SparkseePractObjC 0x000000010faf670e _wrap_sparksee_gdb_STSSparksee_create + 623
4 SparkseePractObjC 0x000000010fb260fe _ZNSt3__113__vector_baseIPN8sparksee3gdb5ValueENS_9allocatorIS4_EEED2Ev + 34620
5 SparkseePractObjC 0x000000010f9ad30d main + 205
6 libdyld.dylib 0x0000000112b26145 start + 1
7 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
- (NSString *) applicationDocumentsDirectory
{
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *basePath = ([paths count] > 0) ? [paths objectAtIndex:0] : nil;
return basePath;
}
NSString *workDir = [self applicationDocumentsDirectory];
NSString *dbFile = [workDir stringByAppendingString: @"/HelloSparksee.gdb"];
NSString *logFile = [workDir stringByAppendingString: @"/HelloSparksee.log"];
STSSparkseeConfig *cfg = [[STSSparkseeConfig alloc] init];
[cfg setLogFile: logFile];
[cfg setLicense: @"XXXXX-XXXXX-XXXXX-XXXXX"];
STSSparksee *sparksee = [[STSSparksee alloc] initWithConfig: cfg];
STSDatabase *db = [sparksee create: dbFile alias: @"HelloSparksee"];