开发者

how do I debug a distribution build

开发者 https://www.devze.com 2023-03-24 06:46 出处:网络
Ok SO recently I\'ve being having a lot of trouble with an application working in debug mode but not working in distribution mode.

Ok

SO recently I've being having a lot of trouble with an application working in debug mode but not working in distribution mode.

Is it possible to use xcode debugging tools such as break point开发者_开发百科s and variable tracing with an adhoc distribution build of an app?

If it's not how would one usually go about debugging such a thing?


Assuming that your crash logs aren't giving you any clues (you'll need to hook up to the device to get them) there are lots of things you can do.

But I'd start by looking at the crash logs ... the clues will be there and don't forget Apple make distribution crash logs available to you through iTunesConnect.

1) Copious logging is one thing. Lots of developers use a switch so that in debug, logs go to the console but for other builds they are dropped. Consider a different option where you log to a file instead. You could then push the log files to a remote server for debugging. It's a bit of a slog to set this all up, but once you've done it, you'll wonder how you ever lived without it.

2) Another option is to use Flurry and log events when you detect that things have gone wrong. This can cover more controlled problems when things aren't as expected rather than random crashes. This can be a useful feature for released apps provided your terms and conditions are clear about what data you are logging and why.

3) Make sure you do a clean build, I'm sure you've already done this, but sometimes it clears these issues.

4) Are you using external libraries / modules? I've come across issues with older versions of TT where the arm6/7 build settings were wrong and this was causing issues for distribution builds. Basically check through the build settings for each profile and make sure it is what you expect.

5) Suspect a race condition. In distribution mode (often because the logging is turned off) you will find that your application runs a little bit faster. That can reveal timing issue bugs in badly written code.

So yes ... there is a lot you can do ... you just can't attach the debugger ;-)


Not possible to debug an application in distribution mode.

The build configuration difference between Distribution, Debug, and Release is really whatever parameters you have set for that in XCode. If your Distribution config is giving you problems and the release isn't, the easiest way to fix it is to go back through Apple's steps on copying the Release config and making the changes to make it a Distribution config, like you did originally.

The alternative is to go through every line of the configurations for Release and Distribution and find what's different. The other way is a LOT faster. :)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号