Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 10 Next »

Initialize SDK object and use it anywhere in your application.

Remember to initialize SDK only once on application launch. Don't forget to replace the %YOUR_STORE_KEY% text with the current store key from your PersonaClick account.


import PersonaClick
...
var sdk = createPersonalizationSDK(shopId: "%YOUR_STORE_KEY%")

Or with completion to handle problems:

import PersonaClick
...
var sdk = createPersonalizationSDK(shopId: "%YOUR_STORE_KEY%", { (error) in
    print(error)
})

Parameters

NameTypeRequirementDescription
shopIdstringrequiredThe current store key from the PersonaClick account.
userEmailstringoptionallyUser Email.
userPhonestringoptionallyUser Phone.
userLoyaltyIdstringoptionallyThe Loyalty Program user ID (loyalty card).
autoSendPushTokenbooleanoptionallyThe true value (the default) allows the token to be requested, and false disallows it.
  • No labels