Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Shahroz16 committed Nov 26, 2023
1 parent 0528873 commit 624312f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ class NotificationService: UNNotificationServiceExtension {
var bestAttemptContent: UNMutableNotificationContent?

override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) {
// CustomerIO.initialize(siteId: BuildEnvironment.CustomerIO.siteId, apiKey: BuildEnvironment.CustomerIO.apiKey, region: Region.US) { config in
//// config.autoTrackPushEvents = true
// }
CustomerIO.initialize(siteId: BuildEnvironment.CustomerIO.siteId, apiKey: BuildEnvironment.CustomerIO.apiKey, region: Region.US) { _ in
// config.autoTrackPushEvents = true
}

MessagingPush.shared.didReceive(request, withContentHandler: contentHandler)
}
Expand Down
8 changes: 6 additions & 2 deletions Sources/Tracking/CustomerIO.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@_exported import CioInternalCommon
import CioInternalCommon
import Foundation

public extension CustomerIOInstance {
Expand All @@ -22,7 +22,11 @@ public extension CustomerIOInstance {
}

public extension CustomerIO {
// Initialize for general usage
/**
Initialize the shared `instance` of `CustomerIO`.
Call this function when your app launches, before using `CustomerIO.instance`.
*/
@available(iOSApplicationExtension, unavailable)
static func initialize(
siteId: String,
apiKey: String,
Expand Down
1 change: 1 addition & 0 deletions Sources/Tracking/Type/Aliases.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ public typealias CioLogLevel = CioInternalCommon.CioLogLevel
public typealias CioSdkConfig = CioInternalCommon.SdkConfig
public typealias CioNotificationServiceExtensionSdkConfig = CioInternalCommon.NotificationServiceExtensionSdkConfig
public typealias Metric = CioInternalCommon.Metric
public typealias CustomerIO = CioInternalCommon.CustomerIO
1 change: 1 addition & 0 deletions Tests/Tracking/APITest.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import CioInternalCommon
import CioTracking // do not use `@testable` so we can test functions are made public and not `internal`.
import Foundation
import SharedTests
Expand Down

0 comments on commit 624312f

Please sign in to comment.