-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Daniel
authored
May 23, 2018
1 parent
cfa60ad
commit bd15cb4
Showing
37 changed files
with
349 additions
and
82 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
Placed.framework/Placed.bundle/PlacedSurveyViewController.nib
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Pod::Spec.new do |s| | ||
s.name = "Placed" | ||
s.version = "4.1.1" | ||
s.version = "4.2.0" | ||
s.summary = "Placed Affiliate SDK" | ||
s.homepage = "https://www.placed.com" | ||
s.author = { "Placed Affiliate Program" => "[email protected]" } | ||
|
@@ -13,4 +13,5 @@ Pod::Spec.new do |s| | |
s.preserve_paths = 'Placed.framework' | ||
|
||
s.frameworks = 'CoreData', 'CoreTelephony', 'CoreLocation', 'CoreMotion', 'SystemConfiguration', 'AdSupport', 'Foundation', 'UIKit', 'Security' | ||
s.dependency 'CocoaLumberjack' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,46 +2,77 @@ | |
|
||
## Introduction | ||
|
||
The Placed SDK for iOS is designed to help you add Placed location gathering to your app. It exposes simple public API calls that can be used to turn location gathering on. | ||
The Placed SDK for iOS is designed to help you add Placed location gathering to your app. It exposes simple public API calls that can be used to turn on and off location gathering. | ||
|
||
The SDK has been designed for easy setup and integration with both new and existing mobile applications. | ||
|
||
## Setup | ||
|
||
The preferred method for installing the Placed SDK in your app is using CocoaPods. CocoaPods is dependency management system for Objective-C development. You can learn more about it at [http://cocoapods.org/](http://cocoapods.org/). | ||
#### Cocoapods | ||
The preferred method for installing the Placed SDK in your app is [CocoaPods](https://cocoapods.org/), a dependency manager for Cocoa projects. You can install CocoaPods with the following command: | ||
``` | ||
$ gem install cocoapods | ||
``` | ||
|
||
1. Add the following lines to your project's Podfile | ||
`pod 'Placed', :git => 'https://github.com/placed/ios-placed-sdk.git'` | ||
To integrate the Placed SDK into your Xcode project using CocoaPods, specify it in your `Podfile`: | ||
```ruby | ||
use_frameworks! | ||
|
||
2. Celebrate! | ||
pod 'Placed', :git => 'https://github.com/placed/ios-placed-sdk.git' | ||
``` | ||
Then, run the following command: | ||
``` | ||
$ pod install | ||
``` | ||
|
||
If you are not using CocoaPods, you can integrate the Placed.framework and Placed.bundle directly in your project. | ||
#### Manually | ||
|
||
If you are not using CocoaPods, you can integrate [Placed.framework](./Placed.framework) manually into your project. | ||
|
||
## Location Permission | ||
|
||
This SDK requires Apple's background location permission. Under the "Required background modes" key in your app’s main plist file you should make sure to add: | ||
As outlined in Section 5 of the [Placed Affiliate Agreement](https://affiliate.placed.com/placed-affiliate-agreement/), you must satisfy two requirements prior to registering a user with the Placed SDK: | ||
|
||
App registers for location updates | ||
1. *Gather Express Consent for User Data Collection via Opt-in Dialog* | ||
In addition having a legally compliant privacy policy describing Placed’s collection of location and device information, you must include a discrete opt-in dialog which gathers express consent for data collection. This dialog appears prior to the fine location permission prompt, and includes: | ||
- The language: “*Aggregated device data, including location, is measured for the purposes of market research by Placed, Inc.*” | ||
- Links to the Placed [Terms of Service](https://www.placed.com/terms-of-service) and [Privacy Policy](https://www.placed.com/privacy-policy) | ||
- Buttons to “Accept” or “Cancel” | ||
|
||
In addition, for iOS 11, you must provide all of the following location usage descriptions in your app's plist: | ||
|
||
2. *Prompt for Background Location Permission* | ||
Under the “Required background modes” `UIBackgroundModes` key in your app’s main plist file, you will need to add: | ||
``` | ||
App registers for location updates | ||
``` | ||
In addition, you must provide all of the following location usage descriptions in your app's plist: | ||
``` | ||
NSLocationAlwaysAndWhenInUseUsageDescription | ||
NSLocationWhenInUseUsageDescription | ||
NSLocationAlwaysUsageDescription | ||
NSLocationUsageDescription | ||
``` | ||
**These permissions are very important to the Placed SDK.** If your app does not currently use background location permission, please contact a Placed representative. | ||
For an example of the opt-in dialog and location permission prompt, please refer to the sample app. We have also provided a [gallery for inspiration](./gallery) on how you can better integrate the opt-in experience into your app. | ||
**These permissions are very important to the Placed SDK. If your app does not currently use background location permission, please contact a Placed representative.** | ||
## Integration | ||
## Usage | ||
1. Add `#import <Placed/PlacedAgent.h>` to your main AppDelegate. | ||
1. Add `[PlacedAgent createWithAppKey:andDelegate:]` call to your `AppDelegate`. Optionally, you may provide a `PlacedAgentDelegate` to this method but it is not required. | ||
```objc | ||
#import <Placed/PlacedAgent.h> | ||
2. Initialize the agent in your AppDelegate's `application:didFinishLaunchingWithOptions:`. | ||
@implementation AppDelegate | ||
- Call `[PlacedAgent createWithAppKey:@"<Application Key>" andDelegate:nil];` providing the app key you received from Placed. Optionally, you may provide a `PlacedAgentDelegate` to this method but it is not required. | ||
- Next, call `[PlacedAgent startTracking]`. This method must be called on every app start, but will only begin location collection if the user has been registered via the `[PlacedAgent registerUser]` method (see below). | ||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { | ||
// Initialize Placed SDK | ||
[PlacedAgent createWithAppKey:@"<Application Key>" andDelegate:nil] | ||
} | ||
``` | ||
3. Call `[PlacedAgent registerUser]` to register a new user for location collection by the Placed SDK. This method should only be called once in the user's lifecycle. If you have EULA or terms of service that the user is required to accept before tracking, call this method after the user accepts those terms. You may find the method `[PlacedAgent isUserRegistered]` useful for checking if `registerUser` has already been called before. | ||
2. Once you've gathered express consent to collect user data, call `[PlacedAgent registerUser]` to register a new user for location collection by the Placed SDK. This method should only be called once in the user's lifecycle. You may find the method `[PlacedAgent isUserRegistered]` useful for checking if `registerUser` has already been called. | ||
## How to join | ||
Please contact your Placed representative to find out how to register your account. If you do not have a representative yet, please email [[email protected]](mailto:[email protected]). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
SampleApp/SampleApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>IDEDidComputeMac32BitWarning</key> | ||
<true/> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
Oops, something went wrong.