App freezes several seconds before start on device - ios

I'm a free developer and I use my swift application on my iPhone 7. I'm using Swift 3 and iOS 10.
So the problem is, sometimes (like 2 of 10 times) when I start the app, iOS freezes like 5 seconds before my app actualy comes to the screen. In this time I only see the app icon is in the highlighted state. This only happens with my own app, not with other apps.
My app also does nothing special on startup and this only happens on the real device, the debugger in Xcode always starts immediately.
So is this a normal behavior? And does it work properly when I decide to put it on the App Store?
Thanks in advance.

I have had this happen to me before. No, this does not happen when it is put out on the App Store. One way to get around this is to use TestFlight. You can upload your archive to apple and select on the 'TestFlight' tab of your app. Click on internal testing and then click on your email and the version of the app you want to test. You should then get an email on your Apple ID telling you to test the app, and it will let you download it. Good question :)

To test the same version which would have been uploaded to the store quickly, change the build configuration to release. To do so, click on your app's name (top left), press edit schema, click the build configuration dropdown, also deselect debug executable. (make sure to turn it back when you're going to debug, or create a new schema with the above settings to let you switch quickly in the future)
You might also try using instruments, that lag on startup might happen if you're trying to load many things in memory on your initial view controller's viewDidLoad or app delegate's didFinishLaunchingWithOptions load, especially when trying to load big files such as images, videos or large plists. You might want to try using instruments (the time profiler instrument specifically) in order to check it out.

Related

Two Ionic apps on iPhone appearing to open each other

I have two completely different Ionic apps running on my iPhone and I can get one to open the other and visa versa!
First app, App-V3, is an Ionic V3 app that has been in production for years and has been downloaded for App Store. Second app, App-V4, is an Ionic V4 app that is still in development and loaded onto my phone with Xcode. The code bases are completely different as are the back-ends and remote databases.
Procedure: both apps have been stopped, i.e. will restart, display launch image, to open.
Either app - start, wait for launch image to come and go, and then the app becomes live.
Close this app using home button on my iPhone6S.
Then immediately open the other app.
The correct launch image displays but the original app appears!! The order makes no difference, start with App-V3 or App-V4, will have that app running in the other with above steps.
This does seem to be time dependent. After opening one app, after that app becomes live, if I wait for approximately 6 seconds or more, then close it, and immediately open the other app, then this app will start correctly. It seems that if I wait for only 5 seconds or less, then I will see the issue.
I would like to understand why this is happening. Thanks.
Maybe you have the same Id in the config.xml of your both projects, I know in android wont let you install it if its the same.

removing a beta test (testflight) app on an iphone

A colleague of mine has installed a beta app of mine a year ago on his iphone with the use of testflight. Now he cannot delete the app anymore.
The normal move of the icon for deinstallation is simply ignored.
How to delete/uninstall an app after testing?
I'm an React Native dev who's more used to Android, so I also had trouble with this.
Turns out I was deep pressing (force pressing?) the icon instead of long pressing. You have to make sure you're only pressing lightly in order to make the 'x' icon appear, otherwise you get a menu of options like 'Send Feedback'.
This is slightly going off of guess work but will explain as best as I can.
I assume that when you launched the app you did so via iTunes Connect and inside the TestFlight tab?
If so then the TestFlight build should have an expiration date next to it of when the app will stop working. If that doesn't exist the other thing to check is the 'All Testers'tab, move the mouse of the right hand side of the person's name and remove them. That might force the app to delete.
Short of that, the only other thing I can suggest is to meet with the client and try and press and hold on the app and see what happens. You could also go onto the TestFlight app on their device and see what the information says in there.
I hope that helps!

iOS App takes long to launch

I've been experiencing, of late, a weird problem with every App I create. When I deploy it to a device, I notice that it takes a long time to launch. Whether I'm debugging via Xcode or just launching it anywhere, anytime. When I tap the App icon, it takes about 4 seconds before the actual App launches. During that time, the device is pretty much frozen until the App launches.
However, I have an App that's been distributed through the App Store and it doesn't seem to have this problem. It launches immediately. But when I provision my phone via Xcode (the same App that's on the App Store), I experience this problem.
My question is, is there some sort of debug info that's built into the App binary that causes these long delays during launch that's not built into release versions? If so, is there a way to disable it on debug builds?
I believe it's bug on xcode 6 I've experienced the same issues. I've figured out a way to launch my apps quicker.
Set Xcode to build into a fixed DerivedData location—otherwise every time you blow away DerivedData, you’ll have to repeat all these step. Go to XCODE
Settings > Derived Data > Advance > Select "Unique"
Make a new script. Say: quick_compile.sh. Give it the standard “#!/bin/bash” or whatever at the top and chmod +x it. 3. Do a clean build of your project. 4. Go to the Xcode Report navigator (Cmd-8), and choose the report for your recent build. 5. Type “merge” into the upper-right hand filter, expand the log for the “Merge Khan_Academy.swiftmodule” phase, and copy the contents minus the first line into your script.
Do the same for “i386.swiftmodule”. 3. Do the same for “link”. 4. Do the same for the file you’re iterating on (e.g. ContentItemView.swift); put this at the top of your script
Once you’ve got this set up for a file, just run your script to update the build for that new file. 2. Launch the app with Cmd+Ctrl+R in Xcode.
You’ll have to repeat these steps whenever new files are added to the project or to change the file you’re iterating on, unfortunately, but it’s good when you’re working on something focused
I Learned this efficient method from #andy_matuschak twitter he made
a post a while ago on how to do this so i don't take any credit for
it. I believe he released a PDF explaining it better. If you can't follow these instructions look for the pdf file
I was seeing the same problem #purrrminator was. I have an iOS 8.3 device used for testing here at a large company with a good number of provisions that ultimately found their way on to this thing. I app I'm testing now was taking many seconds to launch.
Based on:
https://apple.stackexchange.com/questions/148792/installed-provision-profiles-not-seen-on-ios8
What I did was set the time manually to a date well into the future allowing the existing provisions to expire and get auto-pruned. A quick reboot (for good measure) and a fresh install of the app and I was good to go (a reset was not an option for me).
Try to reset phone settings (not content!). It may solve some performance problems occasionally.
The only reason that I've experienced the same problem was in fact that I got tons of provision profiles installed on the device. Our development team has over 100 apps, so iOS has to deal with all the provision profiles mess while launching the app.

iOS 8 enterprise apps are stuck in limbo inside the device

In trying to release a new update to one of my enterprise iOS apps, I'm finding that the OTA download is failing. It will give me the "Would you like to install 'xxx'" alert, and tapping 'Install' is about as far as it will go. There's no indication that anything is happening. This occurs on my iPhone 6 and iPad both running the most recent release of iOS 8.
Running the devices on the iPhone Configuration Utility, it shows the list of installed apps, and the one app that is refusing to install has an "Install" button where all the others have "Uninstall." In the screen cap below you'll see the renamed bundle and the original bundle.
When I click the "Install" button, the iPhone Configuration Utility crashes.
I managed to get it to work using a workaround that I found elsewhere on StackOverflow, which requires renaming the app's Bundle Identifier, but it still seems like a pi$$-poor way to do it.
It seems clear that the app is somehow stuck in limbo, showing up on the app list but not showing up on the iPhone screen, and also is refusing to be overwritten. My question is, is there a way to purge the old app from the iPhone's memory, and possibly reload it using the original Bundle Identifier?
Apple still hasn't fixed this correctly in even the latest versions. There are several manifestations: the app does download, but the device doesn't quit the calling app, so you don't know if the app downloads or not. If the app was never on your device before, it usually downloads. If it was there before, and was deleted, it doesn't download. If the downloaded app is already running in the background, or you're doing in-app downloading, it often doesn't download because it doesn't want to replace a running app. I usually start the download, then switch immediately to the springboard to watch it download. If I see the clock dial on the app icon, then I know it's downloading. Changing the bundle is not a good thing, not to mention not giving any user feedback when you tap "Install."
As far as updating the app from the in app prompt.
It's a problem with apple/ios8. They aren't exiting the app after the install. If you quickly tap the home button after you hit install. Occasionally you will get a successful download.
For future use you could find out a way to use exit which will kill the app but apple warns against using exit due to poor user experience. But if apple isn't providing a good user experience in the first place for this process I think this warrants the use imho.

iOS app won't start after app upgrade

One user has a problem with one of my apps after the latest upgrade. She says the app will not open. It sounds like she sees the Default launch screen for a second and then it disappears i.e. it crashes when trying to run app code.
Also, she says when she double taps the Home button to see the apps currently running, she sees my app, with the "normal" type of screen i.e. a table with a few entries (which was created with the version prior to the upgrade).
She has tried powering off and on.
Can anyone offer any suggestions on what might be happening. No other user has reported the same problem.
It may be that she could remove the app and reinstall, but then she would lose all of her data which would be bad. Is there any way of reinstalling without removing from the iPhone?
EDIT: I just got a little more information from the user. As I said before, after the crash, when she presses the Home button twice to see running apps, she sees my app, with a few entries in the opening screen table. What is interesting, for the upgrade, I changed the order of the entries. I also added a tool bar with 2 buttons. She sent me a screen shot and what she is getting is the screen you would expect when running the old version i.e. the table ordered in the old way, and no toolbar. I don't know if this just means my app started to run and crashed before reordering the table and adding the toolbar, or if the installation got corrupted so she is not really running the new application properly. Does that sound feasible? Would there be any way to reinstall the app without removing it (and its data) first?
Are you using CoreData? If you are, and you made changes to the manage model without properly migrating, you may have caused your app to crash.
Look here for more information:
https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/CoreDataVersioning/Articles/Introduction.html

Resources