Remove iOS app from command line - ios

So we're building this iOS application. We have performance tests that are automatically run by Jenkins. Of course these tests must be run on the device.
Right now we have a lot of trouble with some tests, and I suspect that they don't clean up after themselves, leaving the app's Documents folder in an uncertain state. Obviously I can fix the cleanup, but this will take a huge time.
I'd love to be able to just delete the app from the device before running the tests. Is there any way we can do this via xcodebuild or any other automatable tool. Could be even applescript or a non-official tool. The only rule is that we may not jailbreak the device.

One multi-platform option is libimobiledevice and the ideviceinstaller utility. It runs on Linux, Mac and Windows and even supports iOS 9.
As noted in the library webpage, it does not depend on jailbreak.
To delete an app do:
ideviceinstaller -uninstall com.somecompany.someapp

Related

Alternatives to full Xcode install for simulator

I've been tasked with building a demo suite of our iOS application for our sales team to run on their laptops.
I know that I can install Xcode on their machines and then create a shortcut for the simulator, but that feels really heavyweight for our sales folks.
I've used my google foo and I see that there are several choices in the windows world, but I've not seen an alternative for OS X. Does anyone have suggestions for a standalone iOS emulator on OS X?
I suggest you do the following:
Install Xcode.app on your system
Build & Run your demo app, targeting each sim device you want them to demo (or use xcrun simctl install /path/to/your/built.app)
Make a tarball of ~/Library/Developer/CoreSimulator/Devices
Untar that tarball into ~/Library/Developer/CoreSimulator/Devices on each demo machine.
Install Xcode.app on each demo machine and just place Simulator.app in the Dock.
If you're really concerned about disk space, you can delete a bunch of things inside of Xcode.app that aren't needed, but make sure you keep CoreSimulator.framework, SimulatorKit.framework, Simulator.app, simctl, and anything that has "CoreSimulator" as a parent directory.
Have you tried https://appetize.io/?
I've used a few demos in the browser and it seems like a very lightweight way to at least demo an app (although performance is suffers a little since its in a web browser).

How to automate iPhone jail break by writing Shell or any scripts?

Am trying to jail break the iOS devices automatically. We are working on Jail broken devices and we want to jail break 100's of iOS device. It is not possible to do manual jail break the bunch of devices and install the required packages (Cydia).
I don't have experience on any Scripting languages. If anyone already tried this before please share your experience and that would be guide me to do this. Am welcoming your suggestions and ideas. Thanks in advance.
I don't think so. First, you need to jailbreak them - it requires connecting them to your PC through USB and using jailbreak tools which do not support any automation (at least the recent ones). Then you need to manually install afc2 daemon to gain access to root folder - without it you can't even copy any deb packages on your device because filesystem is still jailed. Only then you can copy a bunch of deb packages to cydia auto install folder but still need to manually reboot devices to install them.
To do any kind of automation you need at least OpenSSH installed which is not installed by default. So I don't think you can do much here.

How do you run DalekJS on iOS?

I've got DalekJS running really well on WinLin, but am interested to know exactly what the process is for running it on iOS.
http://dalekjs.com/docs/ios.html
When running on Windows, for example, I install the DalekJS npm globally, and then install the IE web-driver, before executing my test suite.
On iOS am I expected to do the same thing? Can you install NodeJS on an iPhone? Is there a difference in doing it on the actual device, vs doing it through the emulator?
Also, what are the current obstacles in making it run on iPad?
Thanks!
Dalek will not run on the IPad/Iphone etc. itself (neither will or must NodeJS), it uses the native debugging tools that come with the dev environment through Appium.
Unfortunately, due to some changes that happened in MacOS 10.8 & 10.9 (Changes in the user rights management, etc.) it can only do this in the simulator. We are working on bringing back support for "real" devices with the next version of DalekJS.

simple kivy application not running on android?

i'm trying to run kivy examples on my android emulator, i can build them and install them on my device without any problem but i can't start them. does anybody have this problem too?
i'm using android API 18 as target.
You can run adb logcat, then try to start your app. After it crashes, you can ctrl+c to stop logcat and search for "died". Your error should be shown a few lines before it says your app died.
First thing, I'm not clear...is your problem with an emulator or a device? Or you have different problems on each?
If it's an emulator, make sure you are using a recent android version (I think you need at least 4.1 or something), and it must have hardware acceleration enabled for kivy to work.
Either way, if the app installs but fails to start, that suggests something is crashing it at the initialisation stage. You should plug your device into your computer, enable adb in its developer options, and run adb logcat to see the device log in real time. Run your application, and you will see the initialisation log and any standard python log when the app fails. This should indicate the problem.
The adb tool comes with the android sdk, so you must have it if you built an apk, but you might need to find it manually somewhere in the sdk folder if it isn't already somewhere in your $PATH.
I have same issue in past and I solve by adding requirements in .spec
This requirements work for me:
requirements = hostpython3==3.7.8,python3==3.7.8,kivy==1.11.1, certifi,chardet, lxml, docutils, future, idna, Kivy-Garden, Pygments, requests, six, soupsieve, urllib3, deep-translator, arabic-reshaper, python-bidi, openssl, pyopenssl, numpy, pytz, python-dateutil, pandas, setuptools, zope.interface, datetime
you have to write all modules and parent module in requirements which your app is using.
To know module which you app is using has two method:
run command pip freeze in current app folder in powershell
install all the module as below photo which help to install your application module

Can I sign the iOS app with an AdHoc profile wihtout using XCode?

Preferably using Linux, Windows is also OK.
Something like openssh and zip?
If you can remotely shell into the Mac (ssh), then you should be able to build and sign your project from the command line. It may require some setup beforehand, but xcodebuild and xcrun should get you where you need to go. (This is the same kind of thing folks do to get automated continuous integration builds set up.)
Doesn't get you out of using Xcode or a Mac, but maybe gets you out of having to be physically sitting in front of that Mac to get work done.
Further reading:
Xcode “Build and Archive” from command line
xcodebuild man page
xcrun man page
I would use TeamViewer ( payed version) or other remote desktop software to connect tom office mac mini. Otherwise you will break up the signing license too, beside it is hard to configure the keychain.
It will be very hard to figure out after you have signed a build why it doesn't install at client's PC, because no error messages there.

Resources