iOS - Upgrading from version 2.x to 3.x
We have updated our iOS plugin to version 3.x, which is equipped with the same technology used in its Android counterpart. In the process, we removed the deprecated methods from the previous version.
The following methods were removed:
Objective-C¶
+(void)initializeWithPublicKey:(NSString *)key launchOptions:(NSDictionary *)launchOptions
+(void)initializeWithPublicKey:(NSString *)key launchOptions:(NSDictionary *)launchOptions delegate:(id)delegate
+(void)initializeWithConfiguration:(PlotConfiguration *)configuration launchOptions:(NSDictionary *)launchOptions
If you're using any of the methods above, replace them with [Plot initializeWithDelegate:self]
.
You can set the configuration via the configuration file or the configuration hook.
+(void)setEnableBackgroundModeWarning:(BOOL)enabled __attribute__((deprecated));
The above method can be removed without consequence, as it has no purpose in the current version.
+(void)setDelegate:(id)delegate
Swift¶
PlotBase.initialize(with: PlotConfiguration!, launchOptions: [AnyHashable : Any]!)
PlotBase.initialize(withPublicKey: String!, launchOptions: [AnyHashable : Any]!)
PlotBase.initialize(withPublicKey: String!, launchOptions: [AnyHashable : Any]!, delegate: PlotDelegate!)
If you're using any of the methods above, replace them with either PlotBase.init()
or PlotBase.initialize(launchOptions: [AnyHashable : Any]!, delegate: PlotDelegate!)
.
You can set the configuration via the configuration file or the configuration hook.
PlotBase.setEnableBackgroundModeWarning(enabled: Bool)
The above method can be removed without consequence, as it has no purpose in the current version.
PlotBase.setDelegate(delegate: PlotDelegate!)
Deprecated attributes were also removed, namely:
@property (assign, nonatomic) int cooldownPeriod
Use the setCooldownPeriod(secondsCooldown)
instead.
@property (strong, nonatomic) NSString* publicKey
You can set the public key via the configuration file or the configuration hook.
@property (assign, nonatomic) BOOL enableBackgroundModeWarning
The above attribute can be removed without consequence, as it has no purpose in the current version.
If you don't make use of any of the methods or attributes described above, upgrading from 2.x to 3.x only requires updating the Plot Projects SDK version. In case, you are coming from version 1.x, be sure to follow the 1.x to 2.x upgrade guide first.
You can find all versions of the iOS Plugin at our download page. The necessary steps to integrate the Plot plugin are in the iOS integration guide.