Determine if an application is a development version or version

I need to determine at runtime whether my applications will copy the Production / Development version. Are there any methods to achieve the same.

I look forward to developing a Push Notification API that will send APNS messages to the server accordingly (i.e. a sandbox or without a sandbox).

Any help? than in advance.

+4
source share
1 answer

In this case, you can use conditional compilation and check if you are in debug mode.

In the settings of your project, you had to define a preprocessor macro to indicate the debug assembly:

preprocessor settings

.

, :

    NSString* platform = @"ios";
#if DEBUG
    platform = @"ios_sandbox";
#endif

#if DEBUG #endif , DEBUG=1 ( ), platform ios ios_sandbox .

+4

All Articles