Classes
The following classes are available globally.
-
The scope where the recommendation of a content takes place
See moreDeclaration
Swift
public class RankingScope: NSObject
-
The class representing the User Meta Information Meta information are such as the way the user is logged in, the provider and so on.
Warning
This information is temporary and should be asked as soon as possible after a login procedureDeclaration
Swift
public class NWUserMetaInfo: NSObject, NWStorable, Expirable
-
The class capable of building Login Flows
- Building is always possible via a build call, provided that all the parameters which a Login Flow should know are provided before the build call is done
- It can be provided a parameter via a set call
- When a partcular Login flow is built, if one or more parameters are missing the build throw an exception
- If a build is successful you can create even more copies of the same login flow, and everyone of them will be ready to be started, even if the builder object dies and is recycled from the memory
Precondition
user is not already logged and there aren’t any current running Login Flow at the momentExample of usage:
See moredo { let builder = try Newton.getSharedInstance() .getLoginBuilder() .setCustomData(cData: NWSimpleObject(fromDictionary: ["aString": "aValue"])!) .setOnFlowCompleteCallback { error in DispatchQueue.main.async { () -> Void in if let error = error { print("Login Flow completed with Error: \(error)") } else { print("Login Flow went well") } } } let oAuthFlow = try builder.getOAuthLoginFlow() oAuthFlow.startLoginFlow() } catch NWError.NewtonNotInitialized(let reason) { print("Newton not initialized: \(reason)") } catch NWError.LoginBuilderError(let reason) { print("Login builder Error: \(reason)") } catch { print("Unknown Error: \(error)") }
Declaration
Swift
public class NWLoginBuilder
-
A simple aggregate of key:value, not nested, used mainly in Analytic events.
Important
The value types a simple Object can carry are limited to String, Int, Float, Double, Bool, NullAttention
There are limits to the memory that a Simple Object can occupy. Moreover Strings value cannot be more than 512 characters each.Declaration
Swift
public class NWSimpleObject: NSObject, NSCoding
-
Newton iOS SDK v1.2.0 Copyright © 2015 d-MobileLab S.p.A. All rights reserved.
See moreDeclaration
Swift
public final class Newton: NSObject
-
Base class for all login flow
Warning
you cannot instantiate a NWLoginFlowBase class directlyDeclaration
Swift
public class NWLoginFlowBase
-
The Class used to perform Custom Login in legacy applications
See moreDeclaration
Swift
public class NWCustomLoginFlow: NWLoginFlowBase, NWLoginFlow
-
The class representing the OAuth provider that is used in the Login Flow
See moreDeclaration
Swift
public class OAuthProvider: NSObject
-
The object used to perform OAuth login
See moreDeclaration
Swift
public class NWOAuthLoginFlow: NWLoginFlowBase, NWLoginFlow
-
The object used to perform MSISDN Login with number and PIN
See moreDeclaration
Swift
public class NWMSISDNPINLoginFlow: NWLoginFlowBase, NWLoginFlow, NWForgotFlow
-
The object used to perform MSISDN Login with user’s number recognition
See moreDeclaration
Swift
public class NWMSISDNUserRecognitionLoginFlow: NWLoginFlowBase, NWLoginFlow
-
The object used to perform External Login
See moreDeclaration
Swift
public class NWExternalLoginFlow: NWLoginFlowBase, NWLoginFlow
-
The Factory of NWPushBase objects to be built locally
See moreDeclaration
Swift
public class NWPushBuilder
-
The Object who manages all the interactions with Push Notifications, from APNS to PushNotification messages
See moreDeclaration
Swift
public class NWPushManager
-
The object describing the Push received
See moreDeclaration
Swift
public class NWPushBase: NSObject, NWStorable
-
Standard Push Notification is the common Push sent by the server
See moreDeclaration
Swift
public class NWStandardPush: NWPushBase
-
Url push notification is a special kind of push that redirects the user on a URL
See moreDeclaration
Swift
public class NWUrlPush: NWStandardPush
-
Background (Silent) push notification
Note
Check specifications at https://developer.apple.com/library/mac/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/TheNotificationPayload.html#//apple_ref/doc/uid/TP40008194-CH107-SW6Declaration
Swift
public class NWBackgroundPush: NWPushBase