2
0
Mark Sibly 7 жил өмнө
parent
commit
b308118d9a

+ 2 - 0
modules/std/filesystem/filesystem.monkey2

@@ -188,6 +188,8 @@ Function AssetsDir:String()
 	'Return ExtractDir( AppDir() )+"/Resources/"	'enable me!
 #Else If __DESKTOP_TARGET__ Or __WEB_TARGET__
 	Return AppDir()+"assets/"
+#Else If __TARGET__="ios"
+	Return GetSpecialDir( "assets" )
 #Else
 	Return "asset::"
 #Endif

+ 10 - 2
modules/std/filesystem/native/filesystem.mm

@@ -7,9 +7,17 @@ bbString bbFileSystem::getSpecialDir( bbString name ){
 
 	NSString *dir=0;
 
-	if( name=="internal" ){
+	if( name=="assets" ){
+		
+		dir=[[NSBundle mainBundle] resourcePath];
+		
+		dir=[dir stringByAppendingString:@"/assets"];
+		
+	}else if( name=="internal" ){
+	
+		dir=NSHomeDirectory();
 	
-		dir=[@"~/Documents" stringByExpandingTildeInPath];
+//		dir=[@"~/Documents" stringByExpandingTildeInPath];
 		
 	}else if( name=="external" ){	//?