Is it possible to distribute an iOS app for simulator testing on MacOS? - ios

I'm in the early alpha stages of an iOS app and I'd like to be able to deploy it to some non-technical people within my company for early feedback. It's premature to deploy it to physical devices, and not all the people have them anyway.
What I'd like to do is somehow install the iOS .app file into the simulator app, and bundle that into a MacOS .app file that I can just email to people and have them run just by clicking on it.
Second best, but acceptable, would be to have the users install Xcode and have a way to send them the iOS .app file and have some sort of script that would load the app into the already installed simulator app.
This seems like it ought to be possible, but I can't find any way to accomplish it.
Note: There is a LOT of advice online about things like TestFlight or Over-The-Air apps, but that involves the physical hardware, which is not what I'm trying to do here.

Following the idea in this SO answer, I used SimLaunch, which packages your iOS .app file into a MacOS .app file. The recipient has to install Xcode, but once that's done, he/she just runs the app and the app invokes the simulator, with your iOS app installed. It totally works.
One potentially tricky thing: when you run SimLaunch, it asks you for the location of your iOS app. When you tell it, it creates the output MacOS app in the same location, with a file name like YourApp (iPhone Simulator).app, but doesn't give any message telling you this, and it says running, so it looks like the app is just frozen. In fact, it's done and waiting for more work, but it took me a while to realize this.

Related

Run any app in iOS 10+ from command line without jailbreaking

Is there a way to run any app in iOS 10+ from command line/Mac without jailbreaking?
Re-signing and none of the existing tools seem to work (ios-deploy, Instruments) nor have I been able to find a way via iTunes or other programs.
Yes it is possible for any App you have the source code for.
No it is not possible for any App you acquired from the App store or direct download.
Not quite sure I fully understand your emphasis on any app, but here is what I understand:
1) If you mean you want to run any app from the app store that can currently be downloaded, and you have a .ipa file, you can definitely install it manually to another device using this method (iTunes drag and drop)
2) If, however, you're trying to run an .ipa on a Simulator, that's not possible, as described by this answer.
3) Lastly, if you have source, which I'm confused about since you mention re-signing, then you can easily build that source into an executable for either Simulator or device using either Xcode, or since you asked about command line, you could also use xcodebuild, info found here
I hope one of these 3 options is what you're looking for, as it's hard to tell from the wording of the question. If it's not, expanding on exactly what use case you're trying to resolve would be very helpful.
From the comments in #BHendricks answer, it seems you want to use the command line on your computer to start apps that are installed on an iOS 10+ device.
This is not possible without jailbreaking the phone!
On a jailbroken phone it might be possible to write something that connects over ssh and starts apps, but on vanilla iOS this is disabled for security. You could search for an app that you can send commands, but I highly doubt iOS apps have access to system features like starting other apps, as this is also a large security risk.
If you have the ipa, you can install the app via iTunes. This is what we used to ask QAs to test apps on devices and it works fine. Please refer to this [SO] for detail Install IPA with iTunes 12.
Use Cydia Impactor (cydiaimpactor.com) to sign the app. 99% chance it will work

ios app-on-device debugging events

Newbie here, so apologies if this is stupid question:
Are there any applications or solutions out there that would allow you access to debugging events on an app installed on your iphone? To be clear, this isn't an app I've developed, it's just on my iphone and is used as part of another solution which we are developing. Curious if there's a way to just watch the events on an app to help with debugging process.
Thanks.
If you make an app, and build it with a development release, and development signing, you can select to build+run it on a device. Then, you can use the Xcode debugger to see your logs / errors etc.
Steps:
Plug in iPhone
Start Xcode
Hit Build + run
Watch debugger
Logs are either made by the OS for certain things (NSinconsistency, bad constraints, race conditions in view presentation) or by you with NSLog.
Or did you mean when the app is not tethered to your computer? There are other tools for that - including just plugging the phone back in and downloading the logs off the device.

Build on device from Xcode versus downloaded from TestFlight - Issues

I have an issue when running my project on my device, but only if it has been downloaded from testFlight. It works fine when I build directly from Xcode to device.
Potentially relevant details -
Using AVCaptureSession, my app records segments of video where it can switch between front/rear camera etc. I have handled orientation of each video so when playing back or merging with multiple videos they all play the correct way round.
The playback orientation works as expected on my devices when I've built directly from Xcode. Though from the app dowloaded from Testflight, the orientation of the videos are wrong way round.
Devices used iPhone 5S - 8.1 & iPad 2 7.1
As mentioned, this is only an issue from TestFlight builds. I've not posted any code as logic works fine from Xcode. I have used TestFlight a lot over the past year and not come across an issue like this before. It only seems isolated to this video playback.
If anyone has had similar issues and knows how to resolve or has suggestion, that would be much appreciated.
I discovered why my testFlight build was acting different from my Xcode build and it all came down to Build Configuration settings within Xcode
I edited scheme which which brought up build options and within the Run option I changed Build Configuration from Debug to Release.
Although this never solved the video issue, it did allow the app to act as it would on release. I will now be able to continue test of my issue, but thought other people experiencing differences in their Xcode and test builds may wish to know about this setting.
Do you happen to be using Swift. Apple changed their certs and added an extra field as part of the process. Existing certs do not work when including external libraries that include Swift code. I lost a good chunk of time to this. Here is the explanation form TestFlight competitor AirSign.
https://www.airsignapp.com/ios-apps-using-swift-crash-when-signed-with-inhouse-certificate/
If this is the case, the conclusion is generate a new cert and a new provisioning profile using the cert. You may have to revoke your old cert if you have too many.
If you build directly from your machine you are using your development Cert. If you go through TestFlight you are using you distribution cert. What happens if you take the distribution ipa that you are about to upload to TestFlight and try to install that directly onto you device. IF you can not install the app then there is an issue with your distribution cert. I also assume you tried building a new hello world type app and going through TestFlight and then adding AVCaptureSession in a new build of the app and trying that.
To make my life easier I use iFunBox to directly install test ipas directly on my machine bypassing iTunes. Great free app. Just launch, Choose Install on Device and choose the ipa
http://www.i-funbox.com/ifunboxmac/

Testing in a iOS 6.1 jailbroken device without Hackulo.us and Apple developer ID

first of all, I know there are many questions similar to this one, but, they are old and the answers in them unfortunately no longer work, since the game has changed without Hacklo.us to do part of the process.
Basically, I want to develop for iOS and test the apps I make, and later in the future I may want to submit them to the Apple Store, but for now I'm not willing to pay 99$ to join the Apple iOS developer program just to use my apps in my iPhone.
I have a jailbroken iPhone 4S with iOS 6.1.
The only posts I found about how to do this, either use Hackulo.us (that went down about 2 months ago) or something called Jailcoder that is also offline and they also seem to work with only old versions of XCode/iOS (not clear about that point).
Any new progresses on how to to this with the present conditions?
Simple. After building the app, just use some utility (SSH, iExplorer, etc.) to copy the app bundle to the /Applications directory on the device. After that, either run the uicache tool or respring the iPhone to make the application appear on the home screen.

Deploying iOS App in Xcode 4.3+ without certificate

Hello all!
I want to test how my Cordova-ported apps run on real device, and if I like performance, I'll buy Apple Developer Certificate. But now I dont want to waste hundred bucks just to see my webapps running slow and ugly as shit. I've looked through all that forums and also here on stackoverflow, and all solutions seem to relate to iOS SDK 4.2 and earlier.
And what about Xcode 4.3+?
I've edited /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/SDKSettings.plist and also turned out code signing in project settings.
I've got two MyProject.app's from "Build for Running" and "Build for Archiving" and tried to sync them to my iPod touch 4 via iTunes, but in both cases app crashes immediately after launch.
I also extracted .ipa from iTunes and tried to install it via Installous, but got the same problem. Thing crashes.
I also got .xcarchive via Product->Archive but don't know what is to be done next with it..
So, question is here: how can I deploy my own app to my own jailbroken iPod touch?
Thank you.
I would suggest you to take a look at JailCoder.
It allows you to Debug your app made with XCode on a real device without a developer account.
Please keep in mind such solution should only be temporary. If it runs well and you want to do further developing / deployment consider buying a Developer account.
On jailbroken iDevices, Cydia (and other dpkg installers) install apps to /private/Applications/
So why not try:
/Applications/MyProject.app
Then open a terminal on the device and navigate to /Applications:
chmod -777 MyProject.app
chown root MyProject.app

Resources