-
Notifications
You must be signed in to change notification settings - Fork 265
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
103 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
AIRSHIP_VERSION="18.7.0" | ||
AIRSHIP_VERSION="18.7.1" | ||
|
||
Pod::Spec.new do |s| | ||
s.version = AIRSHIP_VERSION | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
//* Copyright Airship and Contributors */ | ||
|
||
CURRENT_PROJECT_VERSION = 18.7.0 | ||
CURRENT_PROJECT_VERSION = 18.7.1 | ||
|
||
// Uncomment to include the preview build warning | ||
// OTHER_CFLAGS = $(inherited) -DUA_PREVIEW=1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* Copyright Airship and Contributors */ | ||
|
||
import XCTest | ||
@testable | ||
import AirshipCore | ||
|
||
final class AirshipAnalyticFeedTest: XCTestCase { | ||
private let dataStore: PreferenceDataStore = PreferenceDataStore(appKey: UUID().uuidString) | ||
private var privacyManager: AirshipPrivacyManager! | ||
|
||
override func setUp() async throws { | ||
self.privacyManager = await AirshipPrivacyManager( | ||
dataStore: dataStore, | ||
config: RuntimeConfig(config: AirshipConfig(), dataStore: dataStore), | ||
defaultEnabledFeatures: .all | ||
) | ||
} | ||
|
||
func testFeed() async throws { | ||
let feed = makeFeed() | ||
var updates = await feed.updates.makeAsyncIterator() | ||
|
||
let result = await feed.notifyEvent(.screen(screen: "foo")) | ||
XCTAssertTrue(result) | ||
|
||
let next = await updates.next() | ||
XCTAssertEqual(next, .screen(screen: "foo")) | ||
} | ||
|
||
func testFeedAnalyticsDisabled() async throws { | ||
let feed = makeFeed() | ||
privacyManager.disableFeatures(.analytics) | ||
var updates = await feed.updates.makeAsyncIterator() | ||
|
||
var result = await feed.notifyEvent(.screen(screen: "foo")) | ||
XCTAssertFalse(result) | ||
|
||
privacyManager.enableFeatures(.analytics) | ||
result = await feed.notifyEvent(.screen(screen: "bar")) | ||
XCTAssertTrue(result) | ||
|
||
let next = await updates.next() | ||
XCTAssertEqual(next, .screen(screen: "bar")) | ||
} | ||
|
||
func testFeedDisabled() async throws { | ||
let feed = makeFeed(enabled: false) | ||
let result = await feed.notifyEvent(.screen(screen: "foo")) | ||
XCTAssertFalse(result) | ||
} | ||
|
||
private func makeFeed(enabled: Bool = true) -> AirshipAnalyticsFeed { | ||
return AirshipAnalyticsFeed(privacyManager: privacyManager, isAnalyticsEnabled: enabled) | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
AIRSHIP_VERSION="18.7.0" | ||
AIRSHIP_VERSION="18.7.1" | ||
|
||
Pod::Spec.new do |s| | ||
s.version = AIRSHIP_VERSION | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
AIRSHIP_VERSION="18.7.0" | ||
AIRSHIP_VERSION="18.7.1" | ||
|
||
Pod::Spec.new do |s| | ||
s.version = AIRSHIP_VERSION | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
AIRSHIP_VERSION="18.7.0" | ||
AIRSHIP_VERSION="18.7.1" | ||
|
||
Pod::Spec.new do |s| | ||
s.version = AIRSHIP_VERSION | ||
|
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