Disable asserts in release builds when using Swift Package Manager #44
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When using Swift Package Manager to integrate
PINOperation
into an app, Xcode does not automatically setNS_BLOCK_ASSERTIONS
to1
when building the package in release. This means that anyNSAsserts
that are hit in release cause crashes. This appears to only be an issue with ObjC packages.The change I've made is to
Package.swift
to setNS_BLOCK_ASSERTIONS
to1
when building in release.(Note: I didn't actually hit an assert in this PINOperation, but the possibility is there)