iPhone app crashing after launch - iphone

I have a iPhone app that was working till a few days ago. I could run it from Xcode on my phone but today it crashes with the error:
error: failed to launch '/private/var/mobile/Applications/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/MyAppName.app' -- failed to get the task for process 275
Where xxxx are a set of characters. This is the only warning I get in the Output window.
Closing Xcode and starting again will give different process number on next crash
The app only crashes at random views e.g. the app launches and I can navigate through it up to a certain point, at which it crashes with the error. The next time it may crash on the first views button click.
I have tried a hard reset on my phone but still I get the same problem. I have also deleted the derived data by clicking Options Key -> Product -> Clean build folder... (as I could not find the Developer folder on Lion). I have tried closing Xcode and starting again.
I am using Lion and Xcode 5.0.2.
I am really stuck on this as I have to demo it to a client on Friday and can't figure out what I did wrong?
I have recently added another developer account (working on 2 separate projects, each with its own developer account) and have sent AdHoc demo's through TestFlight to new client.
Could this be what is causing the problem? I have looked in the crashing apps Build Settings -> Code Signing and it appears that i am using the correct account.
This was as per this thread suggestions.
Any help would be appreciated.

Related

App crashing suddenly on launch - iPhone enterprise version

I have enterprise version installed on few of the devices.
On one of the device app is crashing immediate after the launch button click every time.
It is working on other device without crash. Can any one help me on the issue that why it is crashing ?
**edit:
We seems it certificate expiration issue. But if certificate is expired then it also should not work when I install it in new device.
Here are few steps will help you to find / detect / resolve your issue :
If its live version which you are testing than check out crash logs.
To check crash logs open Xcode -> window -> Organiser -> Select your app -> Crashes -> Select current version. You will find the crash
open it in Xcode it will help you to find the line which generating
crash
If its not live app than try to debug app on same device using debug ad hoc provisioning
Another way is you can also use crashlytics tool into your app. It will give you detailed information of the crash along with the
possible code which encouraging the crash
Possible reasons for crash :
Architecture support. Might be crash issue generated only on base 64 devices than check out your app is base 64 supported or not
Use of Depreciated methods can also cause the crash
iOS Compatibility issue can also be a reason of crash
Most important reason is if your app trying to access privacy information without permission alert than also it will get crashed at
very beginning of app launch
Hope it will help you.
We figured out this but posting bit late.
Few data systems and validation not matched in case of the Date Time system used. Date Time formats are different according to user and devices. Few systems have date formate as a month in the first 3 characters longer than the year(e.g. 1 Aug 2020). (from the same region devices, the date time format could be different). so this validation is very critical and needs to consider and all test cases. This was the issue we were facing as in the start we were opening the calendar and fetching the events accordingly.
Also displaying data on threads and managing threads are also more important in this kind of case. Memory leaks and appropriate GCD usage may also lead to this situation.
Thanks

XCode 5 hangs with a timeout error when validating/uploading a "ready to be uploaded" app

I've been developing and uploading apps for some months. Whenever they needed being uploaded to the app store, I could do it without problem, but now, I'm stuck with one that doesn't want to be validated/uploaded. XCode says "the request timed out" after MANY minutes with a spinwheel on screen.
The differences between my old updates to the app store and the one I'm trying right now are:
-Xcode 4.X before, Xcode 5 now.
-I had to recreate the app store certificate/provisioning profiles, because they just expired.
-I inherited this project from other coworker (not here anymore) and maybe my "developer profile" is somewhat conflicting with some certificates, etc... (Still many dark areas for me).
I've kind of tried "everything". Erasing provisioning/profiles, closing Xcode, resetting, cleaning my project. But no luck. My current Xcode 5 is able to compile my app perfectly, I'm even able to select the distribute option before uploading (the app is ready to be uploaded onto itunes connect), I even login with my client credentials onto itunes connect, I can even select the correct provisioning profile (app store profile, not a developer one), but no luck:
If I choose to upload or validate, Xcode just complains with some kind of "dull" timeout error.
Any hints? Any way to debug what happens behind the curtains?
Greetings, I'm at a loss.
EDIT: Apparently, the timeout failing event appears in the validation process. If I try to upload, the status log says "Failed Validation". If I try to validate, obviously there's also a "Failed validation" error. Where can I find some log to see what part of the validating process is failing?
Well, apparently: "Problem solved".
After 2 boring days trying to upload my app (via Xcode 5, and via Application Loader), I've discovered that Apple upload servers seem to be overloaded (unless a better explanation arises).
I'm in Europe, and from 9 to 14 h my app was ALWAYS rejected. But once I tried it after 16h, the upload and validation processes worked like a charm (both with Xcode 5 and with Application Loader).
Why this? No idea, but I didn't change anything in my upload process, so it's sad, but the solution is:
"Have patience, and wait to upload your app on a time slot where Apple upload servers are not overloaded". The sad part is: No one knows WHEN is that time :)
I solved it by switching Internet provider.
I simply connected my laptop to my iPhone via Personal Hotspot and used LTE network to upload the app.
It worked for me twice.
for Xcode 13 and Mac OS Big Sure
Install the "Transporter" app from the MacOS app store.
From Xcode's organizer, select your archive and press "Distribute App"
Instead of "Upload", select "Export" and proceed as usual.
Drop the exported .ipa into the transporter and press "Deliver".
In my case I changed the dns server from my provider to the google dns server (8.8.8. and 8.8.4.4).
I think you can try any other, if your providers dns or what ever doesn't work
Faced the error many times, not sure why.
Try this
Export the ipa after the archive
Add and upload in Transporter
I get 100% success in uploading and feel a little quicker than Xcode's upload.
I actually called Apple Developer Support about this and they solved the problem!
It turned out that my recovery email address in my Apple ID (not the main email address but the recovery one) was not verified. They had me go to http://appleid.apple.com, login with my Apple ID, and then go to the 'Password and Security' section (on the left).
After answering my security questions I was able to resend the verification email, and once verified I was able to log in on Xcode straight away!
I have the observation that with Mavericks and App Nap enabled, a hidden Organizer window within XCODE will cause the network connection to be dropped.
Even if the window is occulated (hidden) for just a second).
Make sure the window is always visible and the problem does NOT occur.

Accessing data from core data when in location background mode

I have a app that get launched in the background mode by location region service , I would like to then display a local notification but I need to access core-data to get info for the notification and to query weather it should show the notification. every thing works but the query wont return any data when in the background , If it is not possible to access core-data at that time is there any other way I can store my data so I can read it while running in the background.
I did get this sort of working I think it is more of a issue with xcode 4.2 which is giving me issues I could access the core data file from the background mode only if I run the app from xcode then after I quit running I must open the app on the phone or simulator by clicking the app icon not the run button in xcode then close the app then the next time a run the app on the phone or sim by clicking the app icon not the run button in xcode then the application will access the core-data database. but local notification now wont work on the simulator unless I run form xcode which will then stop core-data access. I guess Im stuck with not being able to build this app till xcode 4.2 is at standard of xcode 3 where I could just get things to work.
Thanks for the comments I think Ive sorted it out , I did not have icloud on my iphone as its older one and I've been testing on simulator and thats is why Ive had this issue so if any one else has this problem the way to fix it is to start and stop your app in the simulator first as when you stop the app by clicking stop in xcode after running it kill the app the wrong way here is the log "9/02/12 12:46:52 PM Application '*App Name**' exited abnormally with signal 9: Killed SpringBoard[5273]" which then stops the app from accessing core data while in background , Ill send apple a bug report but I dont know if its something they want to fix . PS grate Site helpful thanks to anyone who answers Questions :)

Debugging on iOS without a paid developer membership (3.x)

I currently have it set up for Xcode to Build & Go onto my iPod using this: http://il.youtube.com/watch?v=CHOVdi-kPV0 (A script to tell Xcode that it doesn't need to codesign). This works, except when the app launches, it closes instantly and Xcode says it failed to launch. You can manually reopen the application and it works 100% after. The problem is I need to be able to build & go through Xcode, and have the application stay open so I can debug on the device. Does anyone have a way to do this?
I followed this guide and it worked for me: http://www.alexwhittemore.com/?p=354

App crashed on app store, not in local version

I ran into a horrifying bug when my app went live. It crashes in a spot where it had been fine.
download from app store using complimentary review code
start app
press start button
CRASH
NOTE: crash reoccurs at every app startup until phone is rebooted - then it disappears
When I try to replicate without the app store
start app
press start button
everything is good.
....
I immediately pulled the app from sale. Right now, I can't replicate at all because I can't download the app.
How to debug?
Download the app from the store onto your device.
Gather the crash reports off of the device manually (
Run them through symbolicatecrash (you did keep the dsym's right?)
Find error, rinse and repeat.