This API can be used to set the polling time (minimum: 10s; default: 258s) of in-app messages.
/// Set the message polling time interval (minimum: 10s). This API should be called before the singleton initialization.
(void)setMessageTimerInterval:(NSTimeInterval)interval;
You can obtain custom event parameters through the proxy method onClickWithCustomAction
to handle related businesses.
/// Button event response proxy
@property (weak, nonatomic, nullable) id<XGInAppMessageActionDelegate> actionDelegate;
This API is used to add or update a mobile number. It is equivalent to calling upsertAccountsByDict:@{@(1002):@"specific mobile number"}
.
/// @note TPNS SDK1.3.2.1+
- (void)upsertPhoneNumber:(nonnull NSString *)phoneNumber;
phoneNumber: mobile number in E.164 format [+][country code or area code][subscriber number]
, for example, +8613711112222. The SDK will encrypt the mobile number for transmission.
[[XGPushTokenManager defaultTokenManager] upsertPhoneNumber:@"+8613712345678"];;
Note:
- This API should be called after
xgPushDidRegisteredDeviceToken:error:
returns a success.- You can call
delAccountsByKeys:[[NSSet alloc] initWithObjects:@(1002), nil]
to delete a mobile number.
Uncomment the 18th line in the AppDelegate.h
file to demonstrate the feature in the demo, as shown in the figure below:
Was this page helpful?