datatheorem / TrustKit

Easy SSL pinning validation and reporting for iOS, macOS, tvOS and watchOS.
MIT License
2.01k stars 362 forks source link

Use NS_BLOCK_ASSERTIONS for SwiftPM release builds #272

Closed echamberlain closed 2 years ago

echamberlain commented 2 years ago

Xcode doesn't automatically set the NS_BLOCK_ASSERTIONS flag for SwiftPM release builds.

Use cSettings to set the flag, so NSAssert doesn't crash release builds and behavior is similar to using Carthage or Cocoapods.

See https://forums.swift.org/t/assertions-in-swift-packages/42692 for more info.

Fix for #261

nabla-c0d3 commented 2 years ago

Thank you!

mflint commented 2 years ago

Hello all - do you have any plans to incorporate this fix into a new release?

CongL3 commented 2 years ago

Hey, also wondering about when this will be added to a new release? Any plans or eta?

Thanks.

sjoness commented 2 years ago

Thank you for contributing this fix 😃 I am also wondering if there are plans to include this in a new release? Any input would be greatly appreciated 👍

nabla-c0d3 commented 2 years ago

I just released the fix as part of v2.0.1 (https://github.com/datatheorem/TrustKit/releases/tag/2.0.1). Thanks for your patience!