Skip to content

Commit

Permalink
Fixed test schemes. Upgraded Braze to 3.2 for iOS 13 support. (#7)
Browse files Browse the repository at this point in the history
* Fixed test schemes. Upgraded Braze to 3.2 for iOS 13 support.

* Fix SDWebImage build.

* Remove SDWebImage dependency.

* Just use binary dependency.
  • Loading branch information
jonathanswong authored and christinasund committed Nov 5, 2019
1 parent bf809fd commit 50def3e
Show file tree
Hide file tree
Showing 14 changed files with 765 additions and 343 deletions.
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github "tealium/tealium-swift"
github "Appboy/appboy-ios-sdk" == 3.16.0
binary "https://raw.githubusercontent.com/Appboy/appboy-ios-sdk/master/appboy_ios_sdk_core.json"
6 changes: 3 additions & 3 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
github "Appboy/appboy-ios-sdk" "3.16.0"
github "tealium/plcrashreporter" "1.3.5"
github "tealium/tealium-swift" "1.7.1"
binary "https://raw.githubusercontent.com/Appboy/appboy-ios-sdk/master/appboy_ios_sdk_core.json" "3.20.4"
binary "https://tags.tiqcdn.com/dle/tealiummobile/tealium-ios-carthage/tealium-carthage-plcrashreporter.json" "1.3.6"
github "tealium/tealium-swift" "1.7.3"
13 changes: 9 additions & 4 deletions Sources/BrazeCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@

import UIKit
import Appboy_iOS_SDK
#if COCOAPODS
import TealiumSwift
#else
import TealiumCore
import TealiumTagManagement
import TealiumRemoteCommands
#endif


public enum AppboyUserAttribute: String, CaseIterable {
Expand Down Expand Up @@ -298,14 +304,13 @@ public class BrazeCommand {
return
}
let prices = priceDouble.map { price in
NSDecimalNumber(floatLiteral: price)

NSDecimalNumber(floatLiteral: price)
}
var products = (productId: productIdentifier, price: prices)
let products = (productId: productIdentifier, price: prices)

if let quantity = payload[AppboyKey.quantity] as? [Int] {
let unsignedQty = quantity.map { UInt($0) }
var products = (productId: productIdentifier, price: prices, quantity: unsignedQty)
let products = (productId: productIdentifier, price: prices, quantity: unsignedQty)
if let properties = payload[AppboyKey.purchaseProperties] as? [AnyHashable: Any] {
for (index, element) in products.productId.enumerated() {
return self.brazeTracker.logPurchase(element, currency: currency, price: products.price[index], quantity: products.quantity[index], properties: properties)
Expand Down
Loading

0 comments on commit 50def3e

Please sign in to comment.