Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use DEBUG preprocessor flag to conditionally disable assertions in prod #711

Merged
merged 1 commit into from
Aug 24, 2017

Conversation

tonyxiao
Copy link
Contributor

@tonyxiao tonyxiao commented Aug 24, 2017

@ladanazita @TeresaNesteby

Tested manually w/ @TeresaNesteby in test app and confirmed working.

@tonyxiao tonyxiao merged commit b90bd1c into master Aug 24, 2017
@tonyxiao tonyxiao deleted the assert-in-debug-mode-only branch August 24, 2017 23:57
@@ -146,6 +146,7 @@ static id SEGCoerceJSONObject(id obj)

static void AssertDictionaryTypes(id dict)
{
#ifdef DEBUG
Copy link

@NachoSoto NachoSoto Sep 15, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be #if DEBUG.
If DEBUG is defined as 0 this would evaluate as true :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. However in practice that's not how most projects (including Pods.xcodeproj) are setup though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants