Accessing iPhone app logs from Ad Hoc build OR transferring project build to another machine - iphone

I'm developing an iPhone application with Xcode 4.5.2, and when I run the app on a device or in the simulator, via Xcode, the logs are showing in the Xcode Console.
My question is, when I build an Ad Hoc distribution build and install the app on a device and run it from the device, is there any way to watch the log output? I need to tech support the app remotely and want the tester, who is elsewhere, to be able to see the logs.
Question two, can one build the project and and export the build, import it to Xcode on another machine and just execute it from Xcode without building? This would solve the problem since the tester would be able to run the app from Xcode and thus see the logs.
The problem is that I'm using Sencha Touch, which isn't that easy for the tester to set up so that he can build the project locally. In short, I need the tester to access the log output so he can inform me of it, without having to build the project in Xcode.

Question one, answer one: If you use NSLog and you can not change this in the code then there is no way to see the log output right on the device. However it is possible to see the same log output as you see in the debug output window also without XCode. Download the (free) iPhone Configuration Utility for Mac or Windows. Once the device is connected you can select the device and switch to the Console tab to see all debug output messages, including that one of your app.
Question one, answer two: if you can modify the logging code I strongly suggest you to use a logging framework. There are a lot of them out there and they allow you to save your log lines to files, upload them to a server or let the user email them, etc. etc. features vary. Two examples are CocoaLumberjack and SNLog but it is likely that you find another one that suits even more your needs.
Question two: Yes, it is possible, but the guy whom you send the app will need a Developer Certificate (or the key of your Ad Hoc certificate which I guess you don't want to give out) to be able to install the app on his phone. The format that you should use is xcarchive. Select Product -> Archive from Xcode. When the archiving has finished the Organizer will open with your new archive selected. Select Distribute -> Export as XCode Archive. You send the resulting xcarchive to your tester, and when he clicks on it (having XCode installed) it will import your compiled app as an archive in XCode organizer exactly the same way you see it. Then your tester still needs to sign it before installing on his device (by selecting Distribute / Save for Ad Hoc deployment).

Related

How do you remove an app from iPhone Configuration Utility?

I'm attempting to install an archive build of my app using iPhone Configuration Utility but am unable to.
The app appears in the Applications section, however when I click on the Devices section, then choose the Applications tab it isn't listed there.
I think this might be because I changed the app name and the app with the old name is still listed in iPhone Configuration Utility and as they have the same app id it may be getting confused.
However there seems to be no way to delete the old app from within iPhone Configuration Utility to see if this clears the problem.
In iPhone Configuration Utility, under Library->Applications, select the application and click Edit->Delete.

What steps can I take to get an ipa file generated by xcode onto a test ios device?

I want GUARANTEED steps to get this to work.
I've pulled my hair out on this task many times since I started doing this work 6 months ago, and the feedback from itunes and the organizer is non-existent.
I have full access, I can go into the apple dev centre and do whatever is necessary and I know my way around xcode now.
Currently, when I connect my iPhone and click applications under the iphone [on the left in the organizer] the add and remove buttons are disabled and I can't click and drag ipa files into it.
If I open itunes and click and drag my app into the applications area for my macbook, it works and overwrites the current app, but when I try to click update, then sync, it successfully syncs, but still has the button saying "update" instead of "install", and when I view the phone it says " failed to install" or some other ridiculously generic message.
I've also tried to create a new profile, but when i use the add button in the organizer to attempt to add it to my iPhone it accept the file, but doesn't shot i on the list. I click and drag and it's the same thing, no error and it looks like it'll accept it, but it doesn't show up on the list. So I can't seem to attempt to add a new profile.
BTW, The device is in the devices list and has a valid profile [and the profile has the device in the list of devices (and the UDIDs match)].
I'm looking for some solid steps to guarantee the app will be installed on the phone without these headaches.
Xcode: 4.5.1
iphone: 6.1.3
Any help you can give would be greatly appreciated. Honestly, I'm ready to quit my job because the stress this software is causing me, this is ridiculous.
(my frustration: I've had compilation errors that are resolved by restarting xcode, I've had to restart my computer to resolve profile issues, and far too many times I've had to flush everything just to deploy to the app store... I've never dealt with such a terrible awful piece of software and toolchain in my entire life [and I've used Windows and VS!])
Check out TestFlight - http://testflightapp.com
They give step by step instructions on how to distribute ad-hoc versions. Its very easy to set up.
Set up your provisioning profiles, build/archive your app, then distribute it via TestFlight.
See http://help.testflightapp.com/ for help.
Follow the Steps:
1 - Create a provision profile Distribution for your app ( don't forget to add the devices, witch will test this. Its very important because case you dont add then, they will not have permition to install the app.). After create download and double click it. Don't delete yet, you will need it to upload after.
2 - Go to your project, Build / Targets / Build Settings / Code Signing and set the provision profile you create.
3 - Build the project. If its ok, click in product, archive
4 - Click in Distribute, Save for Enterprise or Ad-Hoc Deployment. Save your .ipa
5 - Go to TestFlight Create the app and upload the build.
6 - Go to Apps Builds and click in your app.
7 - Go to Permitions and Upload the Provision Profile!! Now you can choose in this list who you want to notify about the app to download!
8 - (Optional) Go to People and create/manage your team giving the right priorities.
You should implement the SDK case you want to manage the Sessions. Its Very simple, just follow the tutorial Documentation and the sdk iOS SDK Download
Follow below steps to install .ipa file without using testflight
Extract the folder which contains files .ipa and .mobileprovision .
Open iTunes and connect your device.
Drag and drop .mobileprovision on Library->Apps group section of
iTunes.
Repeat above step with .ipa .
Sync your device and it's done.

How to thoroughly test a release build? [duplicate]

This question already has answers here:
How to debug a crashing release build? [duplicate]
(2 answers)
Closed 8 years ago.
I constantly encounter this problem:
1) I test my app thoroughly on many devices. Use Analyze and Instruments. No crashes. All fine.
2) Submit it to the App Store. App creashes all the time.
I realize the "release build" is something a little bit different than the "debug build". But how can I test a release build on my device that is built exactly the way it will appear on the App Store, technically?
I recommend you to use TestFlight (https://testflightapp.com/), I have been working with it recently and it is a great way to test your Apps before going public.
You would be using the final IPA file, so won't be any difference with the build you would submit to the AppStore... Also, you could invite other people and they could download and install your App over the air, and even more, you have remote logs about crashes...
Hope it helps you.
You can of course also archive your build (set the scheme to iOS Device, then choose Product -> Archive) to an IPA, sign it with your Ad-Hoc distribution profile, and install it on your device by dragging the IPA file onto your device in the Xcode Organizer.
When your Archive scheme is set to build in RELEASE mode, this is as close as you can get to test your final app without going to the App Store.
Testflight is doing the same thing, as you have to upload the same IPA to their website, so if you do not need to involve more people you can just do it local this way.
You can set your testing Scheme (under the Project menu) to build and run a release build. Or you can install an Ad Hoc build using iTunes if you want to test exactly the same install method as the reviewer.

Preparing Ad Hoc Distribution for my app

I have been reading several tutorials and watching some iTube videos to see how I best prepare my app for Ad Hoc distribution. However the information I got is not really consistent, it goes from the 5 step explanation from the Developer Center of Apple to a almost 3 minutes video, where I would have to set some Code Signing options in XCode, create and zip the Archive etc.
My questions:
1.
Is there a tutorial available, which explains everything required, but not too much? I somehow feel, for instance, that code signing is not really required.
2.
After I tried to install the app using iTunes, the synch claimed that it was not able to install it. Is there some log available in iTunes, so I can check for further error details?
3.
How about switching from Ad Hoc distribution mode to normal developer mode? After I followed the steps from the video and prepared my app for Ad Hoc distribution, I was not able to install it on my device anymore, I got the error
Build target Abiliator
Check dependencies
[BEROR]CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 5.0'
This is the video tutorial on iTube I followed: Demo of iPhone app Ad Hoc distribution
Thanks for your feedback and have a great weekend.
OK, looked up the Error
" the following job tried to hijack the service..." and saw that a reboot of the iPhone may solve the issue... and guess what, I was chasing a phantom all day long.....
It works perfectly.
So last hint for anyone, having a similar issue, after installing an app via Ad Hoc the first time: Reboot iPhone, otherwise the app may crash.
Cheers and now good nite :-)
PS: Just to round this thread up here the steps I did at the end (as mentioned, I am using XCode 4.2.1) :
Added my device on the Provisioning Portal (this had been done long time ago, however it is an important step, as the beta testers device IDs also need to be registered here before you re-create and download the distribution profile)
Created and downloaded an iOS Distribution Certificate in the Provisioning Portal
Imported the certificate in my Keychain
Created a Ad Hoc Provisioning File in the Provisioning Portal
Downloaded that profile
Double clicked the profile, which added it to the XCode Organizer Provisioning Profile Section)
Added the options Any SDK and Any iOS SDK in for Ad Hoc Distribution Code Signing Identity in the Code Signing section of my project AND my target and set the values with my Ad Hoc Provisioning File I just created and imported
Made sure the option in my app .plist file "Application requires iPhone environment" was set to true
Ran a clean (Product / Clean) and then a build only (Product Build)
Made sure the app was not installed on my iPhone (as I was testing before via XCode)
Copied the target (group Products via Show in Finder) to iTunes via Drag and Drop (I dropped it into the Media section)
Copied the Ad Hoc Provisioning File into iTunes via Drag and Drop (also to the Media section)
Made sure the app was checked for the synch, synched iTunes with the iPhone
Lastly rebooted my iPhone! However, I am pretty sure, that this might occur on the Developers device only. I assume that the reason for that was a process, still remaining on the iPhone, from my last test via XCode.
I did not use an entitlements file. I have actually to find out, what that file is really for, I have read that it might be required only, if using iCloud. And XCode 4.2 developers, there is nothing like File / New / Entitlement Template anymore in XCode. The file is created as soon as you check the option Entitlements and give the file your desired name in the Summary tab of your target.
You may also want to download the iPhone Configuration Utility from apple
I will also recommend this to my beta testers, as it allows you to see the console log of the iPhone, which of course might be very helpful in case of errors.
Hope this summary helps others, setting up their app for the first Ad Hoc distribution.
Cheers, René
code signing is simple.
first you create a mobileprovisioning profile for your apps bundle identifier also add the devices you want to built the app for. for adhoc build do it in distibution tab. download it, double click add it to keychain.
now you tak your app in xcode.select coreect profile(code signing). set command line build to distribution, oh i forgot create a new file(entitlements.plist) set debug inside it to false, add its relative path in the target, just above codesigning specified. now select the iosdevice on top left(where you select the simulator) press command+b to build the app. the app would be in the products folder(at the bottom) locate it in finder drag it to itunes, may be provisioning profile too, and sync it. done.
Go to https://developer.apple.com/devcenter/ios/index.action and login. You can find 'iOS provisioning portal'. And after going there, choose 'Distribution' section. Select "HOW TO", you can find necessary steps there.

How can I get an iPhone app to a client for review prior to public release?

I need to show an app I have developed to a client for review prior to its submission to the app store.
The client has an iPhone but not a mac on which to run xCode.
I have a personal (not company) iPhone developer account.
The client is too far away to visit in person.
What are my options?
If the client has iTunes, you can provision a build of your app specific to the client's iPhone ID (visible in iTunes). They just need to drag it into iTunes and then install it on their phone.
Plenty of docs about this in the Apple iPhone Developer site. Good luck!
Option #1:
Login to the iPhone developer portal website.
Add their iPhone UDID to the list of devices.
Generate a provisioning profile that includes your own test phone and theirs. Download the file (ends with .mobileprovision).
Double-click it to install it on your development machine.
Quit and restart XCode, then set your code signing identity to the name of this profile.
Build the binary.
In the left side of XCode "Groups & Files" bar look for Products (may need to expand the folder).
Select {yourapp}.app. Right click and choose 'Reveal in Finder.'
Now take that .app file and the .mobileprovision file you downloaded, zip them both up and send it to the client.
They will need to unzip the archive, then drag-drop the .app and .mobileprovision onto their iTunes and sync the phone. Your app should show up and run.
The portal site has more detailed instructions, but this is basically it in a nutshell.
Option #2:
Sign up with a screen sharing service like WebEx or glance.net (both work on Mac and Windows machines). Run the app in the simulator as they watch the screencast on their machine. If it's in the early stages of development, this is probably much more useful since they can give live feedback. In later stages, sending them the app is probably more useful. The nice thing about screen sharing is that they can take over the mouse and click around and explore while you're there to explain things.
Option #3:
Get a screen-recording app like SnapzPro or ScreenFlow and run the app in the simulator while recording a voice-over of its features. Send them a link to the movie. This is pretty useful if you're walking them through all the features. It's also handy if more than one person at a time needs to review the material. The advantage over #2 is that they can watch it over and over on their own time and take notes.
Depending on the stage of development, #3 is probably best in early stages, #2 in the middle, and #3 in the final steps.
I recommend having the client use the iphone configuration utility to install/uninstall early builds of the app. I am using this with my team and it lets you get direct access to the phone's console and error logs which is super handy when you're in the early stages of development. It also lets you manage the install/uninstall of the app and see the explicit version that you are installing in a much easier to manage way than itunes does.
Option #4:
Try https://testflightapp.com/ , this is easy for distribution of your app. Even Twitter Mirror is Using this to test their beta release.