Skip to content

Instantly share code, notes, and snippets.

View tssandor's full-sized avatar

TSS tssandor

View GitHub Profile
import QDPublisher
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
let publisher = Publisher.shared
let integrationKey: String = "your integration key here"
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.
extension AppDelegate: PublisherDelegate {
/// this method called when failure to track location
func publisherOnError(error: Error) {
print("track location failed, error: \(error.
localizedDescription)")
}
/// this method called when location successfully tracked
func publisherOnSuccessTracking() {
#import "AppDelegate.h"
@interface AppDelegate ()
@end
@implementation AppDelegate
NSString *integrationKey = @"your integration key here";
- (BOOL)application:(UIApplication *)application
#import <UIKit/UIKit.h>
@import QDPublisher;
@interface AppDelegate : UIResponder <UIApplicationDelegate,
PublisherDelegate>
@end
CREATE EXTERNAL TABLE <your-dbname>.<table-name> (
`device_id` string,
`id_type` string,
`latitude` float,
`longitude` float,
`horizontal_accuracy` float,
`timestamp` bigint,
`ip_address` string,
`device_os` string,
`os_version` string,