Skip to content

Commit 4e535fa

Browse files
tanderson-ldbwoskow-ldtorchhoundgwhelanLDlouis-launchdarkly
authored
prepare 9.0.2 release (#303)
## [9.0.2] - 2023-08-25 ### Fixed: - Updated how Auto Environment Attributes sanitizes and validates provided values to provide a more user friendly experience. --------- Co-authored-by: Ben Woskow <48036130+bwoskow-ld@users.noreply.github.com> Co-authored-by: torchhound <5600929+torchhound@users.noreply.github.com> Co-authored-by: Gavin Whelan <gwhelan@launchdarkly.com> Co-authored-by: Louis Chan <lchan@launchdarkly.com> Co-authored-by: Matthew Keeler <mkeeler@launchdarkly.com> Co-authored-by: Louis Chan <91093020+louis-launchdarkly@users.noreply.github.com> Co-authored-by: Ember Stevens <ember.stevens@launchdarkly.com> Co-authored-by: Ember Stevens <79482775+ember-stevens@users.noreply.github.com> Co-authored-by: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com> Co-authored-by: ld-repository-standards[bot] <113625520+ld-repository-standards[bot]@users.noreply.github.com> Co-authored-by: Kane Parkinson <93555788+kparkinson-ld@users.noreply.github.com>
1 parent adb58c4 commit 4e535fa

19 files changed

+189
-119
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to the LaunchDarkly iOS SDK will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org).
44

5+
## [9.0.2] - 2023-08-25
6+
### Fixed:
7+
- Updated how Auto Environment Attributes sanitizes and validates provided values to provide a more user friendly experience.
8+
59
## [9.0.1] - 2023-08-18
610
### Fixed:
711
- Corrected implementation of classes that retrieves ApplicationInfo from package bundle as part of Automatic Mobile Environment Attributes functionality.

LaunchDarkly.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Pod::Spec.new do |ld|
33

44
ld.name = "LaunchDarkly"
5-
ld.version = "9.0.1"
5+
ld.version = "9.0.2"
66
ld.summary = "iOS SDK for LaunchDarkly"
77

88
ld.description = <<-DESC

LaunchDarkly.xcodeproj/project.pbxproj

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1571,11 +1571,12 @@
15711571
CODE_SIGN_IDENTITY = "";
15721572
CODE_SIGN_STYLE = Automatic;
15731573
DEFINES_MODULE = NO;
1574+
DYLIB_CURRENT_VERSION = 9.0.2;
15741575
DYLIB_INSTALL_NAME_BASE = "@rpath";
15751576
GCC_C_LANGUAGE_STANDARD = gnu11;
15761577
INFOPLIST_FILE = "$(PROJECT_DIR)/LaunchDarkly/LaunchDarkly/Support/Info.plist";
15771578
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1578-
MARKETING_VERSION = 9.0.1;
1579+
MARKETING_VERSION = 9.0.2;
15791580
MODULEMAP_FILE = "";
15801581
PRODUCT_BUNDLE_IDENTIFIER = "com.launchdarkly.Darkly-tvOS";
15811582
PRODUCT_NAME = LaunchDarkly_tvOS;
@@ -1594,11 +1595,12 @@
15941595
CODE_SIGN_IDENTITY = "";
15951596
CODE_SIGN_STYLE = Automatic;
15961597
DEFINES_MODULE = NO;
1598+
DYLIB_CURRENT_VERSION = 9.0.2;
15971599
DYLIB_INSTALL_NAME_BASE = "@rpath";
15981600
GCC_C_LANGUAGE_STANDARD = gnu11;
15991601
INFOPLIST_FILE = "$(PROJECT_DIR)/LaunchDarkly/LaunchDarkly/Support/Info.plist";
16001602
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1601-
MARKETING_VERSION = 9.0.1;
1603+
MARKETING_VERSION = 9.0.2;
16021604
MODULEMAP_FILE = "";
16031605
PRODUCT_BUNDLE_IDENTIFIER = "com.launchdarkly.Darkly-tvOS";
16041606
PRODUCT_NAME = LaunchDarkly_tvOS;
@@ -1617,11 +1619,12 @@
16171619
CODE_SIGN_STYLE = Automatic;
16181620
COMBINE_HIDPI_IMAGES = YES;
16191621
DEFINES_MODULE = NO;
1622+
DYLIB_CURRENT_VERSION = 9.0.2;
16201623
DYLIB_INSTALL_NAME_BASE = "@rpath";
16211624
GCC_C_LANGUAGE_STANDARD = gnu11;
16221625
INFOPLIST_FILE = "$(PROJECT_DIR)/LaunchDarkly/LaunchDarkly/Support/Info.plist";
16231626
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1624-
MARKETING_VERSION = 9.0.1;
1627+
MARKETING_VERSION = 9.0.2;
16251628
PRODUCT_BUNDLE_IDENTIFIER = "com.launchdarkly.Darkly-macOS";
16261629
PRODUCT_NAME = LaunchDarkly_macOS;
16271630
SDKROOT = macosx;
@@ -1638,11 +1641,12 @@
16381641
CODE_SIGN_STYLE = Automatic;
16391642
COMBINE_HIDPI_IMAGES = YES;
16401643
DEFINES_MODULE = NO;
1644+
DYLIB_CURRENT_VERSION = 9.0.2;
16411645
DYLIB_INSTALL_NAME_BASE = "@rpath";
16421646
GCC_C_LANGUAGE_STANDARD = gnu11;
16431647
INFOPLIST_FILE = "$(PROJECT_DIR)/LaunchDarkly/LaunchDarkly/Support/Info.plist";
16441648
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1645-
MARKETING_VERSION = 9.0.1;
1649+
MARKETING_VERSION = 9.0.2;
16461650
PRODUCT_BUNDLE_IDENTIFIER = "com.launchdarkly.Darkly-macOS";
16471651
PRODUCT_NAME = LaunchDarkly_macOS;
16481652
SDKROOT = macosx;
@@ -1686,7 +1690,7 @@
16861690
CURRENT_PROJECT_VERSION = 1;
16871691
DEBUG_INFORMATION_FORMAT = dwarf;
16881692
DYLIB_COMPATIBILITY_VERSION = 9.0.0;
1689-
DYLIB_CURRENT_VERSION = 9.0.1;
1693+
DYLIB_CURRENT_VERSION = 9.0.2;
16901694
ENABLE_STRICT_OBJC_MSGSEND = YES;
16911695
ENABLE_TESTABILITY = YES;
16921696
FRAMEWORK_VERSION = F;
@@ -1757,7 +1761,7 @@
17571761
CURRENT_PROJECT_VERSION = 1;
17581762
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
17591763
DYLIB_COMPATIBILITY_VERSION = 9.0.0;
1760-
DYLIB_CURRENT_VERSION = 9.0.1;
1764+
DYLIB_CURRENT_VERSION = 9.0.2;
17611765
ENABLE_NS_ASSERTIONS = NO;
17621766
ENABLE_STRICT_OBJC_MSGSEND = YES;
17631767
FRAMEWORK_VERSION = F;
@@ -1792,11 +1796,12 @@
17921796
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES;
17931797
CODE_SIGN_IDENTITY = "";
17941798
DEFINES_MODULE = NO;
1799+
DYLIB_CURRENT_VERSION = 9.0.2;
17951800
DYLIB_INSTALL_NAME_BASE = "@rpath";
17961801
INFOPLIST_FILE = "$(PROJECT_DIR)/LaunchDarkly/LaunchDarkly/Support/Info.plist";
17971802
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
17981803
LD_DYLIB_INSTALL_NAME = "$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)";
1799-
MARKETING_VERSION = 9.0.1;
1804+
MARKETING_VERSION = 9.0.2;
18001805
MODULEMAP_FILE = "$(PROJECT_DIR)/Framework/module.modulemap";
18011806
PRODUCT_BUNDLE_IDENTIFIER = com.launchdarkly.Darkly;
18021807
PRODUCT_NAME = LaunchDarkly;
@@ -1812,11 +1817,12 @@
18121817
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES;
18131818
CODE_SIGN_IDENTITY = "";
18141819
DEFINES_MODULE = NO;
1820+
DYLIB_CURRENT_VERSION = 9.0.2;
18151821
DYLIB_INSTALL_NAME_BASE = "@rpath";
18161822
INFOPLIST_FILE = "$(PROJECT_DIR)/LaunchDarkly/LaunchDarkly/Support/Info.plist";
18171823
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
18181824
LD_DYLIB_INSTALL_NAME = "$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)";
1819-
MARKETING_VERSION = 9.0.1;
1825+
MARKETING_VERSION = 9.0.2;
18201826
MODULEMAP_FILE = "$(PROJECT_DIR)/Framework/module.modulemap";
18211827
PRODUCT_BUNDLE_IDENTIFIER = com.launchdarkly.Darkly;
18221828
PRODUCT_NAME = LaunchDarkly;
@@ -1854,11 +1860,12 @@
18541860
CODE_SIGN_IDENTITY = "";
18551861
CODE_SIGN_STYLE = Automatic;
18561862
DEFINES_MODULE = NO;
1863+
DYLIB_CURRENT_VERSION = 9.0.2;
18571864
DYLIB_INSTALL_NAME_BASE = "@rpath";
18581865
GCC_C_LANGUAGE_STANDARD = gnu11;
18591866
INFOPLIST_FILE = "$(PROJECT_DIR)/LaunchDarkly/LaunchDarkly/Support/Info.plist";
18601867
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1861-
MARKETING_VERSION = 9.0.1;
1868+
MARKETING_VERSION = 9.0.2;
18621869
PRODUCT_BUNDLE_IDENTIFIER = "com.launchdarkly.Darkly-watchOS";
18631870
PRODUCT_NAME = LaunchDarkly_watchOS;
18641871
SDKROOT = watchos;
@@ -1876,11 +1883,12 @@
18761883
CODE_SIGN_IDENTITY = "";
18771884
CODE_SIGN_STYLE = Automatic;
18781885
DEFINES_MODULE = NO;
1886+
DYLIB_CURRENT_VERSION = 9.0.2;
18791887
DYLIB_INSTALL_NAME_BASE = "@rpath";
18801888
GCC_C_LANGUAGE_STANDARD = gnu11;
18811889
INFOPLIST_FILE = "$(PROJECT_DIR)/LaunchDarkly/LaunchDarkly/Support/Info.plist";
18821890
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1883-
MARKETING_VERSION = 9.0.1;
1891+
MARKETING_VERSION = 9.0.2;
18841892
PRODUCT_BUNDLE_IDENTIFIER = "com.launchdarkly.Darkly-watchOS";
18851893
PRODUCT_NAME = LaunchDarkly_watchOS;
18861894
SDKROOT = watchos;

LaunchDarkly/LaunchDarkly/Models/Context/Modifier.swift

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,18 @@ class AutoEnvContextModifier {
4646

4747
private func applicationRecipe() -> ContextRecipe {
4848
let keyCallable: () -> (String) = {
49-
Util.sha256base64(self.environmentReporter.applicationInfo.applicationId + ":" + self.environmentReporter.applicationInfo.applicationVersion)
49+
Util.sha256base64(
50+
(self.environmentReporter.applicationInfo.applicationId ?? "") + ":" +
51+
(self.environmentReporter.applicationInfo.applicationVersion ?? "")
52+
)
5053
}
5154

5255
var callables: [String : () -> LDValue] = [:]
5356
callables[AutoEnvContextModifier.envAttributesVersion] = { () -> LDValue in AutoEnvContextModifier.specVersion.toLDValue() }
54-
callables[AutoEnvContextModifier.attrId] = { () -> LDValue in self.environmentReporter.applicationInfo.applicationId.toLDValue() }
55-
callables[AutoEnvContextModifier.attrName] = { () -> LDValue in self.environmentReporter.applicationInfo.applicationName.toLDValue() }
56-
callables[AutoEnvContextModifier.attrVersion] = { () -> LDValue in self.environmentReporter.applicationInfo.applicationVersion.toLDValue() }
57-
callables[AutoEnvContextModifier.attrVersionName] = { () -> LDValue in self.environmentReporter.applicationInfo.applicationVersionName.toLDValue() }
57+
callables[AutoEnvContextModifier.attrId] = { () -> LDValue in self.environmentReporter.applicationInfo.applicationId?.toLDValue() ?? LDValue.null }
58+
callables[AutoEnvContextModifier.attrName] = { () -> LDValue in self.environmentReporter.applicationInfo.applicationName?.toLDValue() ?? LDValue.null }
59+
callables[AutoEnvContextModifier.attrVersion] = { () -> LDValue in self.environmentReporter.applicationInfo.applicationVersion?.toLDValue() ?? LDValue.null }
60+
callables[AutoEnvContextModifier.attrVersionName] = { () -> LDValue in self.environmentReporter.applicationInfo.applicationVersionName?.toLDValue() ?? LDValue.null }
5861
callables[AutoEnvContextModifier.attrLocale] = { () -> LDValue in self.environmentReporter.locale.toLDValue() }
5962

6063
return ContextRecipe(

LaunchDarkly/LaunchDarkly/Models/LDConfig.swift

Lines changed: 55 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -57,44 +57,33 @@ public typealias RequestHeaderTransform = (_ url: URL, _ headers: [String: Strin
5757
/// These properties are optional and informational. They may be used in LaunchDarkly
5858
/// analytics or other product features.
5959
public struct ApplicationInfo: Equatable {
60-
internal var applicationId: String
61-
internal var applicationName: String
62-
internal var applicationVersion: String
63-
internal var applicationVersionName: String
64-
65-
public init() {
66-
applicationId = ""
67-
applicationName = ""
68-
applicationVersion = ""
69-
applicationVersionName = ""
70-
}
60+
internal var applicationId: String?
61+
internal var applicationName: String?
62+
internal var applicationVersion: String?
63+
internal var applicationVersionName: String?
64+
65+
public init() {}
7166

7267
/// A unique identifier representing the application where the LaunchDarkly SDK is running.
7368
///
7469
/// This can be specified as any string value as long as it only uses the following characters:
7570
/// ASCII letters, ASCII digits, period, hyphen, underscore. A string containing any other
7671
/// characters will be ignored.
77-
public mutating func applicationIdentifier(_ applicationId: String) {
78-
if let error = validate(applicationId) {
79-
Log.debug("applicationIdentifier \(error)")
80-
return
72+
public mutating func applicationIdentifier(_ applicationId: String?) {
73+
validateThenCall(inputName: "applicationId", input: applicationId) {
74+
self.applicationId = $0
8175
}
82-
83-
self.applicationId = applicationId
8476
}
8577

8678
/// A human-friendly application name representing the application where the LaunchDarkly SDK is running.
8779
///
8880
/// This can be specified as any string value as long as it only uses the following characters:
8981
/// ASCII letters, ASCII digits, period, hyphen, underscore. A string containing any other
9082
/// characters will be ignored.
91-
public mutating func applicationName(_ applicationName: String) {
92-
if let error = validate(applicationName) {
93-
Log.debug("applicationName \(error)")
94-
return
83+
public mutating func applicationName(_ applicationName: String?) {
84+
validateThenCall(inputName: "applicationName", input: applicationName) {
85+
self.applicationName = $0
9586
}
96-
97-
self.applicationName = applicationName
9887
}
9988

10089
/// A unique identifier representing the version of the application where the LaunchDarkly SDK
@@ -103,13 +92,10 @@ public struct ApplicationInfo: Equatable {
10392
/// This can be specified as any string value as long as it only uses the following characters:
10493
/// ASCII letters, ASCII digits, period, hyphen, underscore. A string containing any other
10594
/// characters will be ignored.
106-
public mutating func applicationVersion(_ applicationVersion: String) {
107-
if let error = validate(applicationVersion) {
108-
Log.debug("applicationVersion \(error)")
109-
return
95+
public mutating func applicationVersion(_ applicationVersion: String?) {
96+
validateThenCall(inputName: "applicationVersion", input: applicationVersion) {
97+
self.applicationVersion = $0
11098
}
111-
112-
self.applicationVersion = applicationVersion
11399
}
114100

115101
/// A human-friendly name representing the version of the application where the LaunchDarkly SDK
@@ -118,57 +104,72 @@ public struct ApplicationInfo: Equatable {
118104
/// This can be specified as any string value as long as it only uses the following characters:
119105
/// ASCII letters, ASCII digits, period, hyphen, underscore. A string containing any other
120106
/// characters will be ignored.
121-
public mutating func applicationVersionName(_ applicationVersionName: String) {
122-
if let error = validate(applicationVersionName) {
123-
Log.debug("applicationVersionName \(error)")
124-
return
107+
public mutating func applicationVersionName(_ applicationVersionName: String?) {
108+
validateThenCall(inputName: "applicationVersionName", input: applicationVersionName) {
109+
self.applicationVersionName = $0
125110
}
126-
127-
self.applicationVersionName = applicationVersionName
128-
}
129-
130-
/**
131-
- returns: true if all properties are empty or missing, false otherwise
132-
*/
133-
func isEmpty() -> Bool {
134-
applicationId.isEmpty &&
135-
applicationName.isEmpty &&
136-
applicationVersion.isEmpty &&
137-
applicationVersionName.isEmpty
138111
}
139112

140113
func buildTag() -> String {
141114
var tags: [String] = []
142115

143-
if !applicationId.isEmpty {
116+
if let applicationId = applicationId {
144117
tags.append("application-id/\(applicationId)")
145118
}
146119

147-
if (!applicationName.isEmpty) {
120+
if let applicationName = applicationName {
148121
tags.append("application-name/\(applicationName)")
149122
}
150123

151-
if !applicationVersion.isEmpty {
124+
if let applicationVersion = applicationVersion {
152125
tags.append("application-version/\(applicationVersion)")
153126
}
154127

155-
if !applicationVersionName.isEmpty {
128+
if let applicationVersionName = applicationVersionName {
156129
tags.append("application-version-name/\(applicationVersionName)")
157130
}
158131

159132
return tags.lazy.joined(separator: " ")
160133
}
161134

162-
private func validate(_ value: String) -> String? {
163-
let allowed = CharacterSet(charactersIn: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789._-")
164-
if value.rangeOfCharacter(from: allowed.inverted) != nil {
165-
return "contained invalid characters"
135+
/**
136+
If after sanitization the input is valid, invokes the closure with the sanitized input. A null input is valid to permit nilling
137+
out a property. Otherwise does not invoke the closure.
138+
*/
139+
private func validateThenCall(inputName: String, input: String?, onSuccess: (String?) -> Void) {
140+
// nil input is permitted to clear the property
141+
guard let unwrapped = input else {
142+
onSuccess(input)
143+
return
144+
}
145+
146+
let sanitized = unwrapped.replacingOccurrences(of: " ", with: "-")
147+
if let error = validate(sanitized) {
148+
Log.debug("Issue validating \(inputName) value \(sanitized). \(error)")
149+
return
150+
}
151+
152+
onSuccess(sanitized)
153+
}
154+
155+
/**
156+
Validates the provided string.
157+
- returns: nil if valid, otherwise string describing issue
158+
*/
159+
private func validate(_ input: String) -> String? {
160+
if input.isEmpty {
161+
return "empty string and was discarded"
166162
}
167163

168-
if value.count > 64 {
164+
if input.count > 64 {
169165
return "longer than 64 characters and was discarded"
170166
}
171167

168+
let allowed = CharacterSet(charactersIn: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789._-")
169+
if input.rangeOfCharacter(from: allowed.inverted) != nil {
170+
return "contained invalid characters"
171+
}
172+
172173
return nil
173174
}
174175
}

LaunchDarkly/LaunchDarkly/ServiceObjects/EnvironmentReporting/ApplicationInfoEnvironmentReporter.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,11 @@ class ApplicationInfoEnvironmentReporter: EnvironmentReporterChainBase {
77
self.info = applicationInfo
88
}
99

10-
override var applicationInfo: ApplicationInfo { return info }
10+
override var applicationInfo: ApplicationInfo {
11+
// defer to super if applicationId is missing.
12+
if info.applicationId == nil {
13+
info = super.applicationInfo
14+
}
15+
return info
16+
}
1117
}

LaunchDarkly/LaunchDarkly/ServiceObjects/EnvironmentReporting/IOSEnvironmentReporter.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ import UIKit
55
class IOSEnvironmentReporter: EnvironmentReporterChainBase {
66
override var applicationInfo: ApplicationInfo {
77
var info = ApplicationInfo()
8-
info.applicationIdentifier(Bundle.main.object(forInfoDictionaryKey: "CFBundleIdentifier") as? String ?? "")
9-
info.applicationVersion(Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String ?? "")
10-
info.applicationName(Bundle.main.object(forInfoDictionaryKey: "CFBundleName") as? String ?? "")
11-
info.applicationVersionName(Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? "")
8+
info.applicationIdentifier(Bundle.main.object(forInfoDictionaryKey: "CFBundleIdentifier") as? String)
9+
info.applicationVersion(Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String)
10+
info.applicationName(Bundle.main.object(forInfoDictionaryKey: "CFBundleName") as? String)
11+
info.applicationVersionName(Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String)
1212

13-
// defer to super if empty
14-
if (info.isEmpty()) {
13+
// defer to super if applicationId is missing. This logic is after the setter since the setter has built in sanitization
14+
if info.applicationId == nil {
1515
info = super.applicationInfo
1616
}
1717
return info

LaunchDarkly/LaunchDarkly/ServiceObjects/EnvironmentReporting/MacOSEnvironmentReporter.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ import AppKit
55
class MacOSEnvironmentReporter: EnvironmentReporterChainBase {
66
override var applicationInfo: ApplicationInfo {
77
var info = ApplicationInfo()
8-
info.applicationIdentifier(Bundle.main.object(forInfoDictionaryKey: "CFBundleIdentifier") as? String ?? "")
9-
info.applicationVersion(Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String ?? "")
10-
info.applicationName(Bundle.main.object(forInfoDictionaryKey: "CFBundleName") as? String ?? "")
11-
info.applicationVersionName(Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? "")
8+
info.applicationIdentifier(Bundle.main.object(forInfoDictionaryKey: "CFBundleIdentifier") as? String)
9+
info.applicationVersion(Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String)
10+
info.applicationName(Bundle.main.object(forInfoDictionaryKey: "CFBundleName") as? String)
11+
info.applicationVersionName(Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String)
1212

13-
// defer to super if empty
14-
if (info.isEmpty()) {
13+
// defer to super if applicationId is missing. This logic is after the setter since the setter has built in sanitization
14+
if info.applicationId == nil {
1515
info = super.applicationInfo
1616
}
1717
return info

0 commit comments

Comments
 (0)