When you build an app, and directly install it on your iOS device as normal using Xcode, the application will be sandboxed on the device.
However, I would like to build the app straight into /Applications/ so that the application will not be sandboxed and therefore, I will be able to access the SMS database (var/mobile/Library/SMS/sms.db)
Edit---- Editor
(Editors Fault)
The OP mentioned in his original question that the application would be for a Jailbroken iOS Device, hence the 'jailbreak' tag. Apologies on my (the editors) behalf.
You can check out iOSOpenDev for an alternate toolset to use.
But, also, if your phone is jailbroken, you can use Cydia to install OpenSSH. With SSH installed, and the SSH daemon running, you can just log in to the phone and simply move the application directory (e.g. /var/mobile/Applications/*/MyAppName.app) to /Applications. You might need to change permissions with chown or chmod to make MyAppName.app and its contents have the same ownership/permissions as the other apps in /Applications.
ssh root#iphone-wifi-ip
find /var/mobile/Applications/ -name MyAppName.app
cd /var/mobile/Applications/D76328B1-42F2-4AA0-B1B4-A77796290082/
mv MyAppName.app /Applications/
chown -R mobile.staff /Applications/MyAppName.app
su mobile -c uicache
Obviously, the long unique ID string above will be different for you.
Another option is to use dpkg to package up your apps, and then install them on the device from the command line. But, that might be more work than you're ready for yet.
This is not possible with an app that is sold through the iTunes App Store.
Related
I would Like to know how I can build a release app without registering it to the app store. I would Like to have the APK file and share it with friends for testing purposes without registering the app. Cant find information connected with this.
Thanks!
UPDATE:
Found solution for getting .ipa file which was installed with Cydia Impactor on a real device:
# flutter build
flutter build ios --release --no-codesign
# make folder, add .app then zip it and rename it to .ipa
mkdir -p Payload
mv ./build/ios/iphoneos/Runner.app Payload
zip -r -y Payload.zip Payload/Runner.app
mv Payload.zip Payload.ipa
# the following are options, remove Payload folder
rm -Rf Payload
You can follow this article to make .ipa file. (.apk is for android only, for iOS it's .ipa)
https://medium.com/mλgnξtλr/how-to-export-a-ipa-file-from-xcode-without-a-dev-account-bac8b2645ad3
Keep in mind that, apple is signing build to be installed on real devices, so you have to turn that off, and after making an ipa file, you can upload it to www.diawi.com and get link from there to share it with your friend. This diawi links are not working some times, in that case you can use cydiaimpector tool for installing the build.
For this installation, your friend has to put their apple id and password upon requested, here NOTE that if your two factor authentication is ON, then you have to create app specific password to be entered in.
How to create app-specific password?
https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&cad=rja&uact=8&ved=2ahUKEwiSvpjUo-fjAhXt8XMBHRtBDlUQFjACegQIDBAI&url=https%3A%2F%2Fwww.imore.com%2Fhow-generate-app-specific-passwords-iphone-ipad-mac&usg=AOvVaw3chF3FoIcfHZLR6jExh_EZ
I wanted to know if there is a way to get the Bundle Version of a iOS App on the phone connected via USB using the command line (from a Mac running on OSX)?
I have seen a solution in which you need to download the IPA application and then unzip it and read the Info.plist file to find the Bundle Version and bundle version string short but I wanted to know if there is a way or tool to directly get the version from the phone without having to download the App/IPA.
Thank you
You can use the ideviceinstaller utility from libimobiledevice.
You can use the -l flag to list all apps installed on the device. Use the -o xml flag to make the utility list the results in an XML format.
On Mac, you can install ideviceinstaller using Homebrew. On Linux, be aware that the copies of libimobiledevice which ship with the various Linux distributions are usually out of date, so you're better off installing from source.
I am currently working on automated testing of Qt-Applications on devices running iOS. So far I am able to install and run these Applications fine, but I am unable to read their output. As far as I understood, reading this issue, Qt uses the gdb server to deliver the output of std::out and std::err to the Qt Creator but I can not get my head around on how to use this information. Besides the bundle identifier, I am given the .ipa-file of the application only. I have access to the applications code but I must not change it.
I use the libmobiledevice libraries to handle all tasks like connection, installation and execution of and on the device.
To summarize: I want to read the debug output of a Qt-written application displayed on my console, like it would be in the "Application output" window of my Creator.
I found a way using the imobiledevice libraries. By calling Idevicedebug -u <uuid> run de.foo.app I was able to execute the application. The qDebug output was prompted to std::out.
As the app crashed when started with a locked screen, I had to check for the display being idle by examining the output of idevicediagnostics ioreg IOPower first.
Now, half a year later, I found a solution that worked both elegant and stable.
I installed the ios-deploy tool using node:
npm install -g ios-deploy
Using this, I was able to install the app and listen to it's output via:
ios-deploy --debug --bundle path/to/my.app
I recieved the full qDebug, std::out and std::err output perfectly fine.
To uninstall the app, I simply added the -9 or --uninstall_only option:
ios-deploy --debug --bundle path/to/my.app --uninstall_only
Using this solution the app could be started reliably, without crashing with a locked screen
I'm getting the error "Could not allocate a resource" when I try to run on any of my devices. I've seen this as a possible fix:
sudo rm -rf /var/db/lockdown/
I've tried that and restarted my machine a handful of times, but no luck. I also tried changing USB ports. I've reinstalled Xcode as well after uninstalling with AppCleaner.
In addition to the error, whenever I connect a device it asks me "Trust This Computer?"
This is occurring on an iPhone 5 and iPhone 6+ with lightning, as well as an iPad 3 with the old style connector.
[Updates]
I've now also reinstalled iTunes to no effect.
Also reset PRAM and SMC.
After you delete that folder, you need to recreate again and make proper permissions, because iTunes need rw rights to that folder:
sudo mkdir /var/db/lockdown
sudo chmod go+w /var/db/lockdown
without having iTunes open. Then everything should be fine.
Also keep in mind the same operation may be required for /private/var/db/lockdown [a mirror]
If you moved and old Mac to a new one, make sure /var/db/lockdown/SystemConfiguration.plist contains your mac actual UUID . Generally it is not recommended to delete a system folder, anyway, without really knowing what you do. ;) Actually I replicated your problem moving /var/db/lockdown to another location, starting iTunes, getting error. Then recreate etc.
I have been working on developing an app for iOS for a little while now. The app runs fine within the sandbox, but I want to run the app from the /Applications directory.
My procedure for getting the app on the phone is:
Product -> Build For -> Testing
$ scp -r ~/Projects/KegCop/DerivedData/KegCop/Build/Products/Debug-iphoneos/KegCop.app
$ killall -HUP SpringBoard
After Spring Board restarts, I try launching the app but it just quits as soon as it starts. I have AppSync for 5.x installed, and like I said if I leave the app in /var/mobile/Applications/ it seems to work as expected.
Does anyone know why my app is quiting when I try to launch it from the /Applications directory?
[Solved]
1) Make sure your release file is Release and not Release.txt
2) Make sure you generate a valid Packages file.
The .deb file I was generating was valid, but my Packages was foobar.
I used the following command $ dpkg-scanpackages debs / > Packages after changing into my local repo directory.
I then reuploaded everything, closed Cydia, and my app successfully installed \o/
cheers
-Chris