Can an ipa file be created in debug mode?

Two questions on ipa files.

  • Can an ipa file be created in debug mode? If so, how do you archive a file in debug mode?
  • Our ipa file after installation on the device displays our logs to the console. Can we turn off logging features on the console?

My environment is Xcode 4.6 and iOS 5 and 6.

+7
source share
2 answers

About the first question, yes, you can archive the application in debug mode. From Xcode, browse the Product, Schema, Schema Management, Edit menus. Select the Archive action in the left pane and select Debug as the Assembly Configuration from the drop-down list.

If you want to limit logging to Debug configurations only, you can add this to your ProjectName-Prefix.pch :

 #ifdef DEBUG #define XYZLog(format, ...) NSLog(format, ## __VA_ARGS__) #else #define XYZLog(format, ...) #endif 

Where "XYZ" is the three-letter prefix for your application (Cocoa naming convention).

Then you should use XYZLog instead of NSLog in your code, and the output will only go to the console for Debug versions.

+16
source

So, to create a debug IPA, you will need to save it and save it for Ad-Hoc or Enterprise.

As for logging into the console in this ad assembly, there are several ways to do this, see this answer .

0
source

All Articles