Ganesh Nayak
Ganesh Nayak

Reputation: 798

Is the code within #define macro added in the build?

I have certain lines of code within a macro

//#define EnablePushNotification

#ifdef EnablePushNotification
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound|UIRemoteNotificationTypeAlert)];
#endif

My question is "whether the .ipa file generated will contain the code inside "EnablePushNotification", if the "EnablePushNotification" is commented out?

Upvotes: 1

Views: 77

Answers (1)

dsgriffin
dsgriffin

Reputation: 68556

Comments are processed before the preprocessor kicks in, so no it will not.

Upvotes: 2

Related Questions