promotedai / ios-metrics-sdk

iOS client library for Promoted.ai metrics tracking.
MIT License
7 stars 1 forks source link

Add build flag support for error handling #186

Closed yunapotamus closed 1 year ago

yunapotamus commented 1 year ago

When clients want to enable error handling in a non-debug build, they can define a Swift compile flag called PROMOTED_ERROR_HANDLING.

This can also be done from a Cocoapod target like this:

target 'myapp' do
  post_install do |installer|
    # Enables error handling in build config 'InternalBuild'
    use_promoted_error_handling(
      installer,
      build_configurations: ['InternalBuild']
    )
  end
end

This PR adds the build flag and the use_promoted_error_handling utility function.