Skip to content

Commit

Permalink
replaced deprecated methods calls with new ones
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladimir Espinola committed Jun 14, 2024
1 parent 02e8164 commit 543517c
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 25 deletions.
20 changes: 10 additions & 10 deletions ExampleSwift/ExampleSwift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
588EB7242995BC3A00C0163A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 588EB7182995BBB700C0163A /* LaunchScreen.storyboard */; };
588EB7252995BC3A00C0163A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 587DC5C3299554B00082F8D0 /* Assets.xcassets */; };
588EB7262995BC3A00C0163A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 587DC5C82995551A0082F8D0 /* Main.storyboard */; };
FB080C772C1CAF5C00834BAA /* ATTNSDKFramework in Frameworks */ = {isa = PBXBuildFile; productRef = FB080C762C1CAF5C00834BAA /* ATTNSDKFramework */; };
FB2F35B62C18D6950016CAE8 /* ATTNSDKFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FB2F35B52C18D6950016CAE8 /* ATTNSDKFramework.framework */; };
FB2F35B72C18D6950016CAE8 /* ATTNSDKFramework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = FB2F35B52C18D6950016CAE8 /* ATTNSDKFramework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
FB6723732C134958008D5516 /* ATTNSDKFramework in Frameworks */ = {isa = PBXBuildFile; productRef = FB6723722C134958008D5516 /* ATTNSDKFramework */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
Expand Down Expand Up @@ -68,7 +68,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
FB6723732C134958008D5516 /* ATTNSDKFramework in Frameworks */,
FB080C772C1CAF5C00834BAA /* ATTNSDKFramework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -169,7 +169,7 @@
);
name = "ExampleSwift - SPM";
packageProductDependencies = (
FB6723722C134958008D5516 /* ATTNSDKFramework */,
FB080C762C1CAF5C00834BAA /* ATTNSDKFramework */,
);
productName = ExampleSwift;
productReference = 588EB72C2995BC3A00C0163A /* ExampleSwift - SPM.app */;
Expand Down Expand Up @@ -200,7 +200,7 @@
);
mainGroup = 58389AA12987647900A31A35;
packageReferences = (
FB6723712C134958008D5516 /* XCRemoteSwiftPackageReference "attentive-ios-sdk" */,
FB080C752C1CAF5B00834BAA /* XCRemoteSwiftPackageReference "attentive-ios-sdk" */,
);
productRefGroup = 58389AAB2987647900A31A35 /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -600,20 +600,20 @@
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
FB6723712C134958008D5516 /* XCRemoteSwiftPackageReference "attentive-ios-sdk" */ = {
FB080C752C1CAF5B00834BAA /* XCRemoteSwiftPackageReference "attentive-ios-sdk" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/vespinola/attentive-ios-sdk.git";
repositoryURL = "https://github.com/attentive-mobile/attentive-ios-sdk";
requirement = {
branch = main;
kind = branch;
kind = upToNextMajorVersion;
minimumVersion = 0.6.0;
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
FB6723722C134958008D5516 /* ATTNSDKFramework */ = {
FB080C762C1CAF5C00834BAA /* ATTNSDKFramework */ = {
isa = XCSwiftPackageProductDependency;
package = FB6723712C134958008D5516 /* XCRemoteSwiftPackageReference "attentive-ios-sdk" */;
package = FB080C752C1CAF5B00834BAA /* XCRemoteSwiftPackageReference "attentive-ios-sdk" */;
productName = ATTNSDKFramework;
};
/* End XCSwiftPackageProductDependency section */
Expand Down
12 changes: 6 additions & 6 deletions ExampleSwift/ExampleSwift/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ class AppDelegate : UIResponder, UIApplicationDelegate {

public static func createUserIdentifiers() -> [String: Any] {
[
IDENTIFIER_TYPE_PHONE: "+15671230987",
IDENTIFIER_TYPE_EMAIL: "[email protected]",
IDENTIFIER_TYPE_CLIENT_USER_ID: "APP_USER_ID",
IDENTIFIER_TYPE_SHOPIFY_ID: "207119551",
IDENTIFIER_TYPE_KLAVIYO_ID: "555555",
IDENTIFIER_TYPE_CUSTOM_IDENTIFIERS: ["customId": "customIdValue"]
ATTNIdentifierType.phone: "+15671230987",
ATTNIdentifierType.email: "[email protected]",
ATTNIdentifierType.clientUserId: "APP_USER_ID",
ATTNIdentifierType.shopifyId: "207119551",
ATTNIdentifierType.klaviyoId: "555555",
ATTNIdentifierType.customIdentifiers: ["customId": "customIdValue"]
]
}
}
10 changes: 5 additions & 5 deletions ExampleSwift/ExampleSwift/ProductViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ class ProductViewController : UIViewController {

let item : ATTNItem = buildItem()
let productView : ATTNProductViewEvent = ATTNProductViewEvent(items: [item])
ATTNEventTracker.sharedInstance()?.record(productView)
ATTNEventTracker.sharedInstance()?.record(event: productView)

showToast(message: "Product View event sent")
}

@IBAction func addToCartBtnPressed(sender: Any) {
let item : ATTNItem = self.buildItem()
let addToCart : ATTNAddToCartEvent = ATTNAddToCartEvent(items: [item])
ATTNEventTracker.sharedInstance()?.record(addToCart)
ATTNEventTracker.sharedInstance()?.record(event: addToCart)

showToast(message: "Add To Cart event sent")
}
Expand All @@ -41,14 +41,14 @@ class ProductViewController : UIViewController {
// Create PurchaseEvent
let purchase : ATTNPurchaseEvent = ATTNPurchaseEvent(items: [item], order: order)
// Send the PurchaseEvent
ATTNEventTracker.sharedInstance()?.record(purchase)
ATTNEventTracker.sharedInstance()?.record(event: purchase)

showToast(message: "Purchase event sent")
}

@IBAction func customEventBtnPressed(sender: Any) {
guard let customEvent = ATTNCustomEvent(type: "Added to Wishlist", properties: ["wishlistName": "Gift Ideas"]) else { return }
ATTNEventTracker.sharedInstance()?.record(customEvent)
ATTNEventTracker.sharedInstance()?.record(event: customEvent)

showToast(message: "Custom event sent")
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"originHash" : "6b3de92165125b4410ec54f34acb3ca6e0b8fc849f4bd109516c1eddb59f6bf0",
"originHash" : "62dc5f9606142e259275d938027b59c944959560f934dd2210d0e0cc4420a08d",
"pins" : [
{
"identity" : "attentive-ios-sdk",
"kind" : "remoteSourceControl",
"location" : "https://github.com/vespinola/attentive-ios-sdk.git",
"location" : "https://github.com/attentive-mobile/attentive-ios-sdk",
"state" : {
"branch" : "main",
"revision" : "46691f276e02add53c6f6a0af5cd1c13c04c9497"
"revision" : "16ea6c5924b6431d996f38d057b9a55e6639ed03",
"version" : "0.6.0"
}
}
],
Expand Down

0 comments on commit 543517c

Please sign in to comment.