App crashes before opening on iPhone - ios

I have an app which works perfectly on the simulators. This app also worked perfectly on an iPhone* for a couple of months. After a few weeks of this app not being opened, the app crashes when I attempt to open it. It looks like its about to open but it quits.
If I double tap the Home button to display my cached apps I can see it there amongst the other cached apps and it looks fine, displaying on-screen elements and images(which are saved and retrieved from the filesystem) correctly. If I tap it, it again quits before running.
I was hoping to release this app asap as it is finished. I've searched the net for solutions but have not found any. I don't know what particular information may be needed to figure out the problem but please ask and I'll respond with it. I am relatively new to ios development.
*iPhone 5s running latest ios9 update

The latest version of Xcode is 7.3. You need to update your Xcode to the latest version to be able to upload to the latest version of iOS.
EDIT: I forgot to mention this earlier. The latest version of Xcode requires El Capitan (OS X 10.11).
EDIT 2: OP has now revealed that a provisioning profile is being used. These only last about a month. After they expire, the app is no longer trusted and will show the described behavior. This can only be solved by re-signing the code, which requires either a new provisioning profile or a Developer ID. In any case, after the code is re-signed, it has to be reinstalled, and installing onto the latest iOS requires the latest Xcode.
Sources coming soon.
OK, so I seem to be having some trouble finding the site where I found this information in the first place...
However, from the App Store:
Xcode 7.3.1 includes [...] SDKs for iOS 9.3 [...].

Related

Fabric causes errors when testers try download app

My testers have problem with an app I had uploaded to Fabric Beta. During normal testing they uninstall already installed app from their devices and they download new version from Fabric. In that case everything works fine. App will download and launch properly.
Problems begins when they want to test situation when future app's users update my app from AppStore. My testers want to check if updated app will not crash.
Test case is easy:
List item
Download app from AppStore.
Launch it.
Download new version from Fabric (new version should override old)
Launch it.
App should not crash.
Problem appears in (4), Fabric shows error "download problem detected". (Note that everything works if there is no old app on device.).
Fabric has problems with overriding apps?
Fabric (1.7.7)
iOS 11
iPhone 6s Plus
PS. This test is important. Crash will appears when I change database model without migration for example.
Paul from Fabric here. Did you uninstall the App Store version of your app first? Since iOS 9, Apple changed its policy to prevent apps from being installed over the existing App Store version by 3rd parties, so you need to delete the original app before installing the Beta version. For more information, see our docs here: https://docs.fabric.io/apple/beta/tester-experience.html.
And the other reason could be if any other app is installing or updating parallelly, Fabric will not be able to install. Just faced the issue :)

xcode 9.3 session expires every time i close and re-open Xcode

i am seeing my account show "Your session has expired. Please log in." in Xcode->Preferences->Accounts every time i restart Xcode, even though I log in successfully in-between restarts. Also, my command line xcodebuild is failing because it says the user session has expired.
We tried deleting and re-adding the user, and it did not solve the issue. We turned off 2-factor auth and turned it back on, and it also did not solve the issue, although we were seeing it allow the login w/o 2-factor auth for a while, until we turned it off and back on again, and then it started asking for a code again.
has anyone seen this behavior?
Xcode 9.3 now uses Keychain Access Groups to store your Apple ID credentials in the keychain. On launch, it attempts to migrate any existing credentials from previous versions of Xcode into the access group. In some cases, that migration appears to fail.
You likely don't need to install older versions of Xcode to work around this. If you remove your accounts from Xcode; quit Xcode; open Keychain Access; find and delete any "Xcode-Token" or "Xcode-AlternateDSID" entries; relaunch Xcode; and add your accounts back, then your accounts should work properly in Xcode 9.3 from that point on.
If you are capable of reproducing this issue, I'd like to request that you file a bug at bugreport.apple.com and attach a sysdiagnose from your machine.
Update
Thanks to everyone who filed bug reports! We've identified the issue and apologize for the inconvenience this is causing. In the meantime, you can avoid this problem by setting a user default. In Terminal, enter this command:
defaults write com.apple.dt.Xcode DVTDeveloperAccountUseKeychainService -bool NO
Then relaunch Xcode and reauthenticate your Apple ID accounts in the Accounts preference pane if necessary. From that point, you should be able to quit and relaunch Xcode without needing to reauthenticate each time.
After going through a long list of things to try to fix this error (created new user, 2FA on/off, sign in/out iCloud, restored keychain, copied user off another machine etc.) without success, I tried a long shot.
Given that I only see this problem on fresh install High Sierra machines with a brand new install of the latest Xcode (upgrades seem fine), I wondered if the issue is visible in previous versions.
As I had the Xcode 8.3.3.xip on the network, I unpacked, installed and launched. It had the same expired session issue so I signed in again (the process was slightly clunky but worked) and then quit Xcode and relaunched. After the second attempt, not only did the session persist in version 8.3.3 but much to my surprise, Xcode version 9.3 now works fine too.
So my suggestion is to go to Apple Developer and login and then go to See More Downloads and get a previous version and try that. The 8.3.3 file I used can be downloaded from there. I didn't delete my existing 9.3 install, I simply renamed the unpacked 8.3.3 version to an alternate name and had both sitting alongside each other in /Applications allowing me to repeatedly launch each in turn for testing.
Apple just released Xcode 9.3.1 which should fix the issue.
From the release notes:
Fixed an issue causing the user to have to log in with their Apple ID
repeatedly. (39573406)
Because my account was new here, I cannot just add a commit to support #TendrilSix.
TendrilSix's answer above could solve the problem.
If you're facing the same issue, just install Xcode 8.3.3 back, and log in your dev account inside Xcode 8.3.3.
The most IMPORTANT thing,
If Apple didn't fix this issue in future. DO NOT UNINSTALL XCODE 8.3.3.
We found on our dev machines, this problem only happened on mac which once has both Xcode 8.x and 9.x installed together.
After uninstalling Xcode 8.3.3, Dev accounts login freshly in Xcode 9.x will experience "Your session has expired. Please log in."
If a mac once had both 8.3.3 and 9.3 installed.
Only log in 8.3.3 was available, the login behavior will add 17 items in Keychain. Including "Xcode-Token" & "Xcode-AlternateDSID"
Log in 9.3 will only create 15 items in Keychain. Missing "Xcode-Token" & "Xcode-AlternateDSID"
If a mac upgrade from Xcode 7.x 8.x 9.x and never has two or more different version of Xcode installed together.
Log in 9.3 will create 17 items in Keychain, and dev account works properly.

Unable to update to Xcode 8.3

When I tried to update to Xcode 8.3, the following happened in App Store (it has been like this for over an hour):
So it just says "loading" and nothing happens.
What I already tried:
Mac restart
Logoff and Login to the App Store
Any ideas?
btw: My Apple membership expires in 5 days - could this be a problem?
Xcode 8.3 requires macOs Sierra
release notes Xcode 8
I was facing the same issue with macOs El Capitan
Just sign in on developer.apple.com, and go to https://developer.apple.com/download/more/, you can find Xcode8.3 there and download. Good luck!
Well, there's a challenging way to modify and run it if you get it from the Developers portal. :) Not as your primary Xcode instance, but experiments are possible. :))
I upgraded my mid-2012 mac book pro to Sierra. But still was stuck with spinner.
This helped solve it. - (link to the apple discussion forum)
"Going to Applications in Finder and moving Xcode to the trash bin fixed the problem for me. As soon as I entered in my password to confirm moving Xcode to the trash, the App Store prompted me on whether or not I wanted to cancel the update or delete the app. I opted to delete Xcode, and the App Store immediately began downloading the update."
If you have an Apple Developer account, download the latest xcode directly from here: http://adcdownload.apple.com/Developer_Tools/Xcode_8.3/Xcode_8.3.xip.
Note: if you are unable to install the latest OS, at this time: OSSierra, then you will not be able to be able to install Xcode 8.3 to my knowledge (I was not able to. I had to get a new computer, which I had to do).
wait for 8-10 minutes without pressing pause or cancel or so.
just wait. and it will start while you eating popcorn.
even though it not started to update and stuck at 0kb, the term you have to focus is "patience".
Just go to App Store and click on Store -> Check for Unfinished Downloads.

Xcode 7.1 (7B91b) You are not authorised to upload to the App Store

I downloaded Xcode 7.1 from the App Store today after working from 7.1 beta downloads from developer.apple.com and have a new iOS app build to upload. So I did:
Product > Archive
Upload to App Store (or Validate)
But the response was:
You are not authorised to use this service
Intriguingly, when I 'Export' the build to the Desktop and then use Application Loader 3, it uploads without error.
Is this an iTunes Connect bug? Or is there a new Xcode checkbox I've missed?
Note: I've also tried removing and re-adding my AppleID as suggested here, and restarted my Mac for good measure (which actually allowed the validation to work once), but still no luck uploading directly from Xcode > Organiser.
I met the same issue today and I think it is a bug of Xcode 7.1
Finally I managed to submit my app via Application Loader. There were warnings but it did work.
Here are the basic steps:
Archive
Export
Xcode menu --> Xcode --> Open Developer Tool -->
Application Loader
Double click "Deliver Your App" and choose the
file exported in step #2
click next and follow the instructions until
the end
Here's the quick solution:
Don't use Xcode beta versions to submit apps for release — it's beta for a reason and shouldn't be used with production code.
Submitting Apps
Apps that are created using beta versions of Xcode or that are built
for beta versions of operating systems will not be accepted on the App
Store and Mac App Store. Apps that you submit should be developed
using the latest version of Xcode from the Mac App Store and should be
built for publicly available versions of iOS, OS X, and watchOS —
except when GM seeds are available. When a GM Seed of Xcode becomes
available, use it to develop your app for submission. When GM seeds of
iOS, OS X, or watchOS become available, build your app for these
versions.
↳ https://developer.apple.com/support/pre-release-software/
Having the same problems as all of you, just thought I'd share that I found a way to Validate successfully, you have to disable the "Include bitcode" checkbox before moving forward. As for the actual upload to App Store, no work around for that one other than use the Application Loader...
Also I've been seeing this too since XCode 6.4, but it seems once the current version has a couple of months after it's originally released it starts working again... fingers crossed that it starts working again soon, because uploading straight from Organizer is so much better. (I saw the Beta Version post, when I say after a couple of months for current version I'm not talking about Beta versions, just in case ;) )
Same problem here.
Downloaded Xcode 7.1 from the App Store and it refuses to upload a new version.
Happily Application Loader worked ;)
Hopefully this gets fixed quickly.
One possible reason for the issue could be multiple development accounts under one name (personal and company). I've read elsewhere (apple radar) that that caused earlier problems of this kind.
Happens here if the dev account is only admin. I had to use the central account for uploading our apps. I think this problem startet sometime with XCode 6. Didnt investigate further though since Application Loader works in cases when I dont have access to the central account.
I also have the same problem today.
Finally, I used the application loader to upload successfully,too.
Theres a few solutions I have come across to solve this issue.
Most common being to remove and re-add your developer account.
This won't work on its own though, you need to also 'view details' on your account and have Xcode download your provisioning profiles again.
The other alternative is to upload your build using application loader. The disadvantage to using this solution is that should you be trying to upload using a beta build of Xcode or OSX you won't be able to change your apps .plist in the archive folder to trick iTunes connect into accepting it. In this instance all you have access to is your ipa.
Disable the "Include bitcode" checkbox worked for me.

Why is My Updated App Crashing on Launch for IOS8 Only?

I recently (October 2nd, 2014) submitted a new version of our app for IOS8. Previously it launched and ran on IOS8, but had some bugs, which I fixed before resubmission:
Upgraded Stripe's Pod, because I was using an older version which began to experience an SSL error with IOS8.
Updated my CLLocationManager code to use kCLAuthorizationStatusAuthorizedWhenInUse (because IOS8 isn't backwards compatible for requesting the kCLAuthorizationStatusAuthorized status).
Added a new, non-critical Swift view controller, to test using Swift in the same project/interoperability.
The app was granted expedited review, but when the new version finally appeared in the app store I was in for a nasty surprise.
The app crashes on launch when on IOS8 devices. Whether an upgrade, or fresh install (delete app + data & re-download), but it doesn't do this on IO7.
I've reached out to Apple for help resolving this, because the binary I sent them worked fine on my IO8 device, and my other IOS8 testers through Testflight—as well as on IOS7. The submitted binary should launch fine, but it won't.
Some research:
This post citing a similar problem was created today at 1:34am GTM, before being deleted. Thanks Google Cache.
Back in June of 2012 Marco Arment discovered that Apple was messing with his submitted binaries, causing them to "crash immediately". Not super useful, but it's interesting that this is potentially a problem.
Does anyone know what else could be causing this, or even how to go about debugging the issue? I'm perplexed because of how it runs perfectly over Testflight, etc.
This was a bug in the code signing process on the App Store, and has been fixed. The affected apps have had their code signatures fixed and are being pushed out as updates.

Resources