Latest 1.0.0
Homepage https://github.com/Baoban/advance-ios-sdk
License Apache-2.0
Platforms ios 9.0
Authors

Advance iOS SDK

This SDK collects useful data for anti-fraud and credit scoring purpose from an iOS smart phone. All collected data are stored in a NSDictionary object, which can be converted to a JSON string and then be posted to a remote web server. iOS version should > 9.0.

How To Integration

If you use CocoaPods, then add these lines to your podfile. Run pod install:

use_frameworks!
pod 'ADVMobileDataSdk', :git => 'https://github.com/Baoban/advance-ios-sdk.git', :branch => 'master'

If you don’t use CocoaPods, then:

  1. Clone or download the SDK. Find ADVMobileDataSdk in ./build.
  2. Add the ADVMobileDataSdk.framework to your project’s Frameworks folder. We recommend checking "Copy items…".

With or without CocoaPods:

  1. If you want to fetch contact, must add NSContactsUsageDescription in Info.plist.
  2. If you want to fetch location, must add NSLocationWhenInUseUsageDescription in Info.plist.
  3. If you want to fetch calendar, must add NSCalendarsUsageDescription in Info.plist.
  4. If you want to fetch reminder, must add NSRemindersUsageDescription in Info.plist.
  5. If you want to fetch album, must add NSPhotoLibraryUsageDescription in Info.plist.

How To Use

  1. Import framework
#import <ADVMobileDataSdk/ADVMobileDataSdk.h>
  1. Fetch data by type
  [[ADVMobileDataFetcher sharedInstance] fetchDataForType:ADVMobileDataTypeDevice completionHandler:^(NSDictionary *data, NSError *error) {
    if (error) {
      NSLog(@"%@", error);
    } else {
      NSLog(@"%@", data);
    }
  }];

You can see demo from github for details.

Collected Data Structure

1.ADVMobileDataTypeContact

{
  "contacts" : [
    {
      "familyName" : "Bell",
      "birthday" : "1978-01-20 00:00:00 +0000",
      "nickName" : "",
      "nonGregorianBirthday" : "",
      "contactRelations" : [

      ],
      "organizationName" : "Creative Consulting",
      "departmentName" : "",
      "namePrefix" : "",
      "nameSuffix" : "",
      "emailAddress" : [
        "[email protected]"
      ],
      "socialProfiles" : [

      ],
      "phoneNumbers" : [
        "(555) 564-8583",
        "(415) 555-3695"
      ],
      "dates" : [

      ],
      "identifier" : "177C371E-701D-42F8-A03B-C61CA31627F6",
      "urlAddresses" : [
        "www.icloud.com"
      ],
      "postalAddresses" : [
        {
          "ISOCountryCode" : "us",
          "state" : "CA",
          "street" : "165 Davis Street",
          "city" : "Hillsborough",
          "country" : "",
          "postalCode" : "94010"
        }
      ],
      "middleName" : "",
      "jobTitle" : "Producer",
      "contactType" : "person",
      "phoneticMiddleName" : "",
      "note" : "",
      "phoneticGivenName" : "",
      "phoneticFamilyName" : "",
      "givenName" : "Kate",
      "instantMessageAddresses" : [

      ],
      "previousFamilyName" : ""
    }
  ] 
}

2.ADVMobileDataTypeLocation

{
  "location" : {
    "longitude" : "-122.406417",
    "latitude" : "37.785834"
  }
}

3.ADVMobileDataTypeDevice

{
  "device" : {
    "isBatteryMonitoringEnabled" : false,
    "systemName" : "iOS",
    "batteryState" : "Unknown",
    "deviceCode" : "x86_64",
    "orientation" : "UIDeviceOrientationPortrait",
    "isJailbroken" : false,
    "systemVersion" : "11.1",
    "batteryLevel" : -1,
    "name" : "duçš„MacBook Pro",
    "identifierForVendor" : "D07F1820-5A73-47B9-A889-E1128111749E"
  }
}

4.ADVMobileDataTypeNetwork

{
  "network" : {
    "localIP" : "192.168.1.46",
    "connectionType" : "WiFi"
  }
}

5.ADVMobileDataTypeCalendar

{
  "calendarEvents" : [
    {
      "location" : "",
      "endDate" : "2016-11-24 15:59:59 +0000",
      "startDate" : "2016-11-23 16:00:00 +0000",
      "notes" : "",
      "title" : "Thanksgiving",
      "calendarTitle" : "US Holidays",
      "lastModified" : "2016-04-22 00:00:30 +0000"
    }
  ]
}

6.ADVMobileDataTypeReminder

{
  "reminders" : [
    {
      "location" : "",
      "startDate" : "2017-11-16 08:00:00 +0000",
      "completionDate" : "",
      "title" : "extractData",
      "notes" : "",
      "calendarItemIdentifier" : "F6DA8865-DD85-4EF7-B526-C21AB0B5D048",
      "priority" : 0,
      "dueDate" : "2017-11-16 08:00:00 +0000"
    }
  ]
}

7.ADVMobileDataTypeAlbum

{
  "album" : [
    {
      "hidden" : false,
      "mediaType" : "Image",
      "locationLongitude" : -122.80317833333334,
      "modificationDate" : "2015-09-02 20:02:27 +0000",
      "creationDate" : "2011-03-13 00:17:25 +0000",
      "pixelHeight" : 2848,
      "locationLatitude" : 38.037444499999999,
      "duration" : 0,
      "favorite" : false,
      "pixelWidth" : 4288,
      "localIdentifier" : "106E99A1-4F6A-45A2-B320-B0AD4A8E8473/L0/001"
    }
  ]
}

Latest podspec

{
    "name": "ADVMobileDataSdk",
    "version": "1.0.0",
    "summary": "Official Advance.AI iOS mobile data SDK.",
    "homepage": "https://github.com/Baoban/advance-ios-sdk",
    "authors": {
        "Name": "Advance.AI"
    },
    "license": {
        "type": "Apache-2.0",
        "file": "LICENSE"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source": {
        "git": "https://github.com/Baoban/advance-ios-sdk.git",
        "branch": "master"
    },
    "ios": {
        "vendored_frameworks": "build/ADVMobileDataSdk.framework"
    }
}

Pin It on Pinterest

Share This