3

While using Xcode 5.1 to deploy our iOS application I am seeing quickly build and say "Running on iPad Name" but it doesn't launch the application for a little over 7 minutes. When I tap on the status bar at the top for more information it says "SandboxingApplication."

This does not happen on other iPads that we use with the same application.

Any ideas? I've tried all the basics like restarting the device, Xcode, and my computer.

holex
  • 23,961
  • 7
  • 62
  • 76
kyleplattner
  • 633
  • 1
  • 6
  • 16
  • 1
    I've experienced such thing when I got a project which used _cocoa-pods_, the symptoms was similar to it, but I can't recall what the status bar message was exactly, but it had taken 4-5 minutes to compile and run the project on real device. finally I removed all _cocoa-pods_' references and I have created subtrees and submodules instead; the project was 'healed', I was able to compile and run it in 25-30 secs after. – holex Jul 24 '14 at 10:21
  • That's when the "copy pods resources" takes a long time to run, I think, that's not the case (for me, anyway) – jrturton Jul 24 '14 at 10:25
  • 2
    try to delete DerivedData of your project, clean project (Shift+Command+K), remove app from ipad and run project again. – flowmachine1 Jul 31 '14 at 01:00
  • 1
    What Mac are you using? – idmean Jul 31 '14 at 05:52
  • @flowmachine1 that worked! Thanks so much. It now deploys quickly again. I really appreciate the help. – kyleplattner Jul 31 '14 at 11:48
  • @wumm I'm using a 2.6 GHz Retina MacBook Pro with 16GB Ram. – kyleplattner Jul 31 '14 at 11:48

5 Answers5

1

You already said it:

This does not happen on other iPads that we use with the same application.

That's the point, you'll have to reinstall the iPad. Some time ago I had a iPhone 3GS for testing on which it sometimes also took minutes to launch the app. Xcode behaved like what you described, showing "Running on DeviceName".

But although this iPhone is older it hadn't been always this slow. After I restored it from iTunes it again was pretty much faster.

idmean
  • 14,540
  • 9
  • 54
  • 83
1

Finally with the help of @flowmachine1 this is solved! It was fixed by:

  1. Deleting Derived Data
  2. Clean Project
  3. Delete App and Reinstall

Thanks so much!

kyleplattner
  • 633
  • 1
  • 6
  • 16
0

It could be really any issue, but here are some troubleshooting tips.

  1. Restart Xcode and iPad (You already did it)
  2. Try to create a new Project, and try to run it on the iPad Air (Let me know the comments below what happens)
  3. Reinstall Xcode (Most common fix)

Also report to Apple, if none of those fixes work, https://developer.apple.com/bug-reporting/.

Thank you.

Pixel Code
  • 169
  • 1
  • 13
0

I've nailed down one cause, for my situation at least. The app's sandboxed area is huge (gigabytes) as it contains a large amount of resources (as discussed here). Wiping out these resources prevents the delay in the sandboxing process (with the unfortunate side effect of rendering half of the app unusable).

I can only assume that, as part of attaching the debugger, some processing of each file in the sandbox has to occur every time, and it is this process that is taking the time.

The resources are in the application support directory. If anyone knows of a way to mark or relocate these files to improve the speed of the sandboxing process I'd be very interested to hear (and would award the bounty).

Community
  • 1
  • 1
jrturton
  • 118,105
  • 32
  • 252
  • 268
  • Our app is only 27Mb so I'm assuming mine is a different issue. – kyleplattner Jul 24 '14 at 16:57
  • Out of interest, what else is on the device? I've noticed that other apps can be quite slow sandboxing when the huge app is installed as well. We also think it might be a broken / breaking lightning port on the test device... – jrturton Jul 25 '14 at 09:57
  • iPad Air. I found another developer complaining that the same thing happened on his iPad Air. Not sure if it matters or not. – kyleplattner Jul 25 '14 at 13:20
0

Well, I'm running apps on an iPad Air here and it runs in just a few seconds, using Xcode 5.1 and Xcode 6 (beta 4). So, I'd guess three possibilities here:

  1. Your Mac's HDD is failing, or your app is very large (having GiBs of files OR thousands and thousands of small files). You already said your app has 27MB, so size shouldn't be the issue here. Unless you're talking about a 27MB .ipa file, which is compressed. If your IPA contains 27MB, the app itself can be rather big (not enough for 7 minutes sandboxing time, but affects the sandboxing time.)

  2. You're out of RAM memory on your mac, which causes memory swapping. This can easily lead to 7 minutes build time.

  3. Your USB cable (or port) is damaged. I tried using a damaged cable before, and even with the basic templates that Xcode has I would take several minutes to run it on the device.

B.R.W.
  • 1,566
  • 9
  • 15
  • Sandboxing is done on the device, so points 1 and 2 don't really apply. 3 is a possibility, though. – jrturton Jul 28 '14 at 19:17
  • Oh, I always thought sandboxing was done on the Mac, as part of the "packaging" process. But still, the 3rd guess still can be the cause. Try using another cable :) – B.R.W. Jul 28 '14 at 19:31