Skip to content

Commit

Permalink
prepare 9.0.1 release (#302)
Browse files Browse the repository at this point in the history
## [9.0.1] - 2023-08-18
### Fixed:
- Corrected implementation of classes that retrieves ApplicationInfo
from package bundle as part of Automatic Mobile Environment Attributes
functionality.

---------

Co-authored-by: Ben Woskow <[email protected]>
Co-authored-by: torchhound <[email protected]>
Co-authored-by: Gavin Whelan <[email protected]>
Co-authored-by: Louis Chan <[email protected]>
Co-authored-by: Matthew Keeler <[email protected]>
Co-authored-by: Louis Chan <[email protected]>
Co-authored-by: Ember Stevens <[email protected]>
Co-authored-by: Ember Stevens <[email protected]>
Co-authored-by: Ryan Lamb <[email protected]>
Co-authored-by: ld-repository-standards[bot] <113625520+ld-repository-standards[bot]@users.noreply.github.com>
Co-authored-by: Kane Parkinson <[email protected]>
  • Loading branch information
12 people authored Aug 18, 2023
1 parent cb42f92 commit adb58c4
Show file tree
Hide file tree
Showing 13 changed files with 88 additions and 30 deletions.
20 changes: 3 additions & 17 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,21 +163,7 @@ workflows:
xcode-version: '14.0.1'
ios-sim: 'platform=iOS Simulator,name=iPhone 14,OS=16.0'
- build:
name: Xcode 13.3 - Swift 5.6
xcode-version: '13.3.1'
ios-sim: 'platform=iOS Simulator,name=iPhone 13,OS=15.4'
- build:
name: Xcode 13.1 - Swift 5.5
xcode-version: '13.1.0'
ios-sim: 'platform=iOS Simulator,name=iPhone 11,OS=15.0'
build-doc: true
run-lint: true
- build:
name: Xcode 12.5 - Swift 5.4
xcode-version: '12.5.1'
ios-sim: 'platform=iOS Simulator,name=iPhone 8,OS=14.5'
- build:
name: Xcode 11.7 - Swift 5.2
xcode-version: '11.7.0'
ios-sim: 'platform=iOS Simulator,name=iPhone 8,OS=12.4'
name: Xcode 13.4.1 - Swift 5.6
xcode-version: '13.4.1'
ios-sim: 'platform=iOS Simulator,name=iPhone 13,OS=15.5'
- contract-tests
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

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

## [9.0.1] - 2023-08-18
### Fixed:
- Corrected implementation of classes that retrieves ApplicationInfo from package bundle as part of Automatic Mobile Environment Attributes functionality.

## [9.0.0] - 2023-08-02
### Added:
- Added Automatic Mobile Environment Attributes functionality which makes it simpler to target your mobile customers based on application name or version, or on device characteristics including manufacturer, model, operating system, locale, and so on. To learn more, read [Automatic environment attributes](https://docs.launchdarkly.com/sdk/features/environment-attributes).
Expand Down
2 changes: 1 addition & 1 deletion LaunchDarkly.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Pod::Spec.new do |ld|

ld.name = "LaunchDarkly"
ld.version = "9.0.0"
ld.version = "9.0.1"
ld.summary = "iOS SDK for LaunchDarkly"

ld.description = <<-DESC
Expand Down
20 changes: 10 additions & 10 deletions LaunchDarkly.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1575,7 +1575,7 @@
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = "$(PROJECT_DIR)/LaunchDarkly/LaunchDarkly/Support/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
MARKETING_VERSION = 9.0.0;
MARKETING_VERSION = 9.0.1;
MODULEMAP_FILE = "";
PRODUCT_BUNDLE_IDENTIFIER = "com.launchdarkly.Darkly-tvOS";
PRODUCT_NAME = LaunchDarkly_tvOS;
Expand All @@ -1598,7 +1598,7 @@
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = "$(PROJECT_DIR)/LaunchDarkly/LaunchDarkly/Support/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
MARKETING_VERSION = 9.0.0;
MARKETING_VERSION = 9.0.1;
MODULEMAP_FILE = "";
PRODUCT_BUNDLE_IDENTIFIER = "com.launchdarkly.Darkly-tvOS";
PRODUCT_NAME = LaunchDarkly_tvOS;
Expand All @@ -1621,7 +1621,7 @@
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = "$(PROJECT_DIR)/LaunchDarkly/LaunchDarkly/Support/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
MARKETING_VERSION = 9.0.0;
MARKETING_VERSION = 9.0.1;
PRODUCT_BUNDLE_IDENTIFIER = "com.launchdarkly.Darkly-macOS";
PRODUCT_NAME = LaunchDarkly_macOS;
SDKROOT = macosx;
Expand All @@ -1642,7 +1642,7 @@
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = "$(PROJECT_DIR)/LaunchDarkly/LaunchDarkly/Support/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
MARKETING_VERSION = 9.0.0;
MARKETING_VERSION = 9.0.1;
PRODUCT_BUNDLE_IDENTIFIER = "com.launchdarkly.Darkly-macOS";
PRODUCT_NAME = LaunchDarkly_macOS;
SDKROOT = macosx;
Expand Down Expand Up @@ -1686,7 +1686,7 @@
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
DYLIB_COMPATIBILITY_VERSION = 9.0.0;
DYLIB_CURRENT_VERSION = 9.0.0;
DYLIB_CURRENT_VERSION = 9.0.1;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
FRAMEWORK_VERSION = F;
Expand Down Expand Up @@ -1757,7 +1757,7 @@
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DYLIB_COMPATIBILITY_VERSION = 9.0.0;
DYLIB_CURRENT_VERSION = 9.0.0;
DYLIB_CURRENT_VERSION = 9.0.1;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
FRAMEWORK_VERSION = F;
Expand Down Expand Up @@ -1796,7 +1796,7 @@
INFOPLIST_FILE = "$(PROJECT_DIR)/LaunchDarkly/LaunchDarkly/Support/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_DYLIB_INSTALL_NAME = "$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)";
MARKETING_VERSION = 9.0.0;
MARKETING_VERSION = 9.0.1;
MODULEMAP_FILE = "$(PROJECT_DIR)/Framework/module.modulemap";
PRODUCT_BUNDLE_IDENTIFIER = com.launchdarkly.Darkly;
PRODUCT_NAME = LaunchDarkly;
Expand All @@ -1816,7 +1816,7 @@
INFOPLIST_FILE = "$(PROJECT_DIR)/LaunchDarkly/LaunchDarkly/Support/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_DYLIB_INSTALL_NAME = "$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)";
MARKETING_VERSION = 9.0.0;
MARKETING_VERSION = 9.0.1;
MODULEMAP_FILE = "$(PROJECT_DIR)/Framework/module.modulemap";
PRODUCT_BUNDLE_IDENTIFIER = com.launchdarkly.Darkly;
PRODUCT_NAME = LaunchDarkly;
Expand Down Expand Up @@ -1858,7 +1858,7 @@
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = "$(PROJECT_DIR)/LaunchDarkly/LaunchDarkly/Support/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
MARKETING_VERSION = 9.0.0;
MARKETING_VERSION = 9.0.1;
PRODUCT_BUNDLE_IDENTIFIER = "com.launchdarkly.Darkly-watchOS";
PRODUCT_NAME = LaunchDarkly_watchOS;
SDKROOT = watchos;
Expand All @@ -1880,7 +1880,7 @@
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = "$(PROJECT_DIR)/LaunchDarkly/LaunchDarkly/Support/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
MARKETING_VERSION = 9.0.0;
MARKETING_VERSION = 9.0.1;
PRODUCT_BUNDLE_IDENTIFIER = "com.launchdarkly.Darkly-watchOS";
PRODUCT_NAME = LaunchDarkly_watchOS;
SDKROOT = watchos;
Expand Down
10 changes: 10 additions & 0 deletions LaunchDarkly/LaunchDarkly/Models/LDConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,16 @@ public struct ApplicationInfo: Equatable {
self.applicationVersionName = applicationVersionName
}

/**
- returns: true if all properties are empty or missing, false otherwise
*/
func isEmpty() -> Bool {
applicationId.isEmpty &&
applicationName.isEmpty &&
applicationVersion.isEmpty &&
applicationVersionName.isEmpty
}

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@ import Foundation
import UIKit

class IOSEnvironmentReporter: EnvironmentReporterChainBase {
override var applicationInfo: ApplicationInfo {
var info = ApplicationInfo()
info.applicationIdentifier(Bundle.main.object(forInfoDictionaryKey: "CFBundleIdentifier") as? String ?? "")
info.applicationVersion(Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String ?? "")
info.applicationName(Bundle.main.object(forInfoDictionaryKey: "CFBundleName") as? String ?? "")
info.applicationVersionName(Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? "")

// defer to super if empty
if (info.isEmpty()) {
info = super.applicationInfo
}
return info
}

override var deviceModel: String { UIDevice.current.model }
override var systemVersion: String { UIDevice.current.systemVersion }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@ import Foundation
import AppKit

class MacOSEnvironmentReporter: EnvironmentReporterChainBase {
override var applicationInfo: ApplicationInfo {
var info = ApplicationInfo()
info.applicationIdentifier(Bundle.main.object(forInfoDictionaryKey: "CFBundleIdentifier") as? String ?? "")
info.applicationVersion(Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String ?? "")
info.applicationName(Bundle.main.object(forInfoDictionaryKey: "CFBundleName") as? String ?? "")
info.applicationVersionName(Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? "")

// defer to super if empty
if (info.isEmpty()) {
info = super.applicationInfo
}
return info
}

override var deviceModel: String { Sysctl.modelWithoutVersion }
override var systemVersion: String { ProcessInfo.processInfo.operatingSystemVersion.compactVersionString }
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation

struct ReportingConsts {
static let sdkVersion = "9.0.0"
static let sdkVersion = "9.0.1"
static let sdkName = "ios-client-sdk"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@ import Foundation
import UIKit

class TVOSEnvironmentReporter: EnvironmentReporterChainBase {
override var applicationInfo: ApplicationInfo {
var info = ApplicationInfo()
info.applicationIdentifier(Bundle.main.object(forInfoDictionaryKey: "CFBundleIdentifier") as? String ?? "")
info.applicationVersion(Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String ?? "")
info.applicationName(Bundle.main.object(forInfoDictionaryKey: "CFBundleName") as? String ?? "")
info.applicationVersionName(Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? "")

// defer to super if empty
if (info.isEmpty()) {
info = super.applicationInfo
}
return info
}

override var deviceModel: String { UIDevice.current.model }
override var systemVersion: String { UIDevice.current.systemVersion }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@ import Foundation
import WatchKit

class WatchOSEnvironmentReporter: EnvironmentReporterChainBase {
override var applicationInfo: ApplicationInfo {
var info = ApplicationInfo()
info.applicationIdentifier(Bundle.main.object(forInfoDictionaryKey: "CFBundleIdentifier") as? String ?? "")
info.applicationVersion(Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String ?? "")
info.applicationName(Bundle.main.object(forInfoDictionaryKey: "CFBundleName") as? String ?? "")
info.applicationVersionName(Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? "")

// defer to super if empty
if (info.isEmpty()) {
info = super.applicationInfo
}
return info
}

override var deviceModel: String { WKInterfaceDevice.current().model }
override var systemVersion: String { WKInterfaceDevice.current().systemVersion }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ final class IOSEnvironmentReporterSpec: XCTest {
let chain = EnvironmentReporterChainBase()
chain.setNext(IOSEnvironmentReporter())

XCTAssertTrue(!chain.applicationInfo.isEmpty())
XCTAssertNotEqual(chain.deviceModel, "UNKNOWN")
XCTAssertNotEqual(chain.systemVersion, "UNKNOWN")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ final class WatchOSEnvironmentReporterSpec: XCTest {
let chain = EnvironmentReporterChainBase()
chain.setNext(WatchOSEnvironmentReporter())

XCTAssert(!chain.applicationInfo.isEmpty())
XCTAssertNotEqual(chain.deviceModel, "UNKNOWN")
XCTAssertNotEqual(chain.systemVersion, "UNKNOWN")
XCTAssertNotEqual(chain.systemName, "UNKNOWN")
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ To include LaunchDarkly in a Swift package, simply add it to the dependencies se

```swift
dependencies: [
.package(url: "https://github.com/launchdarkly/ios-client-sdk.git", .upToNextMinor(from: "9.0.0"))
.package(url: "https://github.com/launchdarkly/ios-client-sdk.git", .upToNextMinor(from: "9.0.1"))
]
```

Expand Down

0 comments on commit adb58c4

Please sign in to comment.