Skip to content

Persistent module

  • CocoaPods subspec: pod 'AffiseModule/Persistent', '1.7.8' — AffiseModule.podspec:45-47.
  • SwiftPM product: AffiseModulePersistent — Package.swift:17.

From the README:

Uses Apple Security framework to store protected information in user account. Persist device id value for Get random device Id on application reinstall.

@objc(AffisePersistentModule)
public final class PersistentModule: AffiseModule, AffisePersistentApi

— AffiseModule/Persistent/Classes/PersistentModule.swift:4-5.

  • public func set(_ tag: String, _ value: String) -> Bool — PersistentModule.swift:11
  • public func get(_ tag: String) -> String? — PersistentModule.swift:15
  • public func getOrCreate(_ tag: String, _ value: String) -> String — PersistentModule.swift:19

public protocol AffisePersistentApi: AffiseModuleApi — AffiseAttributionLib/Classes/modules/persistent/AffisePersistentApi.swift:3 (not @objc).

  • Device info — the device id returned by getRandomDeviceId() is the value persisted by this module.