简体   繁体   中英

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?

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM