Files Not Persisting

  1. 5 years ago

    cjp160

    5 Nov 2018 User since 2018

    I am trying to store some user generated files (e.g. settings/preferences) in my app, but the data is not persisting across app sessions. The FileManager is global and the directory is "Document". In the Mac simulator it seems to work fine but when I test it on either the CreoPlayer or through TestFlight, the data does not persist after I quit out of the app. Can anyone provide any guidance?

  2. marco

    6 Nov 2018 Administrator User since 2016

    @cjp160 can I have more details? How do you check if a file exists? Can I see some code (of the project)?

  3. marco

    6 Nov 2018 Administrator User since 2016

    @cjp160 I wrote a sample app and everything seems to work as expected to me

  4. cjp160

    7 Nov 2018 User since 2018

    This worked as expected on my Mac but it doesn't work on CreoPlayer. I hit 'add' and nothing shows up, not even if I hit 'refresh'. For reference, I'm on an iPhone X running iOS 12.01

  5. marco

    7 Nov 2018 Administrator User since 2016

    That's really strange. I personally tested it on CreoPlayer (iOS 12.01) and everything worked as expected. Which CreoPlayer version are you running?

  6. cjp160

    7 Nov 2018 User since 2018

    CreoPlayer is version 1.2.1 Build 7415.

    I've ran some more tests and it seems my FileManager is unable to delete Files. I've attached my project code for reference. The idea is to let a user specify an IP address to stream images to, and save that IP address so the user doesn't have to re-enter it each time they load the app. Let me know if you see any glaring errors, but on my phone the line "FileManager1.delete("server_address");" returns false, so it can't create a new file in the subsequent lines.

    Also, if there is a better way to simply update the contents of a File, please let me know. I've tried Writing and Updating the string in the file but they don't work.

  7. cjp160

    7 Nov 2018 User since 2018

    Project attached

  8. marco

    7 Nov 2018 Administrator User since 2016

    I am unable to run your project (see attached screenshot).

or Sign Up to reply!