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

StackOverflow https://stackoverflow.com/questions/13974155

  •  11-12-2021
  •  | 
  •  

Вопрос

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).

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top