Commit e10443ec authored by Paolo Donato's avatar Paolo Donato

Update ios.md

parent 6988628a
......@@ -16,6 +16,7 @@
1. [Mobile key](#user-content-mobile-key)
2. [Location usage keys](#user-content-location-usage-keys)
3. [Universal framework](#user-content-location-universal-framework)
4. [Background fetch](#user-content-location-background-fetch)
4. [Basic operations](#user-content-basic-operations)
1. [Initialization](#user-content-initialization)
2. [Enable/Disable SDK](#user-content-enabledisable-the-sdk)
......@@ -86,6 +87,7 @@ GULocationPermissionNotDetermined: "We would like to ask your permission to acce
```
### Universal framework
In order to give you the best development experience we provide an 'Universal Framework': a framework which works both on simulator and real device.
What you have to do is just add one line of code as described below:
......@@ -93,6 +95,36 @@ What you have to do is just add one line of code as described below:
2. Build Phases tab -> add new Run Script phase after Embed Frameworks phase
3. Paste `./GeoUniq.framework/run` in the script text box (Cocoapods insallation paste: `${PODS_ROOT}/GeoUniq.framework/run`)
### Background fetch
In order to obtain a greater number of positions we suggest to enable this feature. To do this carry out these two steps:
1. Select your project -> Select your target -> Select 'Signing & Capabilities' tab -> tap on '+ Capability' -> select 'Background Modes' -> check 'Background fetch'
2. In AppDelegate add this code:
```swift
//Swift
/* ------ AppDelegate.swift ------ */
func application(application: UIApplication, performFetchWithCompletionHandler completionHandler: (UIBackgroundFetchResult) -> Void){
//call GeoUniq backgroundFetch() method
GeoUniq.sharedInstance().backgroundFetch()
}
```
```objc
//Objective C
/* ------ AppDelegate.m ------ */
- (void) application:(UIApplication *)application performFetchWithCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler{
//call GeoUniq backgroundFetch() method
[[GeoUniq sharedInstance] backgroundFetch];
completionHandler(UIBackgroundFetchResultNewData);
}
```
## Basic operations
### Initialization
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment