iPhone - which location the crash log is saved in iPhone app - iphone

I'd like to access the crash log in iPhone app without Third Party library.
Do you know where the crash log is saved in iPhone app?
I know the iPhone app folder structure is as followed:
Documents/
Library/
Preferences/
MyApp.app/
Default.png
icon.png
Info.plist
tmp/
EDIT:
If the crashes are not stored in Application folder,
do you know how UKCrashReporter and other third party library do that?

You need to be connected to iPhone device and Select Window -> Organizer -> Device Logs.

I have a jailbroken iOS device, so I can answer the first part of your question easily (although you may have already done so yourself). The standard crash logs are stored on the device in the following folder:
/private/var/mobile/Library/Logs/CrashReporter/
If you don't have a jailbroken device and the logs aren't visible in Xcode, you should be able to access the files with a iOS file explorer like i-FunBox, which should be able to access the file system even without jailbreak.
As for the second part of your question, I would think that at least some third party crash reporters save the crash data in the app's folder itself, judging by the following directories (which were empty as the app has not yet crashed on my device):
// ... was the identifier for the app path, removed for readability
/private/var/mobile/Applications/.../Library/Caches/com.plausiblelabs.crashreporter.data
/private/var/mobile/Applications/.../Library/Caches/com.plausiblelabs.crashreporter.data/SkobblerUS
/private/var/mobile/Applications/.../Library/Caches/com.plausiblelabs.crashreporter.data/SkobblerUS/queued_reports
/private/var/mobile/Applications/.../Library/Caches/crashes
Again this is something you could verify with an iOS file browser.

Related

Look inside Apps folder

is there a way to navigate inside the folder structure in iPad or iPhone, check what is inside of any app folder? I tried already xcode but can not identify the folders. Thanks...
You can't do it on a real device, but you can have a look on the simulator. Up until iOS 7 each iOS version maintains it's own set of apps under
Library/Application Support/iPhone Simulator/7.1/Applications/
followed by a cryptic number representing your app. Replace 7.1 with another iOS version. To display the Library folder in Finder, click Go from the Finder menu while holding down Option.
Since iOS 8 those locations have moved and are harder to find. See here: http://pinkstone.co.uk/where-is-the-documents-directory-for-the-ios-8-simulator/
Yes, you can use programs like "iExplorer" which let you navigate your device even without jailbroken devices. I often use it to check that my app is correctly creating files according to my coded file structure.
You can see only contents of Documents Directory on Simulator or device. If you want to see documents directory in device then you have to set UIFileSharingEnabled key to YES in your application's Info.plist file. Then you can see it via iTunes app in Mac os x.
There is not way to see bundle contents in application. Just you can see bundle contents in xcode.
Regards.

only few contents of .ipa file are getting loaded into the device when sinked via itunes

I am developing an application in which I placed a bunch of books in my resources folder of my app. When I load the app into the device from Xcode, all the books are visible in the iPad.
When I load the same app in .ipa format into device using iTunes in the same iPad, only a few books are being loaded (done as ad-hoc).
Can anyone suggest what might be the problem or issue?
Is there anything with provisioning profiles (developer or distribution)?
Do one thing, extract .ipa file by stuffit expander. By that you will get the binary file. Please check those resources are there or not. If yes then might be that older ipa file already installed in your itunes(PC). Delete it and then try to install the ipa file. If no then may be issue while compilation.

Not loading all content of ipa file into device while using itunes

i developed an app which is meant to read books(pdf book reader).i loaded 25 books(total size of 320MB) into the app using absolute path.all the books are been seen in the simulator and also i can load all the books into my device through xcode(build and run).
my requirement:
when i loaded the above obtained ipa file into the same device or other device which are in ad-hoc distribution using itunes , it is strange that only few books are being seen in the device.
note: i made sure that all the books are present in the .ipa file,i deleted old app in the device which i run via xcode. the device is in ad-hoc distribution.
while code signing i used the iphone developer certificate.
is it necessary to use distribution certificate instead iphone developer certificate which i feel that might be one reason for my problem?
plz anyone suggest me with exact solution to the scenario.
tnx in advance
I know I have seen problems going from simulator to live device. The simulator is not case sensitive, but the device is. Recheck all your actual files in bundle vs what you are requesting when you open the file. They need to match exactly for device, but not so much for simulator.
I would also try seting the apps-Info.plst to have "Application supports iTunes file sharing" on so you could see what is in the documents folder (this is if your moving files in that area).
One problem might be as RAZ suggested that iPhone is case sensitive, but there could be other problems.
For starters I would check the that ipa does contain everything you think should be there. Take the ipa, change the extension to zip and open it. You'll get a folder containing you're app. Right click the .app and choose show package. You'll now see all the files/resources included in your app. If the files that won't load in the app are there then you'll need to provide more information about the problem.
If they're not you need to make sure xCode knows to copy them to the app resources.
You might have resources that you haven't copied into the project, and you're only referencing the files on your hard disk. Then when you make the .ipa file it's not included. Try re-importing all your resources and select "copy to project".

trying to publish to app store - No provisioned iOS device is connected

Hi
I do not wish to start the iphone app executable on the device.
I just want to publish it to appstore.
so after following all steps I have in my folder:
MyAppName.app.dSYM
However from what I understood this is not enough i need to zip the app file... if I could zip this file and upload it to app store this would be great. But when I tried the application loader it didn't accept a zip with this file.
so in xcode I have choosen: device and not simulator, and it complains now when I build that the device is not connected (the device is not with me...) so my question is can I create (build) the the product.app so that I can then publish it to app store even when I don't have a device with me?
thanks
Assuming you have your App Store provisioning profile setup and selected, under the Build menu select Build and Archive it sounds like you are doing Build and Run (which is not what you want).
Then from the organiser you can Submit directly to the App Store, you don't even need application loader.
Hope this helps,
Oli

iOS Question. Can I distribute the Xcode simulator versions of my app?

I would like to send someone the Xcode simulator version - not the device version - of my iPad app. I have located the .app file in the Finder. Do I just zip it up and send it off or is it more complicated than that?
Thanks,
Doug
UPDATE
Chrisbtoo got the answer on this one however he left of some critical bits for those of you trying this at home:
Path to Xcode simulator (the simulator can be run standalone.):
/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app
Path to app that appears in the home screen of the simulator:
/Users/turner/Library/Application Support/iPhone Simulator/3.2/Applications/{GUID}
It is instructive to watch what happens in the app simulator directory as you build for simulation, delete apps from the simulator desktop and generally use the simulator as an actual device.
Bottom line: This is a viable approach for sharing apps in a "simulated" ad hoc manner without the mind numbing, soul sucking process of true ad hoc app sharing.
Cheers,
Doug
Assuming the other person already has the simulator installed, you can just zip up the stuff under ~/Library/Application Support/iPhone Simulator/3.2/Applications/{GUID} (includes both the .app and any data directories needed) and send it to them - they'll need to unzip it under that same directory. What I've done in the past was to rename the {GUID} part to a more friendly name - the sim will still pick it up.
If they don't already have the simulator, they will need to sign up for a free iphone dev account and download Xcode, etc.
We just put up a little tool that will help you with this. It manages both what you need on the dev side and also the tester.
Here it is
http://blog.placeit.net/ios-app-packager/
It basically creates a little zip that you can pass to the tester and it'll install the app in the right directory and also open it up for the user with the right device selected.
I would think you want to send the entire project folder to the other person- presumably you are expecting them to open it in their XCode- and presumably they have the sdk for the app.
You have to distribute via AdHoc or App Store for beta testing.
Become a developer and then look into how to do this.
You need to have a provisioning profile, and then select the UDID's for the device you want to beta test to.
Go to the iPhone Provisioning Portal
and here is a document with more detail