Latest1.3.9
Homepagehttps://github.com/clickntap/NeosuranceSDK
LicenseMIT
Platformsios 10.0
DependenciesTapFramework
Authors

Version
License
Platform

  • Collects info from device sensors and from the hosting app
  • Exchanges info with the AI engines
  • Sends the push notification
  • Displays a landing page
  • Displays the list of the purchased policies

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

    <key>NSAppTransportSecurity</key>
    <dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
    </dict>
    <key>NSLocationAlwaysUsageDescription</key>
    <string>Always...</string>
    <key>NSLocationWhenInUseUsageDescription</key>
    <string>When in use...</string>
    <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
    <string>Always and when in use...</string>
    <key>NSMotionUsageDescription</key>
    <string>Motion...</string>
    <key>UIBackgroundModes</key>
    <array>
    <string>audio</string>
    <string>fetch</string>
    <string>location</string>
    <string>remote-notification</string>
    </array>

Installation

NeosuranceSDK is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'NeosuranceSDK'
  1. Init
    NSMutableDictionary* settings = [[NSMutableDictionary alloc] init];
    [settings setObject:@"https://sandbox.neosurancecloud.net/sdk/api/v1.0/" forKey:@"base_url"];
    [settings setObject:@"xxxx" forKey:@"code"];
    [settings setObject:@"xxxx" forKey:@"secret_key"];
    [[NeosuranceSDK sharedInstance] setupWithDictionary:settings];
    [[NeosuranceSDK sharedInstance] stayInBackground];
  1. setUser
    NSRUser* user = [[NSRUser alloc] init];
    user.email = @"[email protected]";
    user.code = @"[email protected]";
    user.firstname = @"Jhon";
    user.lastname = @"Doe";
    [[NeosuranceSDK sharedInstance] registerUser:user];
  1. -(BOOL)forwardNotification
    - (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void(^)(void))completionHandler  {
        if(![[NeosuranceSDK sharedInstance] forwardNotification:response withCompletionHandler:(void(^)(void))completionHandler]) {
            //TODO: handle your notification
        }
        completionHandler();
    }
  1. -(void)showApp
    [[NeosuranceSDK sharedInstance] showApp];
  1. -(void)customEvent:(NSDictionary*)

    NSMutableDictionary* payload = [[NSMutableDictionary alloc] init];
    [payload setObject:@"custom" forKey:@"type"];
    [[NeosuranceSDK sharedInstance] sendEvent:@"custom" payload:payload];
  2. -(void)setSecurityDelegate:(NSRSecurityDelegate*)

    @protocol NSRSecurityDelegate <NSObject>
    -(void)secureRequest:(NSString* _Nullable)endpoint payload:(NSDictionary* _Nullable)payload headers:(NSDictionary* _Nullable)headers completionHandler:(void (^)(NSDictionary* responseObject, NSError *error))completionHandler;
    @end
    
    [[NeosuranceSDK sharedInstance] setSecurityDelegate:[[MySecurityDelegate alloc] init]];

Author

Giovanni Tigli, [email protected]
Tonino Mendicino, [email protected]

License

NeosuranceSDK is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "NeosuranceSDK",
    "version": "1.3.9",
    "summary": "Collects info from device sensors and from the hosting app",
    "description": "Neosurance SDK - Collects info from device sensors and from the hosting app - Exchanges info with the AI engines - Sends the push notification - Displays a landing page - Displays the list of the purchased policies",
    "homepage": "https://github.com/clickntap/NeosuranceSDK",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Tonino Mendicino": "[email protected]"
    },
    "source": {
        "git": "https://github.com/clickntap/NeosuranceSDK",
        "tag": "1.3.9"
    },
    "platforms": {
        "ios": "10.0"
    },
    "source_files": "NeosuranceSDK/Classes/**/*",
    "resource_bundles": {
        "NeosuranceSDK": [
            "NeosuranceSDK/Assets/*.*"
        ]
    },
    "dependencies": {
        "TapFramework": []
    }
}

Pin It on Pinterest

Share This