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

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.

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.

How to export and run iOS project from Kony Visualizer to Xcode?

I am not used to work with kony platform and I have created simple app but I want to export it and run it as native iOS .xcocdeproj.
Kony Visualizer gives you different ways of building and viewing your app, depending on your needs. In Kony Visualizer Enterprise, you can build your app either from the Product menu, or from a command line. And you can view your built app either by previewing it on a mobile device, or by using device emulators and simulators that you configure. Please refer to this docs link to build for iOS using Kony Visualizer.
Please do this below steps.
once Kar file was build. go to your visualizer installation folder and go to plugins and then you can find com.kony.ios_8.2.28.v201811051627.jar file if you are using 8.2.28 version just for example.
Copy above file and rename it as zip file and unzip it.
once unzip was done inside you can find another zip file please unzip. ( ex: 8.2.28.zip)
you can see folder called VMAppWithKonylib.
now go open command-line tool and go to VMAppWithKonylib location.
now go to gen folder location inside your commandline. gen folder will inside VMAppWithKonylib.
7.now run this command - perl extract.pl konyappiphone.KAR
once extract done now go to VMAppWithKonylib and open project in xcode.
let me know if you are facing any more issues.

How to add an extra file into electron package

I just started my adventure with electron and built an app which uses SQLite.
I use electron-vue and for sqlite I use sql.js package.
And everything is just fine when I compile my app using npm run dev.
The problem begins when I want to package the app. Then except the mac version the db.sqlite is not included into the app so of course, it does not work correctly.
How can I add the database file into a built app that I could then distribute to the client?
I have found kind of solution: I added
"extraFiles": [
"db.sqlite"
],
to the package.json file so now the app works when I start it from ./build/linux-unpacked folder.
I called it kind of solution as it still doesn't work from packaged file. But I guess this can't be helped because of the way the one file package works.
Or maybe somebody knows the solution?

Cordova project from .zip fails to build ios, tries to write to directory from other computer

After successfully creating, building, and emulating Cordova's Hello World project, I unzipped the project folder that I am taking over from another developer on a different machine and saved it locally. While I can run the iOS app from XCode with the built project from the previous developer, I can't run the $ cordova build ios command successfully to rebuild it on my machine.
It give the following output:
The following build commands failed:
Check dependencies
Write auxiliary files
When I run it in debug mode, I notice that both of these commands are trying to make a directory for the old dev's computer (/Users/hisName/whereHePutIt/CordovaProject/stuffItIsTryingToBuild) rather than one relative to my project folder (/Users/myName/whereIPutMine/CordovaProject/stuffItIsTryingToBuild).
There is a lot of text to comb through, but it looks as though it is always failing while attempting to make a directory in /Project/platforms/ios/CordovaLib/build/CordovaLib.build
I am really stumped by this because I can't find any sort of setting or file in the project that tries to write anywhere but a path relative to my project file, and Android builds and emulates fine.
I had a similar issue on Android actually. My home for sdk tools moved but the project still wanted to use the old sdk tools.
The solution I took was to remove the platform and then re-add it. I am sure there is a way of going through the existing files and patching this, but everything you should need is in the plugin/ and www/ and where ever you elected to keep your assets.
If you do try this, make sure to create a backup before removing the platform -- it would be awful to lose changes that someone might have jammed down in the platform/ios folder.
I just ran across this issue under similar circumstances - unzipped a zipped copy of a iOS Cordova app from a coworkers computer to continue developing it, and found I could not successfully run the cordova build command.
I managed to get this to work by deleting the old "Debug-iphonesimulator" folders that had been zipped up with the rest of the project from the other computer, and then re-running the build command.
There were two folders that I deleted:
"../ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator"
and
"../ios/build/ProjectName.build/Debug-iphonesimulator"
Hope this helps someone!

Deploying File On iOS Device delphi xe

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

Resources