Skip to content

Commit

Permalink
Merge pull request #85 from AppSci/release/2.0.1
Browse files Browse the repository at this point in the history
Release: 2.0.1
  • Loading branch information
denysdanyliukboosters authored Oct 4, 2023
2 parents b8edd9e + 236bee7 commit caddc0a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Sources/PandaSDK/Networking/NetworkClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ extension NetworkClient {
let request = createRequest(
path: "/v1/users/\(user.id)",
method: .put,
body: PandaUserInfo(idfa: idfa, idfv: idfv)
body: PandaUserInfo(idfv: idfv, idfa: idfa)
)
networkLoader.loadData(with: request, timeout: nil, completion: callback)
}
Expand Down
6 changes: 3 additions & 3 deletions Sources/PandaSDK/Networking/PandaUserInfo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ struct PandaUserInfo: Codable {
pushNotificationToken: String? = nil,
customUserId: String? = nil,
appsFlyerId: String? = nil,
idfa: String? = nil,
idfv: String? = nil,
idfa: String? = nil,
fbc: String? = nil,
fbp: String? = nil,
email: String? = nil,
Expand All @@ -80,8 +80,8 @@ struct PandaUserInfo: Codable {
self.pushNotificationToken = pushNotificationToken
self.customUserId = customUserId
self.appsFlyerId = appsFlyerId
self.idfa = idfa ?? UIDevice.current.identifierForVendor?.uuidString
self.idfv = idfv ?? identifierForAdvertising()
self.idfv = idfv ?? UIDevice.current.identifierForVendor?.uuidString
self.idfa = idfa ?? identifierForAdvertising()
self.fbc = fbc
self.fbp = fbp
self.email = email
Expand Down
3 changes: 3 additions & 0 deletions Sources/PandaSDK/PandaProtocol.swift
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,9 @@ extension Panda {
let userStorage: Storage<PandaUser> = CodableStorageFactory.keychain()
userStorage.clear()

let deviceStorage: Storage<DeviceSettings> = CodableStorageFactory.userDefaults()
deviceStorage.clear()

shared = UnconfiguredPanda()
}
}

0 comments on commit caddc0a

Please sign in to comment.