Deploy UITests Runner directly to the Apple Watch - ios

I am struggling with the new issue (again) related to the UITesting on Apple Watch. Currently, I'm looking into the opportunity to deploy .app/.ipa file of UITests-Runner directly on Watch.
So, I'm not taking about running tests (for which I can easily use XCODEBUILD) or deploying .app/.ipa file of my application itself on Apple Watch (which could be achieved via iOS-deploy), my current problem is to deploy tests runner into real Apple Watch.
Any suggestions, thoughts here?
Will appreciate any help

Related

Collect iOS application logs automatically through script

I have been going crazy over this, is there a way to collect iOS application logs through script? I am working on an iOS application and have written some UI Tests now in order to gather logs i had to manually take it, is there a way some utility may be in form of script which i can fire and download the logs on my mac. Ofcourse my devices under test are connected to my mac machine. I have been going over cfgutil, apple script but so far no luck. Anybody with knowledge and care to help. Please do so!! Thanks!!
no. you can't, mainly because the output of debug in xcode is handled by xcode it self

Travis CI & iTunesConnect

Did anyone managed to get Travis CI to deploy the app on iTunesConnect? I have read tons of articles and tried them without success.
My closest bet was this article:
Continuously Delivering iOS Beta Builds Automated with Travis CI
They didn't provide info that you need to install Mako in order to work, so pay attention if you go this way.
The main problem however is the fact that I do not have Crittercism or HockeyApp accounts, however the python script want them from me and no matter if I do not provide them or provide fake it fails later as it actually tries to do something with them.
Other thing that I come across is:
Automated iOS beta distribution using Travis CI and Testflight
which is essentially written on top of Deploy an iOS app to testflight using Travis CI. The problem here is that they deploy to TestFlight app instead of iTunesConnect.
Any help would be appreciated.
I would consider looking into the ruby gem fastlane. We have been using it for quite some time and it has definitely saved us hours of problems related to deploying to iTunesConnect. I haven't used TravisCI before but from this blog post I know they support fastlane. The community is great and #KrauseFX is awesome at answering any questions you might have. He even uses TravisCI to build the fastlane tools!

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/

Xcode - How to move app out of sandbox with run script?

Basically from what I understand is that if my app wants to use serial communication via the dock connector (pins 12 / 13) the app has to live outside the app sandbox folder. Now I don't want to have to ssh into my phone and copy theAppFolder.app to /Applications/ everytime I click Run in Xcode (that would just be silly).
Now while doing some research I came across this blog post. Down in the comments, someone gives the idea of what I am talking about in this question.
Now is his solution the best way to do what I am thinking of doing, or is there a more elegant solution?
A bit late, but I use Xcode's build command with a post-build script to get my app on my jailbroken iOS device and also start it using a tool from Cydia (it will actually run the app from the /Applications directory). Check out my answer here for more info. The thing still missing is the ability to debug, but I've gotten used to using NSLog and tailing the syslog.

Resources