Changing directories for storage on tvOS because tvOS does not allow permanent storage

This commit is contained in:
Diego Waxemberg
2018-08-26 21:54:49 -07:00
parent 293dc26b2e
commit 44550baaa9
2 changed files with 16 additions and 6 deletions
+3 -1
View File
@@ -142,7 +142,9 @@ static NSOperationQueue* mainQueue;
}
- (NSURL*) getStoreURL {
#if TARGET_OS_IPHONE
#if TARGET_OS_TV
return [[[[NSFileManager defaultManager] URLsForDirectory:NSCachesDirectory inDomains:NSUserDomainMask] lastObject] URLByAppendingPathComponent:@"Moonlight_tvOS.sqlite"];
#elif TARGET_OS_IPHONE
return [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"Limelight_iOS.sqlite"];
#else
return [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"moonlight_mac.sqlite"];