You can clone with
HTTPS or Subversion.
I've discovered an disturbing issue with triggering NSAssert macro in Release code. The problem was discovered in libs managed by CocoaPods.
By default, every xcode project has a -DNS_BLOCK_ASSERTIONS=1 in Release/AdHoc configuration. Is there any way to add these flags to Pods project or maybe to .xcconfig by default?
Should be included in:
This is indeed something that needs to be fixed.
It was also recently brought up on the mailing-list. @olarivain, do you have an idea on when you could work on this?
Btw, another one to be optionally included is NDEBUG (shuts down assert(), etc)
Added set_dns_block_assertions_flag! to fix #802
I added ability to add this -DNS_BLOCK_ASSERTIONS=1 via flag set_dns_block_assertions_flag! in Podfile.
Or maybe it's better just to add this as a default option?
This has been fixed in Xcodeproj of which we’ll release a new version today: CocoaPods/Xcodeproj#53.
Hey @alloy is there a way to disable NS_BLOCK_ASSERTIONS? My Pod uses assertions to verify some absolutely critical preconditions for the use of my APIs. Disabling asserts doesn't mean that those preconditions go away--it just makes it harder for the user to find out what went wrong if they misread the docs.
EDIT: Pardon, I misread the change--it looks like assertions are still enabled in debug. That's fine then.
I've run into a similar issue today on one of my projects. We have two development components (one managed by a separate pod) that uses many custom-ly named debug schemes. However, we just found out that none of the assertions that we have set in our pod project are ever being fired in the other debug schemes because CocoaPods automatically blocks assertions for any build schemes not named "Debug". Is there any way to disable setting -DNS_BLOCK_ASSERTIONS=1 for custom schemes without having to manually change it after every pod update?
Reviewing CocoaPods/Xcodeproj#166 I think that the assertions should be handled by CocoaPods. Actually I'm wondering if they should be handled at the spec level?