9189

Operation not permitted when trying to create a TFileStream Object on iOS8

Question:

I am converting a Delphi windows app to be multi platform, a crucial part of the application is to be able to export some data files from an SQLite database to the host machine.<br /> It works absolutely fine on windows and OSX, but when I deploy it to an iPad I get an error message stating :

Cannot create file "/var/mobile/Containers/Bundle/Application/9FFD6B02-1B3A-4F07-XXXXXXXXXXXXXXXXXX/AAG_Multi.app/Text/Templates/full Transcript.dwt Operation not permitted

I tried TMemorystream as well, same result. The directory should exist as I called Tdirectory.Creatdirectory(fullPath) immediately prior to the TStreamCreate Line.

Answer1:

You are not allowed to write to the application bundle.

You need to write to a directory that is writeable. For instance, TPath.GetHomePath would return a directory to which you could write. Exactly what directory you should use, probably only you can decide.

Recommend

  • Segmentation Faults when Running MEX Files in Parallel
  • How to set Eclipse CDT to use GCC-4 instead of GCC?
  • Using JNA to Get NSWindow from JComponent on mac
  • Kubernetes 1.7 on Google Cloud: FailedSync Error syncing pod, SandboxChanged Pod sandbox changed, it
  • Docker container for google cloudML on compute engine - authenticating for mounting bucket
  • how tensorflow worker driver training process and cause variables update on ps job?
  • Repainting JPanel after button click
  • 1º Day of Daylight Saving Time Java and JS showing a different behavior
  • WP7 - read from CSV file? Or what to do with the data?
  • cordova build android throws error on Ubuntu 12.04
  • Unique SMS sender id?
  • jQueryMobile, Ajax Navigation, and MVC
  • CKeditor stripping font tags instead of converting to span
  • Which browser have this strange user agent? (IOS device)
  • Basic defensive programming [duplicate]
  • Draw half infinite lines?
  • How to handle elastic beanstalk deployment so it uploads only changed files
  • Is there a way to save the selected text and highlight it again once the page is refreshed?
  • Unexpected token ILLEGAL while running node.js mocha test
  • Installing iPhone App to iPhone
  • Atlas images wrong size on iPad iOS 9
  • NHibernate Validation Localization with S#arp Architecture
  • Exchange data b/w iOS devices using Bluetooth 4.0
  • How can I send an e-mail from a vbs script
  • Dynamically accessing properties of knockoutjs observable array
  • Jenkins: How To Build multiple projects from a TFS repository?
  • Launch Runnable Jar from Web Start
  • Accessing IRQ description array within a module and displaying action names
  • Sony Xperia Z Tablet not found by adb
  • How to recover from a Spring Social ExpiredAuthorizationException
  • ILMerge & Keep Assembly Name
  • Large data - storage and query
  • How can I estimate amount of memory left with calling System.gc()?
  • WOWZA + RTMP + HTML5 Playback?
  • CSS Applying specific rule for a specific monitor resolution with only CSS is posible?
  • Hits per day in Google Big Query
  • FormattedException instead of throw new Exception(string.Format(…)) in .NET
  • Getting Messege Twice Using IMvxMessenger
  • Linking SubReports Without LinkChild/LinkMaster
  • XCode 8, some methods disappeared ? ex: layoutAttributesClass() -> AnyClass