-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## [7.1.0] - 2022-11-08 ### Added: - Added Objective C bindings for ApplicationInfo.
- Loading branch information
Showing
8 changed files
with
80 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
LaunchDarkly/LaunchDarkly/ObjectiveC/ObjcLDApplicationInfo.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import Foundation | ||
|
||
/** | ||
Use LDApplicationInfo to define application metadata. | ||
|
||
These properties are optional and informational. They may be used in LaunchDarkly analytics or other product features, | ||
but they do not affect feature flag evaluations. | ||
*/ | ||
@objc(LDApplicationInfo) | ||
public final class ObjcLDApplicationInfo: NSObject { | ||
internal var applicationInfo: ApplicationInfo | ||
|
||
@objc override public init() { | ||
applicationInfo = ApplicationInfo() | ||
} | ||
|
||
internal init(_ applicationInfo: ApplicationInfo?) { | ||
if let appInfo = applicationInfo { | ||
self.applicationInfo = appInfo | ||
} else { | ||
self.applicationInfo = ApplicationInfo() | ||
} | ||
} | ||
|
||
/// A unique identifier representing the application where the LaunchDarkly SDK is running. | ||
/// | ||
/// This can be specified as any string value as long as it only uses the following characters: | ||
/// ASCII letters, ASCII digits, period, hyphen, underscore. A string containing any other | ||
/// characters will be ignored. | ||
@objc public func applicationIdentifier(_ applicationId: String) { | ||
applicationInfo.applicationIdentifier(applicationId) | ||
} | ||
|
||
/// A unique identifier representing the version of the application where the LaunchDarkly SDK | ||
/// is running. | ||
/// | ||
/// This can be specified as any string value as long as it only uses the following characters: | ||
/// ASCII letters, ASCII digits, period, hyphen, underscore. A string containing any other | ||
/// characters will be ignored. | ||
@objc public func applicationVersion(_ applicationVersion: String) { | ||
applicationInfo.applicationVersion(applicationVersion) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters