Skip to content

Commit

Permalink
fix(mac): fix location of Ti.Filesystem.applicationDataDirectory on m…
Browse files Browse the repository at this point in the history
…acos
  • Loading branch information
sgtcoolguy committed Sep 14, 2020
1 parent cef94e7 commit 9caf847
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions iphone/Classes/FilesystemModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,13 @@ - (NSString *)applicationSupportDirectory

- (NSString *)applicationDataDirectory
{
#if TARGET_OS_MACCATALYST
NSString *home = NSHomeDirectory();
return [NSString stringWithFormat:@"%@/Documents/", fileURLify(home)];
#else
// TODO: Unify these. Appending /Documents to the home directory appears to give the same path as below code for ios sim (probably also device)
return [NSString stringWithFormat:@"%@/", fileURLify([NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0])];
#endif
}
GETTER_IMPL(NSString *, applicationDataDirectory, ApplicationDataDirectory);

Expand Down

0 comments on commit 9caf847

Please sign in to comment.