diff --git a/Examples/IndoorInBackground/IndoorInBackground.xcodeproj/project.pbxproj b/Examples/IndoorInBackground/IndoorInBackground.xcodeproj/project.pbxproj new file mode 100644 index 0000000..dab2291 --- /dev/null +++ b/Examples/IndoorInBackground/IndoorInBackground.xcodeproj/project.pbxproj @@ -0,0 +1,338 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + A54E11C21EF00C7200897D19 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A54E11C11EF00C7200897D19 /* AppDelegate.swift */; }; + A54E11C41EF00C7200897D19 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A54E11C31EF00C7200897D19 /* ViewController.swift */; }; + A54E11C71EF00C7200897D19 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A54E11C51EF00C7200897D19 /* Main.storyboard */; }; + A54E11C91EF00C7200897D19 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A54E11C81EF00C7200897D19 /* Assets.xcassets */; }; + A54E11CC1EF00C7200897D19 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A54E11CA1EF00C7200897D19 /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + A54E11BE1EF00C7200897D19 /* IndoorInBackground.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = IndoorInBackground.app; sourceTree = BUILT_PRODUCTS_DIR; }; + A54E11C11EF00C7200897D19 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + A54E11C31EF00C7200897D19 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + A54E11C61EF00C7200897D19 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + A54E11C81EF00C7200897D19 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + A54E11CB1EF00C7200897D19 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + A54E11CD1EF00C7200897D19 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + A54E11D31EF00F8200897D19 /* ObjCBridge.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ObjCBridge.h; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + A54E11BB1EF00C7200897D19 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + A54E11B51EF00C7200897D19 = { + isa = PBXGroup; + children = ( + A54E11C01EF00C7200897D19 /* IndoorInBackground */, + A54E11BF1EF00C7200897D19 /* Products */, + ); + sourceTree = ""; + }; + A54E11BF1EF00C7200897D19 /* Products */ = { + isa = PBXGroup; + children = ( + A54E11BE1EF00C7200897D19 /* IndoorInBackground.app */, + ); + name = Products; + sourceTree = ""; + }; + A54E11C01EF00C7200897D19 /* IndoorInBackground */ = { + isa = PBXGroup; + children = ( + A54E11C11EF00C7200897D19 /* AppDelegate.swift */, + A54E11C31EF00C7200897D19 /* ViewController.swift */, + A54E11C51EF00C7200897D19 /* Main.storyboard */, + A54E11C81EF00C7200897D19 /* Assets.xcassets */, + A54E11CA1EF00C7200897D19 /* LaunchScreen.storyboard */, + A54E11CD1EF00C7200897D19 /* Info.plist */, + A54E11D31EF00F8200897D19 /* ObjCBridge.h */, + ); + path = IndoorInBackground; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + A54E11BD1EF00C7200897D19 /* IndoorInBackground */ = { + isa = PBXNativeTarget; + buildConfigurationList = A54E11D01EF00C7200897D19 /* Build configuration list for PBXNativeTarget "IndoorInBackground" */; + buildPhases = ( + A5C2B9041EF16FE6008F509E /* Check TODOs */, + A54E11BA1EF00C7200897D19 /* Sources */, + A54E11BB1EF00C7200897D19 /* Frameworks */, + A54E11BC1EF00C7200897D19 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = IndoorInBackground; + productName = IndoorInBackground; + productReference = A54E11BE1EF00C7200897D19 /* IndoorInBackground.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + A54E11B61EF00C7200897D19 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0830; + LastUpgradeCheck = 0830; + ORGANIZATIONNAME = "Estimote Inc."; + TargetAttributes = { + A54E11BD1EF00C7200897D19 = { + CreatedOnToolsVersion = 8.3.3; + ProvisioningStyle = Automatic; + SystemCapabilities = { + com.apple.BackgroundModes = { + enabled = 1; + }; + }; + }; + }; + }; + buildConfigurationList = A54E11B91EF00C7200897D19 /* Build configuration list for PBXProject "IndoorInBackground" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = A54E11B51EF00C7200897D19; + productRefGroup = A54E11BF1EF00C7200897D19 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + A54E11BD1EF00C7200897D19 /* IndoorInBackground */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + A54E11BC1EF00C7200897D19 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A54E11CC1EF00C7200897D19 /* LaunchScreen.storyboard in Resources */, + A54E11C91EF00C7200897D19 /* Assets.xcassets in Resources */, + A54E11C71EF00C7200897D19 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + A5C2B9041EF16FE6008F509E /* Check TODOs */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Check TODOs"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "tags=\"TODO:\"\nmatches=`find \"${SRCROOT}\" \\( -name \"*.swift\" \\) -print0 | xargs -0 egrep --with-filename --line-number --only-matching \"($tags).*\\$\"`\necho \"$matches\" | perl -p -e \"s/($tags)/ error: \\$1/\"\n[ -z \"$matches\" ] || exit 1"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + A54E11BA1EF00C7200897D19 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A54E11C41EF00C7200897D19 /* ViewController.swift in Sources */, + A54E11C21EF00C7200897D19 /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + A54E11C51EF00C7200897D19 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + A54E11C61EF00C7200897D19 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + A54E11CA1EF00C7200897D19 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + A54E11CB1EF00C7200897D19 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + A54E11CE1EF00C7200897D19 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 10.3; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + A54E11CF1EF00C7200897D19 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 10.3; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + A54E11D11EF00C7200897D19 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEVELOPMENT_TEAM = ""; + INFOPLIST_FILE = IndoorInBackground/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.estimote.IndoorInBackground; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "${PROJECT_NAME}/ObjCBridge.h"; + SWIFT_VERSION = 3.0; + }; + name = Debug; + }; + A54E11D21EF00C7200897D19 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEVELOPMENT_TEAM = ""; + INFOPLIST_FILE = IndoorInBackground/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.estimote.IndoorInBackground; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "${PROJECT_NAME}/ObjCBridge.h"; + SWIFT_VERSION = 3.0; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + A54E11B91EF00C7200897D19 /* Build configuration list for PBXProject "IndoorInBackground" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A54E11CE1EF00C7200897D19 /* Debug */, + A54E11CF1EF00C7200897D19 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A54E11D01EF00C7200897D19 /* Build configuration list for PBXNativeTarget "IndoorInBackground" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A54E11D11EF00C7200897D19 /* Debug */, + A54E11D21EF00C7200897D19 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = A54E11B61EF00C7200897D19 /* Project object */; +} diff --git a/Examples/IndoorInBackground/IndoorInBackground.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Examples/IndoorInBackground/IndoorInBackground.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..2b72734 --- /dev/null +++ b/Examples/IndoorInBackground/IndoorInBackground.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Examples/IndoorInBackground/IndoorInBackground/AppDelegate.swift b/Examples/IndoorInBackground/IndoorInBackground/AppDelegate.swift new file mode 100644 index 0000000..f467355 --- /dev/null +++ b/Examples/IndoorInBackground/IndoorInBackground/AppDelegate.swift @@ -0,0 +1,111 @@ +// +// AppDelegate.swift +// IndoorInBackground +// + +import UIKit +import UserNotifications + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate, EILBackgroundIndoorLocationManagerDelegate { + + var window: UIWindow? + + let backgroundIndoorLocationManager = EILBackgroundIndoorLocationManager() + var fetchLocationTask: UIBackgroundTaskIdentifier = UIBackgroundTaskInvalid + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + + // TODO: put your App ID and App Token here + // You can get them by adding your app on https://cloud.estimote.com/#/apps + ESTConfig.setupAppID("<#App ID#>", andAppToken:"<#App Token#>") + + self.backgroundIndoorLocationManager.delegate = self + + // TODO: Double-check if the "Uses Bluetooth LE accessories" Background Mode is enabled. This is required for Indoor to work properly in the background. + + self.requestNecessaryPermissions() + self.fetchLocationAndStartPositioninig() + + return true + } + + func requestNecessaryPermissions() { + + // In order to relaunch the application (if it is killed by operating system or user) as the user enters the location “Always in use” Location Services authorization is required. + self.backgroundIndoorLocationManager.requestAlwaysAuthorization() + + // In this example notifications are used for showing the current position, but are not required for Indoor Location to work + let notificationOptions: UNAuthorizationOptions = [.alert, .sound]; + UNUserNotificationCenter.current().requestAuthorization(options: notificationOptions) { (granted, error) in + if !granted { + print("notification permission not granted") + } + } + } + + func fetchLocationAndStartPositioninig() { + + UIApplication.shared.beginBackgroundTask { + print("can't fetch location") + UIApplication.shared.endBackgroundTask(self.fetchLocationTask) + self.fetchLocationTask = UIBackgroundTaskInvalid + } + + // TODO: replace with an identifier of your own location + // You will find the identifier on https://cloud.estimote.com/#/locations + // The Indoor Location SDK can work fully offline. Locations can be fetched only once (or bundled with the app) and later stored in NSUserDefault or similar storage as they conform to NSCoding + let fetchLocation = EILRequestFetchLocation(locationIdentifier: "<#my-location#>") + fetchLocation.sendRequest { (location, error) in + if let location = location { + self.backgroundIndoorLocationManager.startPositionUpdates(for: location) + } else { + print("can't fetch location: \(error!)") + } + UIApplication.shared.endBackgroundTask(self.fetchLocationTask) + self.fetchLocationTask = UIBackgroundTaskInvalid + } + } + + func backgroundIndoorLocationManager(_ locationManager: EILBackgroundIndoorLocationManager, didFailToUpdatePositionWithError error: Error) { + print("failed to update position: \(error)") + } + + func backgroundIndoorLocationManager(_ locationManager: EILBackgroundIndoorLocationManager, didUpdatePosition position: EILOrientedPoint, with positionAccuracy: EILPositionAccuracy, in location: EILLocation) { + let content = UNMutableNotificationContent() + content.title = "Position updated" + content.body = "\(position)" + content.sound = UNNotificationSound.default() + let trigger = UNTimeIntervalNotificationTrigger(timeInterval: 0.1, repeats: false) + let identifier = "PositionNotification" + let request = UNNotificationRequest(identifier: identifier, content: content, trigger: trigger) + UNUserNotificationCenter.current().add(request, withCompletionHandler: { + (error) in + }) + } + + func applicationWillResignActive(_ application: UIApplication) { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. + } + + func applicationDidEnterBackground(_ application: UIApplication) { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + } + + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. + } + + func applicationDidBecomeActive(_ application: UIApplication) { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + } + + func applicationWillTerminate(_ application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + + +} + diff --git a/Examples/IndoorInBackground/IndoorInBackground/Assets.xcassets/AppIcon.appiconset/Contents.json b/Examples/IndoorInBackground/IndoorInBackground/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..1d060ed --- /dev/null +++ b/Examples/IndoorInBackground/IndoorInBackground/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,93 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Examples/IndoorInBackground/IndoorInBackground/Base.lproj/LaunchScreen.storyboard b/Examples/IndoorInBackground/IndoorInBackground/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..fdf3f97 --- /dev/null +++ b/Examples/IndoorInBackground/IndoorInBackground/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Examples/IndoorInBackground/IndoorInBackground/Base.lproj/Main.storyboard b/Examples/IndoorInBackground/IndoorInBackground/Base.lproj/Main.storyboard new file mode 100644 index 0000000..82af083 --- /dev/null +++ b/Examples/IndoorInBackground/IndoorInBackground/Base.lproj/Main.storyboard @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Examples/IndoorInBackground/IndoorInBackground/Info.plist b/Examples/IndoorInBackground/IndoorInBackground/Info.plist new file mode 100644 index 0000000..b7b98fc --- /dev/null +++ b/Examples/IndoorInBackground/IndoorInBackground/Info.plist @@ -0,0 +1,51 @@ + + + + + NSLocationAlwaysUsageDescription + Explain what value your app will bring to the user in exchange for access to their location. + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UIBackgroundModes + + bluetooth-central + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/Examples/IndoorInBackground/IndoorInBackground/ObjCBridge.h b/Examples/IndoorInBackground/IndoorInBackground/ObjCBridge.h new file mode 100644 index 0000000..93f89a1 --- /dev/null +++ b/Examples/IndoorInBackground/IndoorInBackground/ObjCBridge.h @@ -0,0 +1,11 @@ +// +// ObjCBridge.h +// IndoorInBackground +// + +#ifndef ObjCBridge_h +#define ObjCBridge_h + +#import "EILIndoorSDK.h" + +#endif /* ObjCBridge_h */ diff --git a/Examples/IndoorInBackground/IndoorInBackground/ViewController.swift b/Examples/IndoorInBackground/IndoorInBackground/ViewController.swift new file mode 100644 index 0000000..856fbea --- /dev/null +++ b/Examples/IndoorInBackground/IndoorInBackground/ViewController.swift @@ -0,0 +1,22 @@ +// +// ViewController.swift +// IndoorInBackground +// + +import UIKit + +class ViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view, typically from a nib. + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + + +} + diff --git a/Examples/IndoorInBackground/Podfile b/Examples/IndoorInBackground/Podfile new file mode 100644 index 0000000..6f97f31 --- /dev/null +++ b/Examples/IndoorInBackground/Podfile @@ -0,0 +1,3 @@ +target "IndoorInBackground" do +pod "EstimoteIndoorSDK" +end