Hi!
I'm are testing my app on iPad1. In my source code I use two kind to access files. One using READBYTE, WRITEBYTE... and other files using INIGET$ and INIPUT...
On Windows all work perfectly, but on iPad only works file byte handling... INI files maybe not loaded correctly... and not save nothing too...
Any notice about this matter?
Regards.
to save a ini file reopen the file, that works for me :S
Remember, on iPhone/iPad you can only write to files in certain folders, you should use PLATFORMINFO$("DOCUMENTS"). I'm not sure but maybe PLATFORMINFO$("APPDATA") also works.
Here's an example of how I do it in my game, and this works also on iOS:
CONSTANT SETTINGS_FILE$ = "/mygame.ini"
// save settings
INIOPEN PLATFORMINFO$("DOCUMENTS") + SETTINGS_FILE$
INIPUT "gamesettings", "level", CurrentLevelNr
INIOPEN ""
// load settings
INIOPEN PLATFORMINFO$("DOCUMENTS") + SETTINGS_FILE$
CurrentLevelNr = INIGET$("gamesettings", "level", "1") // 1 = default level
INIOPEN ""
Yes, on IOS, you need to write to the documents folder or it will fail.
I've also had a similar issue on IOS with opening files that dont exist in order to create a new player save file, it works on Windows, but on IOS I see it crash on my xcode when I'm running it on the device. The work around I have at the moment is to have a dummy blank file already existing for the player slots, but it would be nice to know whats causing this on IOS only and how I could resolve it.
Hi!
My PATH are correct...
I use the SAME path for both files (bin/ini)...
INI save/load get xcode log error for write/read...
I'm converted my INI values to byte and used ONLY readbyte/writebyte...
:blink:
@tatakamucher: How? Can you explain?
ruta$=PLATFORMINFO$("Documents")
INIOPEN ruta$+"/example.ini"
INIPUT "hello", "hello1", 1
INIOPEN ruta$+"/example.ini"
Quote from: tatakamucher on 2012-Apr-05
ruta$=PLATFORMINFO$("Documents")
INIOPEN ruta$+"/example.ini"
INIPUT "hello", "hello1", 1
INIOPEN ruta$+"/example.ini"
THANKS!!!! I try in next use of files.... :good: