Skip to content

Commit

Permalink
Updated JTProximitySDK.framework to 1.6.0-alpha.1
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-fraccaroli committed Sep 12, 2019
1 parent 2d462f1 commit 75f5940
Show file tree
Hide file tree
Showing 14 changed files with 84 additions and 18 deletions.
2 changes: 1 addition & 1 deletion JTProximitySDK.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "JTProximitySDK"
s.version = "1.5.0"
s.version = "1.6.0-alpha.1"
s.summary = "iOS library for Jointag Proximity"
s.homepage = "https://www.jointag.com/"
s.author = "Jointag S.r.l."
Expand Down
Binary file modified Library/JTProximitySDK.bundle/Adv.storyboardc/Info.plist
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Library/JTProximitySDK.bundle/Assets.car
Binary file not shown.
Binary file modified Library/JTProximitySDK.bundle/Info.plist
Binary file not shown.
9 changes: 7 additions & 2 deletions Library/JTProximitySDK.framework/Headers/JTProximitySDK.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ NS_SWIFT_NAME(ProximitySDK)

@property (assign, nonatomic) BOOL promptForLocationAuthorization;

@property (assign, nonatomic) BOOL cmpEnabled;

@property (weak, nonatomic, nullable) id<JTProximityCustomDelegate> customDelegate;

+ (nonnull instancetype)sharedInstance NS_SWIFT_NAME(instance());
Expand All @@ -50,8 +52,6 @@ NS_SWIFT_NAME(ProximitySDK)

- (void)initWithLaunchOptions:(nullable NSDictionary *)launchOptions apiKey:(nonnull NSString *)apiKey apiSecret:(nonnull NSString *)apiSecret;

- (void)initWithLaunchOptions:(nullable NSDictionary *)launchOptions apiKey:(nonnull NSString *)apiKey apiSecret:(nonnull NSString *)apiSecret debug:(BOOL)debug;

// Pre iOS 10
- (BOOL)application:(nonnull UIApplication *)application didReceiveLocalNotification:(nonnull UILocalNotification *)notification;

Expand All @@ -66,4 +66,9 @@ NS_SWIFT_NAME(ProximitySDK)

- (void)requestLocationAuthorization;

- (void)setGDPRConsent:(BOOL)consent forVendor:(int)vendorId;
- (BOOL)getGDPRConsentForVendor:(int) vendorId;

@end


Binary file modified Library/JTProximitySDK.framework/Info.plist
Binary file not shown.
Binary file modified Library/JTProximitySDK.framework/JTProximitySDK
Binary file not shown.
91 changes: 76 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,30 @@
2. [Handling Notifications](#user-content-handling-notifications)
3. [Tracking users](#user-content-tracking-users)
4. [Disable automatic permission requests](#user-content-disable-automatic-permission-requests)
4. [Receive custom events](#user-content-receive-custom-events)
5. [GDPR](#user-content-gdpr)
6. [Receive custom events](#user-content-receive-custom-events)

## Installation

### CocoaPods

Add `pod JTProximitySDK` to your Podfile and run `pod install`. More on [CocoaPods here](https://cocoapods.org/).
Add `pod JTProximitySDK` to your Podfile and run `pod install`. More on
[CocoaPods here](https://cocoapods.org/).

### Manual

Jointag Proximity SDK is distribute as a compiled **framework** and a **resource bundle**. To add it to your project, include the *JTProximitySDK.framework* and *JTProximitySDK.bundle* files to get started:
Jointag Proximity SDK is distribute as a compiled **framework** and a **resource
bundle**. To add it to your project, include the *JTProximitySDK.framework* and
*JTProximitySDK.bundle* files to get started:

1. Drag and drop JTProximitySDK.framework and JTProximitySDK.bundle files into your Xcode project (remember to check *"Copy items if needed"*). It will automatically show up in your project navigator and will be added to *"Linked Frameworks and Libraries"* and *"Copy Bundle Resources"* sections in project settings.
1. Drag and drop JTProximitySDK.framework and JTProximitySDK.bundle files into
your Xcode project (remember to check *"Copy items if needed"*). It will
automatically show up in your project navigator and will be added to *"Linked
Frameworks and Libraries"* and *"Copy Bundle Resources"* sections in project
settings.

2. Jointag Proximity SDK depends on the following Apple frameworks to work, so you should include them in your project too.
2. Jointag Proximity SDK depends on the following Apple frameworks to work, so
you should include them in your project too.
- Foundation.framework
- CFNetwork.framework
- CoreBluetooth.framework
Expand All @@ -35,6 +44,8 @@ Jointag Proximity SDK is distribute as a compiled **framework** and a **resource
- SystemConfiguration.framework
- libsqlite3.tbd

3. Add the "-all_load" linker flag to your project's target "Build Settings"

## Project settings
You have to put in the `Info.plist` of your project the following settings:

Expand Down Expand Up @@ -63,6 +74,7 @@ Place the following code inside the `UIApplicationDelegate` of your application:
// Other application logics
}
```

##### Swift

```swift
Expand All @@ -75,7 +87,8 @@ func application(_ application: UIApplication, didFinishLaunchingWithOptions lau

### Handling Notifications

To enable the SDK to correctly send and manager advertising notifications, you must implement the following method in your `UIApplicationDelegate`:
To enable the SDK to correctly send and manager advertising notifications, you
must implement the following method in your `UIApplicationDelegate`:

##### Objective-C

Expand All @@ -99,7 +112,8 @@ func application(_ application: UIApplication, didReceive notification: UILocalN
}
```

If you plan to support **iOS 10.0** or later, you must also add this code in your `UNUserNotificationCenterDelegate` methods:
If you plan to support **iOS 10.0** or later, you must also add this code in
your `UNUserNotificationCenterDelegate` methods:

##### Objective-C

Expand Down Expand Up @@ -145,7 +159,13 @@ func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive respo

### Tracking users

The SDK associates each tracked event with the *IDFA*. If the *IDFA* is not available due to a user permission denial, the device can be identified by the *installationId*. The *installationId* identifies in particular a specific installation of the SDK in a certain app on a certain device. If the app containing the SDK is uninstalled and then installed again the *installationId* will be a different one. You can retrieve the *installationId* after the initialization of the SDK anywhere in your code with the following line:
The SDK associates each tracked event with the *IDFA*. If the *IDFA* is not
available due to a user permission denial, the device can be identified by the
*installationId*. The *installationId* identifies in particular a specific
installation of the SDK in a certain app on a certain device. If the app
containing the SDK is uninstalled and then installed again the *installationId*
will be a different one. You can retrieve the *installationId* after the
initialization of the SDK anywhere in your code with the following line:

##### Objective-C

Expand All @@ -161,15 +181,56 @@ ProximitySDK.instance().installationId()

### Disable automatic permission requests

You can disable the SDK automatic location and notification permission requests during initialization by setting to NO the following properties on `JTProximitySDK.sharedInstance`:
You can disable the SDK automatic location and notification permission requests
during initialization by setting to NO the following properties on
`JTProximitySDK.sharedInstance`:

- `promptForPushNotifications` : set to `NO` to disable the automatic request
for user notifications permission
- `promptForLocationAuthorization` : set to `NO` to disable the automatic
request for user location permission

Note: the properties must be set before calling any
`initWithLaunchOptions:apiKey:apiSecret:` method.

### GDPR

As a publisher, you should integrate a Consent Management Platform (CMP) and
request for vendor and purpose consents as outlined in IAB Europe’s Mobile
In-App CMP API v1.0: Transparency & Consent Framework.

To ensure that the SDK support the handling of user-consent preferences when a
IAB-compatible CMP library is present, you must enable the feature through the
`ProximitySDK.setCmpEnabled:` method, which is `false` by default.

This method must be called before the library
`initWithLaunchOptions:apiKey:apiSecret:` method to guarantee an error-free
process.

You can find a reference implementation of a web-based CMP and the corresponding
native wrappers here:
https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework.

If you are embedding your own custom CMP, the collected end user consent
information needs to be stored in `UserDefaults.standard` using the following
keys:

- `promptForPushNotifications` : set to `NO` to disable the automatic request for user notifications permission
- `promptForLocationAuthorization` : set to `NO` to disable the automatic request for user location permission
Key Value

Note: the properties must be set before calling any `initWithLaunchOptions:apiKey:apiSecret:` method.
| Key | Type | Description |
| -------------------------------- | ------- | ------------------------------- |
| IABConsent_CMPPresent | Boolean | (Set to `true` if a CMP that follows the iAB specification is present in the application) |
| IABConsent_SubjectToGDPR | String | `1` - (subject to GDPR), `0` - (not subject to GDPR), `-1` - Unknown (default before initialization) |
| IABConsent_ConsentString | String | (Base64-encoded consent string as defined in Consent string and vendor list format v1.1) |
| IABConsent_ParsedPurposeConsents | String | (String of `0`s and `1`s, where the character at position N indicates the consent status to purposeID N as defined in the Global Vendor List) |
| IABConsent_ParsedVendorConsents | String | (String of `0`s and `1`s, where the character at position N indicates the consent status to vendorID N as defined in the Global Vendor List) |

## Receive custom events
### Receive custom events

You can receive custom advertising events (if configured in the backend) to integrate application-specific features by using the `customDelegate` property of `ProximitySDK` instance.
You can receive custom advertising events (if configured in the backend) to
integrate application-specific features by using the `customDelegate` property
of `ProximitySDK` instance.

When the application user interacts with a custom-action notification, the `jtProximityDidReceiveCustomAction:` method is invoked by passing a `customAction` NSString object.
When the application user interacts with a custom-action notification, the
`jtProximityDidReceiveCustomAction:` method is invoked by passing a
`customAction` NSString object.

0 comments on commit 75f5940

Please sign in to comment.