Skip to content

Commit

Permalink
feat: adds LD_OBJC_EXCLUDE_PURE_SWIFT_APIS compiler flag. This allowi…
Browse files Browse the repository at this point in the history
…ng consumers of Objective C classes to condtionally signatures containing pure Swift dependencies.
  • Loading branch information
tanderson-ld committed May 20, 2024
1 parent b94379f commit caa6a92
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions LaunchDarkly/LaunchDarkly/ObjectiveC/ObjcLDConfig.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import Foundation

#if !(LD_OBJC_EXCLUDE_PURE_SWIFT_APIS)
import OSLog
#endif

/**
Use LDConfig to configure the LDClient. When initialized, a LDConfig contains the default values which can be changed as needed.
Expand Down Expand Up @@ -164,17 +167,20 @@ public final class ObjcLDConfig: NSObject {
set { config.wrapperName = newValue }
}


/// For use by wrapper libraries to report the version of the library in use. If the `wrapperName` has not been set this field will be ignored. Otherwise the verison strill will be included with the `wrapperName` in the "X-LaunchDarkly-Wrapper" header on requests to the LaunchDarkly servers.
@objc public var wrapperVersion: String? {
get { config.wrapperVersion }
set { config.wrapperVersion = newValue }
}

#if !(LD_OBJC_EXCLUDE_PURE_SWIFT_APIS)
/// Configure the logger that will be used by the rest of the SDK.
@objc public var logger: OSLog {
get { config.logger }
set { config.logger = newValue }
}
#endif

/**
Returns a Dictionary of identifying names to unique mobile keys to access secondary environments.
Expand Down

0 comments on commit caa6a92

Please sign in to comment.