Implemented new class RPPermissionsWizard. Please, call it instance by returnInstance and use launchWithFinish for Objective-c or launch for Swift method with callback.
public var wizardBgColor : UIColor = UIColor.groupTableViewBackground
public var wizardMaintextColor : UIColor = UIColor.black
public var wizardAlertBackgroundColor : UIColor = UIColor.white
public var wizardAlertTextColor : UIColor = UIColor(hex: "6F8593")
public var wizardAlertButtonTextColor : UIColor = UIColor(hex: "0984ff")
public var wizardAlertActiveButtonTextColor: UIColor = UIColor.white
public var wizardAlertActiveButtonBgColor : UIColor = UIColor(hex: "FF9300")
public var wizardAlertCorners : CGFloat = 7.0
public var wizardNextButtonBgColor : UIColor = UIColor(red:
0.10980392156862745, green: 0.10980392156862745, blue: 0.11764705882352941,
alpha: 1.0)
public var wizardNextButtonTextColor : UIColor = UIColor.white
NSMutableAttributedString *firstButton = [[NSMutableAttributedString alloc] initWithString:@"Ok"];
NSMutableAttributedString *secondButton = [[NSMutableAttributedString alloc] initWithString:@"Cancel"];
NSArray<NSMutableAttributedString *> *buttonsList = [[NSArray alloc] initWithObjects:firstButton, secondButton, nil];
RPPageTexts *whileInUsePage = [[RPPageTexts alloc] initWithPageText:[[NSMutableAttributedString alloc] initWithString:@"Attention Required!\n\nYou will receive a popup shortly. This popup will aks you for access to your location even when you are not using the app.\n\nPlease, choose “Always While Using App” for <appName> to automatically detect when you start a trip."] alertText:[[NSMutableAttributedString alloc] initWithString:@"Allow <appName> to access your location?\n\nWe use location service for evaluating your driving manner. Be enabling “Always While Using App” on location, the app will be able to automatically determine when you have started and ended a drive"] buttonsText:buttonsList selected:1];
RPPageTexts *motionPage = [[RPPageTexts alloc] initWithPageText:[[NSMutableAttributedString alloc] initWithString:@"Attention Required!\n\nThen, You will receive a popup to grant us access to your Motion & Fitness activity. We need this information to create a driving score.\n\nPlease, choose “OK” for <appName> to grant us access to Motion & Fitness activity."] alertText:[[NSMutableAttributedString alloc] initWithString:@"<appName> Would Like to Access Your Motion & Fitness Activity\n\nWe use motion sensors for evaluating your driving manner"] buttonsText:buttonsList selected:1];
RPPageTexts *pushPage = [[RPPageTexts alloc] initWithPageText:[[NSMutableAttributedString alloc] initWithString:@"Attention Required!\n\nAs the next step, You will receive a popup to grant us rights to send you important notifications. You are always able to turn off notifications by categories in the App settings menu.\n\nPlease, choose “Allow” for <appName> to keep you informed on important events."] alertText:[[NSMutableAttributedString alloc] initWithString:@"<appName> Would Like to Send You Notifications\n\nNotifications may include alerts, sounds and icon badges. These can be configured in Settings"] buttonsText:buttonsList selected:1];
RPPageTexts *alwaysPage = [[RPPageTexts alloc] initWithPageText:[[NSMutableAttributedString alloc] initWithString:@"Attention Required!\n\nYou will receive a popup shortly for <appName> to have access to your location even when you are not using the app.\n\nFor the app to work properly\n“Change to Always Allow”"] alertText:[[NSMutableAttributedString alloc] initWithString:@"Allow <appName> to also access your location even when you are not using the app?\n\nWe use location service for generating a driving score. Be enabling “Always” on location, the app will be able to automatically determine when you have started and ended a drive"] buttonsText:buttonsList selected:1];
NSArray<RPPageTexts *> *customPages = [[NSArray alloc] initWithObjects:whileInUsePage, motionPage, pushPage, alwaysPage, nil];
[RPSettings returnInstance].wizardPages = customPages;
let whileInUsePage = RPPageTexts(pageText: NSMutableAttributedString(string: "Attention Required!\n\nYou will receive a popup shortly. This popup will aks you for access to your location even when you are not using the app.\n\nPlease, choose “Always While Using App” for <appName> to automatically detect when you start a trip."), alertText: NSMutableAttributedString(string: "Allow <appName> to access your location?\n\nWe use location service for evaluating your driving manner. Be enabling “Always While Using App” on location, the app will be able to automatically determine when you have started and ended a drive"), buttonsText: [NSMutableAttributedString(string: "Always While Using App”), NSMutableAttributedString(string: "Allow Once”), NSMutableAttributedString(string: "Don’t Allow”)], selected: 0)
let motionPage = RPPageTexts(pageText: NSMutableAttributedString(string: "Attention Required!\n\nThen, You will receive a popup to grant us access to your Motion & Fitness activity. We need this information to create a driving score.\n\nPlease, choose “OK” for <appName> to grant us access to Motion & Fitness activity."), alertText: NSMutableAttributedString(string: "<appName> Would Like to Access Your Motion & Fitness Activity\n\nWe use motion sensors for evaluating your driving manner"), buttonsText: [NSMutableAttributedString(string: "Don’t Allow”), NSMutableAttributedString(string: "OK”)], selected: 1)
let pushPage = RPPageTexts(pageText: NSMutableAttributedString(string: "Attention Required!\n\nAs the next step, You will receive a popup to grant us rights to send you important notifications. You are always able to turn off notifications by categories in the App settings menu.\n\nPlease, choose “Allow” for <appName> to keep you informed on important events."), alertText: NSMutableAttributedString(string: "<appName> Would Like to Send You Notifications\n\nNotifications may include alerts, sounds and icon badges. These can be configured in Settings"), buttonsText: [NSMutableAttributedString(string: "Don’t Allow”), NSMutableAttributedString(string: "Allow”)], selected: 1)
let alwaysPage = RPPageTexts(pageText: NSMutableAttributedString(string: "Attention Required!\n\nYou will receive a popup shortly for <appName> to have access to your location even when you are not using the app.\n\nFor the app to work properly\n“Change to Always Allow”"), alertText: NSMutableAttributedString(string: "Allow <appName> to also access your location even when you are not using the app?\n\nWe use location service for generating a driving score. Be enabling “Always” on location, the app will be able to automatically determine when you have started and ended a drive"), buttonsText: [NSMutableAttributedString(string: "Keep Only While Using”), NSMutableAttributedString(string: "Change to Always Allow”)], selected: 1)
RPSettings.returnInstance().wizardPages = [whileInUsePage, motionPage, pushPage, alwaysPage]