2

I want to run my app in the debugger. Is there any way to do this without adding it to the apple portal?

Or perhaps an enterprise provisioning profile be used for debugging?

kraftydevil
  • 5,144
  • 6
  • 43
  • 65

3 Answers3

6

No. You need to be running on a device that is enabled for development. This will need to have been added to your development portal.

An enterprise-signed app won't even allow a debug connection.

You can run it in the simulator and attach to that without a provisioning profile however.

davbryn
  • 7,156
  • 2
  • 24
  • 47
  • 1
    Since XCode5 you can use the Organizer (Xcode->Window->Organizer) to add devices and provision them. Click your device and choose "use for development", then at the bottom click "add to member center." Its way easier than before. Thanks apple! – Joe Andolina Jan 31 '14 at 18:44
  • To add, on a jailbroken device, debugserver can be patched to allow attaching to any binary, including release and enterprise ones. – Léo Natan Jan 31 '14 at 18:49
  • it's true @JoeAndolina, that option does exist, but I'm working in an organization with many developers who often need to troubleshoot on actual devices, so we're running out of device slots. – kraftydevil Jan 31 '14 at 19:41
  • If I can use an Enterprise account to install on any device, I don't see the harm in being able to Debug on any device. Thanks Apple... – kraftydevil Jan 31 '14 at 19:47
  • KraftyDevil, I hear you. I wish Apple gave us the ability to remove devices. Its frustrating having devices from people who have left the company taking up our slots. When we run out we get new developer accounts. I believe its way cheaper than the enterprise route. – Joe Andolina Jan 31 '14 at 19:51
  • "NO" cannot be the answer. I downloaded a sample app from somewhere on the internet. I don't remember the name. But, Accidentally hit the "Build n Run" button. And to my surprise, It did installed n run on my device. – jeet.chanchawat Jan 04 '15 at 10:54
  • @jeet.chanchawat - Using enterprise development provisioning profile we should be able to debug the app right I mean using break point etc.. – Durai Amuthan.H Feb 16 '17 at 16:46
  • Debugging an Enterprise-signed app is not allowed. I've seen this bite developers. It is not the purpose of an Enterprise app. It is however, a great way of passing around binaries as long as you don't need to debug. If you're running out of Device slots you could use multiple developer accounts. – Cameron Lowell Palmer Jul 20 '18 at 04:52
1

It's now free with Xcode 7 (beta): https://developer.apple.com/xcode/

Now everyone can get their app on their Apple device. Xcode 7 and Swift now make it easier for everyone to build apps and run them directly on their Apple devices. Simply sign in with your Apple ID, and turn your idea into an app that you can touch on your iPad, iPhone, or Apple Watch. Download Xcode 7 beta and try it yourself today. Program membership is not required.

Hollerweger
  • 975
  • 1
  • 13
  • 32
0

General advice

You must bend your development style to match Apple's requirements. If you plan to release to the AppStore, you shouldn't spend an extraordinary amount of effort bending Apple's system to your desires.

Enterprise account

Enterprise accounts can be very useful for basic UI testing, and if you have good crash and regular debug logging through a service like Hockey and CocoaLumberjack you can actually do quite a lot of testing without needing to provision each device. Remember direct (USB) debugging with your Enterprise app is disallowed.

Jailbroken device

If you have a jailbroken device you can load apps and change the entitlements of the app to run. To change the entitlements arbitrarily I use tools like Saurik's ldid which I've made easier to compile using CMake.

Entitlements

The hardest part with repackaging apps to load them is dealing with entitlements. While some things can be bypassed, network-oriented entitlements like APNS, iCloud and Siri become much more difficult to hack out without loss of functionality.

Cameron Lowell Palmer
  • 21,528
  • 7
  • 125
  • 126