TOP > FAQ
FAQ
- Does the SDK support M1/arm64 simulator architecture?
- How can I implement the custom notification UI?
- How do I claim mission after a mission is achieved?
- How to set IDFA in RewardSDK?
- Can we access the Staging environment for development/testing?
- Can we use ID SDK + JID backend to log in?
- What is Rakuten auth login for?
- Which API should I use to start/establish SDK session?
Answer
Yes, M1 (arm64 simulator arch) is supported starting from version 3.4.3Answer
For example, Mission A needs 3 actions logged to be achieved.
[RakutenReward.shared logActionObjcWithActionCode:@"Example actioncode" completion:^(NSError * _Nullable error) { }];
After the above logAction API is called three times successfully, mission A is achieved. App can get the unclaimedItem from the delegate below
// From RakutenReward class
public var didUpdateUnclaimedAchievementObjc: ((UnclaimedItemObject) -> Void)?
// Example
RakutenReward.shared.didUpdateUnclaimedAchievementObjc = { unclaimedItem in }
Example implementation for showing custom UI
RakutenReward.shared.didUpdateUnclaimedAchievementObjc = ^(UnclaimedItemObject * _Nonnull unclaimedItem) {
if ([unclaimedItem.notificationType isKindOfClass:[NotificationTypeObjcCUSTOM class]] && // Check notification type
RewardConfiguration.isUserSettingUIEnabled && // Check if user enable the UI setting or not
!RewardConfiguration.isPortalPresent) { // Check if Portal is currently showing, not support for showing notification inside Portal.
// Show Custom UI in Main thread
}
};
Answer
For example, Mission A needs 3 actions logged to be achieved.
[RakutenReward.shared logActionObjcWithActionCode:@"Example actioncode" completion:^(NSError * _Nullable error) { }];
After the above logAction API is called three times successfully, mission A is achieved. App can get the unclaimedItem from the delegate below
// From RakutenReward class
public var didUpdateUnclaimedAchievementObjc: ((UnclaimedItemObject) -> Void)?
// Example
RakutenReward.shared.didUpdateUnclaimedAchievementObjc = { unclaimedItem in }
Points can be claimed by calling the 'claim' method from RakutenReward shared object.
[RakutenReward.shared claimObjcWithUnclaimedItemObject:unclaimedItemObject completion:^(PointClaimScreenEventObjc * _Nonnull pointClaimScreenEvent) {
if ([pointClaimScreenEvent isKindOfClass:[PointClaimScreenEventObjcWillPresent class]]) {}
else if ([pointClaimScreenEvent isKindOfClass:[PointClaimScreenEventObjcDidFailToShow class]]) {}
else if ([pointClaimScreenEvent isKindOfClass:[PointClaimScreenEventObjcDidSelfDismiss class]]) {}
else if ([pointClaimScreenEvent isKindOfClass:[PointClaimScreenEventObjcDidDismissByUser class]]) {}
else if ([pointClaimScreenEvent isKindOfClass:[PointClaimScreenEventObjcDidFailToClaim class]]) {}
else if ([pointClaimScreenEvent isKindOfClass:[PointClaimScreenEventObjcDidClaimSuccessfully class]]) {}
}];
Answer
IDFA/Advertising ID can be set using below API
RakutenReward.sharedInstance.advertisingID
Example
// Requesting for ATTracking permission, if authorized
if (ATTrackingManager.trackingAuthorizationStatus == ATTrackingManagerAuthorizationStatusAuthorized) {
RakutenReward.shared.advertisingID = ASIdentifierManager.sharedManager.advertisingIdentifier.UUIDString;
}
Answer
No, currently we do not provide Staging environment for developers. Please use development mode or test account for development/testing.
Answer
Yes, with IDSDK and JID as backend, you can set the token type as RID
// iOS example
RakutenReward.shared.tokenType = TokenTypeRID;
Then can pass (API-C) token value in the startSession API
// iOS example
[RakutenReward.shared startSessionObjcWithAppCode:@"Appcode" accessToken:@"sessionAccessToken" completion:^(SDKUserObject * _Nullable user, RewardSDKSessionErrorObjc * _Nullable error) { }];
Answer
The RakutenAuth login option is for third-party. For example, apps outside Rakuten do not use Rakuten login SDK (RID or RAE). Therefore, they can use the RakutenAuth login option. If your app is using Rakuten login SDK already, then you don't need to use the Rakuten auth login option
Answer
The SDK has 2 APIs for starting sessions.
If you log in with IDSDK/UserSDK (RID/RAE),
[RakutenReward.shared startSessionObjcWithAppCode:@"Appcode" accessToken:@"sessionAccessToken" completion:^(SDKUserObject * _Nullable user, RewardSDKSessionErrorObjc * _Nullable error) { }];
Otherwise, if you're using Third Party login (non-Rakuten login),
[RakutenReward.shared startSessionObjcWithAppCode:@"Appcode" completion:^(SDKUserObject * _Nullable user, RewardSDKSessionErrorObjc * _Nullable error) { }];
LANGUAGE :