AppoxeeLocationServices 4.1.0

AppoxeeLocationServices 4.1.0

TestsTested
LangLanguage Obj-CObjective C
License Custom
ReleasedLast Release Sep 2016

Maintained by Raz Elkayam.



  • By
  • Appoxee

This repository contains the AppoxeeLocationServices iOS SDK.

Integration

Cocoa pods

target 'project_name' do
    pod 'AppoxeeLocationServices'
end

OR

target 'project_name' do
    pod 'AppoxeeLocationServices', :git => 'https://github.com/AppoxeeMobile/iosGeoArtifacts', :tag => '4.1.0'
end

Manual

* Drag and drop the ```AppoxeeSDK.framework``` to your project.
* Drag and drop the ```AppoxeeSDKResources.bundle``` to your project.
* Drag and drop the ```AppoxeeLocationServices.framework``` to your project.
* Link ```CoreLocation.framework``` and ```SQLite3``` to your project.

Configuration file

Make sure to provide an AppoxeeConfig.plist file for AppoxeeSDK.

Implementation

Objective-C

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    [[Appoxee shared] engageAndAutoIntegrateWithLaunchOptions:launchOptions andDelegate:nil];
    [[Appoxee shared] addObserver:self forKeyPath:@"isReady" options:(NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld) context:NULL];

    return YES;
}

- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
{
    if ([keyPath isEqualToString:@"isReady"]) {

        [[Appoxee shared] removeObserver:self forKeyPath:@"isReady"];

        [[AppoxeeLocationManager shared] enableLocationMonitoring];
    }
}

Swift

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {

        Appoxee.shared()?.engageAndAutoIntegrate(launchOptions: launchOptions, andDelegate: nil)
        Appoxee.shared()?.addObserver(self, forKeyPath: "isReady", options: ([.new, .old]), context: nil)

        return true
    }

    override func observeValue(forKeyPath keyPath: String?, of object: AnyObject?, change: [NSKeyValueChangeKey : AnyObject]?, context: UnsafeMutablePointer<Void>?) {

        if (keyPath == "isReady") {

            Appoxee.shared()?.removeObserver(self, forKeyPath: "isReady")
            AppoxeeLocationManager.shared().enableLocationMonitoring()
        }
    }

License

http://www.appoxee.com/terms/