Deploying File On iOS Device delphi xe - ios

I try to deploy file on iOS from delphi xe5 mobile app, I set remote path in deployment to "startUp\Documents", it is OK on the simulator but on the device there is the following file structure:
MyApp.app
+Documents
+MyApp.app
++Startup
+++Documents
++++MyDBFile
As you can see from above MyDBFile is deployed in the wrong folder, when I copy the file to the first Documents folder everything is OK, I tried .\Startup\Documents and .\Documents and \Documents but nothing changed. Any idea?

Try to set "StartUp\Documents\" (case is important!)
And after get this file:
TPath.Combine(TPath.GetDocumentsPath, 'filename')
More information read on Embarcadero Doc Wiki: Loading and Deploying Files

Related

Cannot access application file in container bundle

I want to access an sqlite database file which I have bundled to my iOS application.
This works fine, because I can see I can read/write from/to the database by the application logic.
If I run the application by the simulator I can find the database here:
file:///Users/<Username>/Library/Developer/CoreSimulator/Devices/<DeviceID>/data/Containers/Bundle/Application/<ApplicationID>/<AppName>/test.db
But if I run the application on a real device it seems difficult to access the data, In Xcode I've tried to export the container in "Devices and simulators", download it, open the package content of the .xcappdata file but I can't find the file "test.db":
Where and How can I access the file?
Xcode will not import the Application part which contains the binary and all the files you bundle with it.
When working with an file which is bundled in your app it is better to copy it into Library or Document directory the first time the application is run. So you never modify the bundle one which should only be a init file and not a working file.
When it is in Document or Library, you can then get it via xCode.

Worklight - FWLST1040E: ipad build failed: Cannot overwrite template file

I'm using worklight for my mobile app project using eclipse. My problem is I cant build ipad native. I got this error during build.
FWLST1040E: ipad build failed: com.worklight.builder.exception.WorklightBuildRuntimeException: Resource Manager - Problem reading info.plist file
I already use this technique but the problem still occur. Why?
Try the following:
Delete the native folder
Close Eclipse
Open Terminal.app and write: open $TMPDIR
Delete the wlBuildResources folder
Open Eclipse
Build the application
I had deleted my iPad environment, but after I created a new one, I followed this, and it worked.
Try the following:
Delete the native folder
Close Eclipse
Open Terminal.app and write: open $TMPDIR
Delete the wlBuildResources folder
Open Eclipse
Build the application

Phonegap + Blackberry webworks : ant build not generating standardinstall.zip

I am trying to build a BlackBerry 7 and earlier project that uses the WebWorks SDK using Phonegap 2.9; but the build doesn't generate the StandardInstall.zip file as it's supposed to.
The project I'm trying to build is the example app found in the Phonegap 2.9 download (phonegap-2.9.0\lib\blackberry\bbos\example).
I followed the instructions in the Phonegap documentation and there is an overview of my environment:
My OS is Windows XP, I've got JDK, ANT and BlackBerry device manager installed. I've also installed the BlackBerry Webworks SDK and I've setup my Signing Keys (sigtool.csk and sigtool.db are in the bin folder of the webworks installation).
I also updated the project.properties file as explained in the documentation.
When I try to build the app, It doesn't print any error message, but the OTAInstall and StandardInstall folders are not generated (all I get is the zipped application folder and a widget folder).
I also tried deploying to simulator and to device, the errors thrown confirm just that the build step doesn't generate the files it should.
Screenshots: http://i.stack.imgur.com/XpN4M.png
Solutions I already tried:
JDK version problem
I downgraded JDK to 1.6.0_30 version (it seems that the Webworks SDK doesn't work with upper versions); but it didn't change anything.
White spaces
I also tried to avoid white spaces in paths like advised in other posts but it doesn't work:
C:
├ \ant
├ \java
└ \webworks
I don't know what else to do, any help would be much appreciated !
To make a blackberry phonegap project, the things you need are:
Phonegap (cordova libs)
BlackBerry WebWorks SDK
Ant, through which you will build your project.(Also add 'ANT' in you environment variables).
The steps to create a phonegap build:
Open the phonegap sample that came with it. Follow the location -
phonegap-2.3.0\lib\blackberry\sample
Copy cordova folder as you see the sample folder
Copy lib and www folder also. The lib folder contains the cordova library. The www folder is the only place for your files.
It contains your html, css, js and the config.xml
Copy blackberry.xml, build.xml and project.properties files.(change the properties in these files as per your project configurations)
'Build' folder is created once you run the script 'ant blackberry build'(To build the project) or 'ant blackberry load-simulator'(Build and run on simulator) or 'ant blackberry load-device'
Once you have built the project you can run it on device using the .cod files.
When you run the above build scripts you get the build folder in your PhonegapBlackberry project which looks like:
Setting the correct Java jdk home path in bbwp.properties file of my <BlackBerry SDK>/bin folder works for me.
Thanks,
prodeveloper.

How do I install a replacement database file?

How do I clear out old databases in sqlite3? (version 3.7.12)
I am building an iOS (Xcode) app using sqlite3.
I deleted the dbase file (in /Users/xx/Library/Application Support/iPhone Simulator/6.1/Applications/nnn/Documents). I destroyed the copy in the xcode navigation panel. I trashed the copy in the project bundle. And I removed its reference in Build Phases/Copy Bundle Resources.
As a test, I did not try to put in a new db file. Only the source code remains [[SQFXDB alloc] initWithSQFXDBFilename:#"sqfx_v4b"];.
And build succeeds. And Run succeeds. And the data is still there in the simulator. And a new database file has been created in the ../Documents dir. All the original data is there.
Can anyone enlighten me?
Thanks, Dave
Delete app from simulator/Reset Contents and Settings for simulator - run from XCode

XCode: Run script after application unitest to copy files from device

I run an application test from XCode on my device.
The test creates some files on the device.
After the tests has finihsed i would like to copy these file from the device to my machine.
Does anyone know how to achieve that?
I am using XCode 4.6.2
thanks
Christian
Assuming the files are created in the Documents directory, you can use iTunes file sharing to get the files.
Here's a tutorial
EDIT based on comment
Not sure if this fits your use case - you could try integration with the Dropbox API. Your app, once the files are created, can sync the files in a Dropbox folder. You can have the Windows/Mac app installed to have the files synced to your computer as well.

Resources