diff --git a/Podfile b/Podfile new file mode 100644 index 0000000..df756b5 --- /dev/null +++ b/Podfile @@ -0,0 +1,11 @@ +# Uncomment the next line to define a global platform for your project +# platform :ios, '9.0' + +target 'polestar-indoor-location-provider-ios' do + # Uncomment the next line if you're using Swift or would like to use dynamic frameworks + use_frameworks! + pod 'IndoorLocation' + pod 'MapwizeUI' + # Pods for polestar-indoor-location-provider-ios + +end diff --git a/PolestarIndoorLocationProvider.podspec b/PolestarIndoorLocationProvider.podspec new file mode 100644 index 0000000..b3d7688 --- /dev/null +++ b/PolestarIndoorLocationProvider.podspec @@ -0,0 +1,13 @@ +Pod::Spec.new do |s| + s.name = "PolestarIndoorLocationProvider" + s.version = "1.0.0" + s.license = { :type => 'MIT' } + s.summary = "Allows to use polestar to provide indoorlocation" + s.homepage = "https://github.com/IndoorLocation/polestar-indoor-location-provider-ios" + s.author = { "Indoor Location" => "indoorlocation@mapwize.io" } + s.platform = :ios + s.ios.deployment_target = '8.0' + s.source = { :git => "https://github.com/IndoorLocation/polestar-indoor-location-provider-ios", :tag => "#{s.version}" } + s.source_files = "polestar-indoor-location-provider-ios/IndoorLocationProvider/*.{h,m}" + s.dependency "IndoorLocation", "~> 1.0" +end diff --git a/README.md b/README.md index 5372b20..009a6e9 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,47 @@ -# polestar-indoor-location-provider-ios -COMING SOON - IndoorLocationProvider for PoleStar beacon-based Indoor Positioning System +# Polestar IndoorLocation Provider for iOS + +This modules allows you to use the Indoor Location provided by [Pole Star](https://www.polestar.eu/) and connect it to [Mapwize](https://www.mapwize.io/) in one line of code. + +Using this provider requires you to be both a Mapwize and a Pole Star customer. You can sign up for a free Mapwize account at [www.mapwize.io](https://www.mapwize.io/). To purchase the Pole Star solution, please visit [www.polestar.eu/](https://www.polestar.eu/). + +## Use + +Instanciate the provider using your credentials: + +```c +provider = [[ILPolestarIndoorLocationProvider alloc] initWithPolestarKey:@"POLESTAR API KEY"]; +``` + +Set the provider in your Mapwize SDK: + +```c +[self.mapwizePlugin setIndoorLocationProvider:provider]; +``` + +The Pole Star locationHandle is available as property of the provider so developers can access it directly. + +## Manage altitude + +The locations provided by Polestar manages altitude in meters while in IndoorLocation, the elevation is in floors. The default conversion is to divide the altitude by 5 to get the floor. If you need more granularity in the conversion, you can use `floorByAltitude` to specify your mapping. The map takes altitudes (NSNumber) as keys and floors (NSNumber) as values. + +## Demo app + +A simple demo application to test the provider is available in this project. + +You will need to set your Mapwize credentials in the `info.plist` file and your Pole Star key in `ViewController.m`. + +Please make sure to call `pod install` before running the app. + +## Contribute + +Contributions are welcome. We will be happy to review your PR. + +## Support + +For any support with this provider, please do not hesitate to contact [support@polestar.eu](mailto:support@polestar.eu) and [support@mapwize.io](mailto:support@mapwize.io) + +## License + +This IndoorLocation Provider is made available under the MIT. + +Mapwize and Pole Star SDKs used in this project are proprietary of their respective suppliers and are not open-source. \ No newline at end of file diff --git a/polestar-indoor-location-provider-ios.xcodeproj/project.pbxproj b/polestar-indoor-location-provider-ios.xcodeproj/project.pbxproj new file mode 100644 index 0000000..18937ac --- /dev/null +++ b/polestar-indoor-location-provider-ios.xcodeproj/project.pbxproj @@ -0,0 +1,534 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 48; + objects = { + +/* Begin PBXBuildFile section */ + 793E756BC78B00D7D293E100 /* Pods_polestar_indoor_location_provider_ios.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 935B1F1D87A2A9729F0B2F24 /* Pods_polestar_indoor_location_provider_ios.framework */; }; + 8F623BFF20356CB2008D28F8 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F623BFE20356CB2008D28F8 /* AppDelegate.m */; }; + 8F623C0220356CB2008D28F8 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F623C0120356CB2008D28F8 /* ViewController.m */; }; + 8F623C0520356CB2008D28F8 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8F623C0320356CB2008D28F8 /* Main.storyboard */; }; + 8F623C0720356CB2008D28F8 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8F623C0620356CB2008D28F8 /* Assets.xcassets */; }; + 8F623C0A20356CB2008D28F8 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8F623C0820356CB2008D28F8 /* LaunchScreen.storyboard */; }; + 8F623C0D20356CB2008D28F8 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F623C0C20356CB2008D28F8 /* main.m */; }; + 8F623C1620356D8A008D28F8 /* ILPolestarIndoorLocationProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F623C1520356D8A008D28F8 /* ILPolestarIndoorLocationProvider.m */; }; + 8F623C322035703B008D28F8 /* libNAOSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8F623C312035703B008D28F8 /* libNAOSDK.a */; }; + 8F623C342035706B008D28F8 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 8F623C332035706B008D28F8 /* libz.tbd */; }; + 8F623C3620357076008D28F8 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 8F623C3520357076008D28F8 /* libc++.tbd */; }; + 8F623C3820357080008D28F8 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8F623C3720357080008D28F8 /* SystemConfiguration.framework */; }; + 8F623C3A20357088008D28F8 /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8F623C3920357088008D28F8 /* CoreMotion.framework */; }; + 8F623C3C2035708D008D28F8 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8F623C3B2035708D008D28F8 /* CoreLocation.framework */; }; + 8F623C3E20357096008D28F8 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8F623C3D20357096008D28F8 /* CoreBluetooth.framework */; }; + 8F623C402035814A008D28F8 /* nao.kml in Resources */ = {isa = PBXBuildFile; fileRef = 8F623C3F2035814A008D28F8 /* nao.kml */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 3B2DD13F0DFD7B9905FC46F9 /* Pods-polestar-indoor-location-provider-ios.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-polestar-indoor-location-provider-ios.release.xcconfig"; path = "Pods/Target Support Files/Pods-polestar-indoor-location-provider-ios/Pods-polestar-indoor-location-provider-ios.release.xcconfig"; sourceTree = ""; }; + 8F623BFA20356CB2008D28F8 /* polestar-indoor-location-provider-ios.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "polestar-indoor-location-provider-ios.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 8F623BFD20356CB2008D28F8 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 8F623BFE20356CB2008D28F8 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 8F623C0020356CB2008D28F8 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + 8F623C0120356CB2008D28F8 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + 8F623C0420356CB2008D28F8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 8F623C0620356CB2008D28F8 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 8F623C0920356CB2008D28F8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 8F623C0B20356CB2008D28F8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 8F623C0C20356CB2008D28F8 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 8F623C1420356D8A008D28F8 /* ILPolestarIndoorLocationProvider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ILPolestarIndoorLocationProvider.h; sourceTree = ""; }; + 8F623C1520356D8A008D28F8 /* ILPolestarIndoorLocationProvider.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ILPolestarIndoorLocationProvider.m; sourceTree = ""; }; + 8F623C1820357019008D28F8 /* NaoContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NaoContext.h; sourceTree = ""; }; + 8F623C1920357019008D28F8 /* NAOAnalyticsHandle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NAOAnalyticsHandle.h; sourceTree = ""; }; + 8F623C1A20357019008D28F8 /* DBTPOWERMODE.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DBTPOWERMODE.h; sourceTree = ""; }; + 8F623C1B20357019008D28F8 /* NAOSensorsDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NAOSensorsDelegate.h; sourceTree = ""; }; + 8F623C1C20357019008D28F8 /* NAOServiceHandle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NAOServiceHandle.h; sourceTree = ""; }; + 8F623C1D2035701A008D28F8 /* NAOAnalyticsHandleDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NAOAnalyticsHandleDelegate.h; sourceTree = ""; }; + 8F623C1E2035701A008D28F8 /* NAOLocationHandleDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NAOLocationHandleDelegate.h; sourceTree = ""; }; + 8F623C1F2035701A008D28F8 /* NAOBeaconReportingHandle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NAOBeaconReportingHandle.h; sourceTree = ""; }; + 8F623C202035701A008D28F8 /* NAOSDK.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NAOSDK.h; sourceTree = ""; }; + 8F623C212035701A008D28F8 /* DBTBEACONSTATE.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DBTBEACONSTATE.h; sourceTree = ""; }; + 8F623C222035701A008D28F8 /* NAOGeofencingHandle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NAOGeofencingHandle.h; sourceTree = ""; }; + 8F623C232035701A008D28F8 /* NAOLocationHandle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NAOLocationHandle.h; sourceTree = ""; }; + 8F623C242035701A008D28F8 /* NAOBeaconProximityHandleDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NAOBeaconProximityHandleDelegate.h; sourceTree = ""; }; + 8F623C252035701A008D28F8 /* NAOGeofenceData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NAOGeofenceData.h; sourceTree = ""; }; + 8F623C262035701A008D28F8 /* DBTNAOFIXSTATUS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DBTNAOFIXSTATUS.h; sourceTree = ""; }; + 8F623C272035701A008D28F8 /* NAOGeofencingHandleDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NAOGeofencingHandleDelegate.h; sourceTree = ""; }; + 8F623C282035701A008D28F8 /* NAOGeofenceHandleDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NAOGeofenceHandleDelegate.h; sourceTree = ""; }; + 8F623C292035701B008D28F8 /* NAOServicesConfig.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NAOServicesConfig.h; sourceTree = ""; }; + 8F623C2A2035701B008D28F8 /* NAOSyncDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NAOSyncDelegate.h; sourceTree = ""; }; + 8F623C2B2035701B008D28F8 /* NaoAlert.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NaoAlert.h; sourceTree = ""; }; + 8F623C2C2035701B008D28F8 /* DBTALERTRULE.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DBTALERTRULE.h; sourceTree = ""; }; + 8F623C2D2035701B008D28F8 /* NAOBeaconReportingHandleDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NAOBeaconReportingHandleDelegate.h; sourceTree = ""; }; + 8F623C2E2035701B008D28F8 /* DBNAOAlertRule.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DBNAOAlertRule.h; sourceTree = ""; }; + 8F623C2F2035701B008D28F8 /* NAOBeaconProximityHandle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NAOBeaconProximityHandle.h; sourceTree = ""; }; + 8F623C302035701B008D28F8 /* DBNAOERRORCODE.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DBNAOERRORCODE.h; sourceTree = ""; }; + 8F623C312035703B008D28F8 /* libNAOSDK.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libNAOSDK.a; sourceTree = ""; }; + 8F623C332035706B008D28F8 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; + 8F623C3520357076008D28F8 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; }; + 8F623C3720357080008D28F8 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; + 8F623C3920357088008D28F8 /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; }; + 8F623C3B2035708D008D28F8 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; + 8F623C3D20357096008D28F8 /* CoreBluetooth.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreBluetooth.framework; path = System/Library/Frameworks/CoreBluetooth.framework; sourceTree = SDKROOT; }; + 8F623C3F2035814A008D28F8 /* nao.kml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = nao.kml; sourceTree = ""; }; + 935B1F1D87A2A9729F0B2F24 /* Pods_polestar_indoor_location_provider_ios.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_polestar_indoor_location_provider_ios.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + F5654E39A629B654BE2A54AD /* Pods-polestar-indoor-location-provider-ios.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-polestar-indoor-location-provider-ios.debug.xcconfig"; path = "Pods/Target Support Files/Pods-polestar-indoor-location-provider-ios/Pods-polestar-indoor-location-provider-ios.debug.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8F623BF720356CB1008D28F8 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8F623C3E20357096008D28F8 /* CoreBluetooth.framework in Frameworks */, + 8F623C3C2035708D008D28F8 /* CoreLocation.framework in Frameworks */, + 8F623C3A20357088008D28F8 /* CoreMotion.framework in Frameworks */, + 8F623C3820357080008D28F8 /* SystemConfiguration.framework in Frameworks */, + 8F623C3620357076008D28F8 /* libc++.tbd in Frameworks */, + 8F623C342035706B008D28F8 /* libz.tbd in Frameworks */, + 793E756BC78B00D7D293E100 /* Pods_polestar_indoor_location_provider_ios.framework in Frameworks */, + 8F623C322035703B008D28F8 /* libNAOSDK.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 4F5BFB779014841294C70C61 /* Pods */ = { + isa = PBXGroup; + children = ( + F5654E39A629B654BE2A54AD /* Pods-polestar-indoor-location-provider-ios.debug.xcconfig */, + 3B2DD13F0DFD7B9905FC46F9 /* Pods-polestar-indoor-location-provider-ios.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; + 8F623BF120356CB1008D28F8 = { + isa = PBXGroup; + children = ( + 8F623BFC20356CB2008D28F8 /* polestar-indoor-location-provider-ios */, + 8F623BFB20356CB2008D28F8 /* Products */, + 4F5BFB779014841294C70C61 /* Pods */, + C0E8C5D1406B3C71CDA5C02D /* Frameworks */, + ); + sourceTree = ""; + }; + 8F623BFB20356CB2008D28F8 /* Products */ = { + isa = PBXGroup; + children = ( + 8F623BFA20356CB2008D28F8 /* polestar-indoor-location-provider-ios.app */, + ); + name = Products; + sourceTree = ""; + }; + 8F623BFC20356CB2008D28F8 /* polestar-indoor-location-provider-ios */ = { + isa = PBXGroup; + children = ( + 8F623C1320356D70008D28F8 /* IndoorLocationProvider */, + 8F623BFD20356CB2008D28F8 /* AppDelegate.h */, + 8F623BFE20356CB2008D28F8 /* AppDelegate.m */, + 8F623C0020356CB2008D28F8 /* ViewController.h */, + 8F623C0120356CB2008D28F8 /* ViewController.m */, + 8F623C0320356CB2008D28F8 /* Main.storyboard */, + 8F623C0620356CB2008D28F8 /* Assets.xcassets */, + 8F623C0820356CB2008D28F8 /* LaunchScreen.storyboard */, + 8F623C0B20356CB2008D28F8 /* Info.plist */, + 8F623C0C20356CB2008D28F8 /* main.m */, + ); + path = "polestar-indoor-location-provider-ios"; + sourceTree = ""; + }; + 8F623C1320356D70008D28F8 /* IndoorLocationProvider */ = { + isa = PBXGroup; + children = ( + 8F623C1720356FF5008D28F8 /* NAOSdk */, + 8F623C1420356D8A008D28F8 /* ILPolestarIndoorLocationProvider.h */, + 8F623C1520356D8A008D28F8 /* ILPolestarIndoorLocationProvider.m */, + ); + path = IndoorLocationProvider; + sourceTree = ""; + }; + 8F623C1720356FF5008D28F8 /* NAOSdk */ = { + isa = PBXGroup; + children = ( + 8F623C3F2035814A008D28F8 /* nao.kml */, + 8F623C312035703B008D28F8 /* libNAOSDK.a */, + 8F623C2E2035701B008D28F8 /* DBNAOAlertRule.h */, + 8F623C302035701B008D28F8 /* DBNAOERRORCODE.h */, + 8F623C2C2035701B008D28F8 /* DBTALERTRULE.h */, + 8F623C212035701A008D28F8 /* DBTBEACONSTATE.h */, + 8F623C262035701A008D28F8 /* DBTNAOFIXSTATUS.h */, + 8F623C1A20357019008D28F8 /* DBTPOWERMODE.h */, + 8F623C2B2035701B008D28F8 /* NaoAlert.h */, + 8F623C1920357019008D28F8 /* NAOAnalyticsHandle.h */, + 8F623C1D2035701A008D28F8 /* NAOAnalyticsHandleDelegate.h */, + 8F623C2F2035701B008D28F8 /* NAOBeaconProximityHandle.h */, + 8F623C242035701A008D28F8 /* NAOBeaconProximityHandleDelegate.h */, + 8F623C1F2035701A008D28F8 /* NAOBeaconReportingHandle.h */, + 8F623C2D2035701B008D28F8 /* NAOBeaconReportingHandleDelegate.h */, + 8F623C1820357019008D28F8 /* NaoContext.h */, + 8F623C252035701A008D28F8 /* NAOGeofenceData.h */, + 8F623C282035701A008D28F8 /* NAOGeofenceHandleDelegate.h */, + 8F623C222035701A008D28F8 /* NAOGeofencingHandle.h */, + 8F623C272035701A008D28F8 /* NAOGeofencingHandleDelegate.h */, + 8F623C232035701A008D28F8 /* NAOLocationHandle.h */, + 8F623C1E2035701A008D28F8 /* NAOLocationHandleDelegate.h */, + 8F623C202035701A008D28F8 /* NAOSDK.h */, + 8F623C1B20357019008D28F8 /* NAOSensorsDelegate.h */, + 8F623C1C20357019008D28F8 /* NAOServiceHandle.h */, + 8F623C292035701B008D28F8 /* NAOServicesConfig.h */, + 8F623C2A2035701B008D28F8 /* NAOSyncDelegate.h */, + ); + path = NAOSdk; + sourceTree = ""; + }; + C0E8C5D1406B3C71CDA5C02D /* Frameworks */ = { + isa = PBXGroup; + children = ( + 8F623C3D20357096008D28F8 /* CoreBluetooth.framework */, + 8F623C3B2035708D008D28F8 /* CoreLocation.framework */, + 8F623C3920357088008D28F8 /* CoreMotion.framework */, + 8F623C3720357080008D28F8 /* SystemConfiguration.framework */, + 8F623C3520357076008D28F8 /* libc++.tbd */, + 8F623C332035706B008D28F8 /* libz.tbd */, + 935B1F1D87A2A9729F0B2F24 /* Pods_polestar_indoor_location_provider_ios.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8F623BF920356CB1008D28F8 /* polestar-indoor-location-provider-ios */ = { + isa = PBXNativeTarget; + buildConfigurationList = 8F623C1020356CB2008D28F8 /* Build configuration list for PBXNativeTarget "polestar-indoor-location-provider-ios" */; + buildPhases = ( + 6089895031540592C35B80AE /* [CP] Check Pods Manifest.lock */, + 8F623BF620356CB1008D28F8 /* Sources */, + 8F623BF720356CB1008D28F8 /* Frameworks */, + 8F623BF820356CB1008D28F8 /* Resources */, + B609C6022D8598F81D5271B1 /* [CP] Embed Pods Frameworks */, + 21C1C08072587B46A8065181 /* [CP] Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "polestar-indoor-location-provider-ios"; + productName = "polestar-indoor-location-provider-ios"; + productReference = 8F623BFA20356CB2008D28F8 /* polestar-indoor-location-provider-ios.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 8F623BF220356CB1008D28F8 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0920; + ORGANIZATIONNAME = "Etienne Mercier"; + TargetAttributes = { + 8F623BF920356CB1008D28F8 = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Automatic; + }; + }; + }; + buildConfigurationList = 8F623BF520356CB1008D28F8 /* Build configuration list for PBXProject "polestar-indoor-location-provider-ios" */; + compatibilityVersion = "Xcode 8.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 8F623BF120356CB1008D28F8; + productRefGroup = 8F623BFB20356CB2008D28F8 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8F623BF920356CB1008D28F8 /* polestar-indoor-location-provider-ios */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8F623BF820356CB1008D28F8 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8F623C0A20356CB2008D28F8 /* LaunchScreen.storyboard in Resources */, + 8F623C0720356CB2008D28F8 /* Assets.xcassets in Resources */, + 8F623C0520356CB2008D28F8 /* Main.storyboard in Resources */, + 8F623C402035814A008D28F8 /* nao.kml in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 21C1C08072587B46A8065181 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-polestar-indoor-location-provider-ios/Pods-polestar-indoor-location-provider-ios-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + 6089895031540592C35B80AE /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-polestar-indoor-location-provider-ios-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + B609C6022D8598F81D5271B1 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${SRCROOT}/Pods/Target Support Files/Pods-polestar-indoor-location-provider-ios/Pods-polestar-indoor-location-provider-ios-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/IndoorLocation/IndoorLocation.framework", + "${PODS_ROOT}/Mapbox-iOS-SDK/dynamic/Mapbox.framework", + "${PODS_ROOT}/Mapbox-iOS-SDK/dynamic/Mapbox.framework.dSYM", + "${PODS_ROOT}/MapwizeForMapbox/MapwizeForMapbox.framework", + "${BUILT_PRODUCTS_DIR}/MapwizeUI/MapwizeUI.framework", + "${BUILT_PRODUCTS_DIR}/SSZipArchive/SSZipArchive.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IndoorLocation.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Mapbox.framework", + "${DWARF_DSYM_FOLDER_PATH}/Mapbox.framework.dSYM", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapwizeForMapbox.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapwizeUI.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SSZipArchive.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-polestar-indoor-location-provider-ios/Pods-polestar-indoor-location-provider-ios-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8F623BF620356CB1008D28F8 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8F623C0220356CB2008D28F8 /* ViewController.m in Sources */, + 8F623C0D20356CB2008D28F8 /* main.m in Sources */, + 8F623BFF20356CB2008D28F8 /* AppDelegate.m in Sources */, + 8F623C1620356D8A008D28F8 /* ILPolestarIndoorLocationProvider.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 8F623C0320356CB2008D28F8 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 8F623C0420356CB2008D28F8 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 8F623C0820356CB2008D28F8 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 8F623C0920356CB2008D28F8 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 8F623C0E20356CB2008D28F8 /* 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++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = 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_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + 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 = 11.2; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 8F623C0F20356CB2008D28F8 /* 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++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = 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_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "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 = gnu11; + 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 = 11.2; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 8F623C1120356CB2008D28F8 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = F5654E39A629B654BE2A54AD /* Pods-polestar-indoor-location-provider-ios.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = GGHGAE294R; + INFOPLIST_FILE = "polestar-indoor-location-provider-ios/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk", + ); + PRODUCT_BUNDLE_IDENTIFIER = "io.indoorlocation.polestar-indoor-location-provider-ios"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 8F623C1220356CB2008D28F8 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 3B2DD13F0DFD7B9905FC46F9 /* Pods-polestar-indoor-location-provider-ios.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = GGHGAE294R; + INFOPLIST_FILE = "polestar-indoor-location-provider-ios/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk", + ); + PRODUCT_BUNDLE_IDENTIFIER = "io.indoorlocation.polestar-indoor-location-provider-ios"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 8F623BF520356CB1008D28F8 /* Build configuration list for PBXProject "polestar-indoor-location-provider-ios" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8F623C0E20356CB2008D28F8 /* Debug */, + 8F623C0F20356CB2008D28F8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 8F623C1020356CB2008D28F8 /* Build configuration list for PBXNativeTarget "polestar-indoor-location-provider-ios" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8F623C1120356CB2008D28F8 /* Debug */, + 8F623C1220356CB2008D28F8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 8F623BF220356CB1008D28F8 /* Project object */; +} diff --git a/polestar-indoor-location-provider-ios.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/polestar-indoor-location-provider-ios.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..173aa95 --- /dev/null +++ b/polestar-indoor-location-provider-ios.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/polestar-indoor-location-provider-ios.xcworkspace/contents.xcworkspacedata b/polestar-indoor-location-provider-ios.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..3b5a136 --- /dev/null +++ b/polestar-indoor-location-provider-ios.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/polestar-indoor-location-provider-ios.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/polestar-indoor-location-provider-ios.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/polestar-indoor-location-provider-ios.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/polestar-indoor-location-provider-ios/AppDelegate.h b/polestar-indoor-location-provider-ios/AppDelegate.h new file mode 100644 index 0000000..b5a9c37 --- /dev/null +++ b/polestar-indoor-location-provider-ios/AppDelegate.h @@ -0,0 +1,17 @@ +// +// AppDelegate.h +// polestar-indoor-location-provider-ios +// +// Created by Etienne Mercier on 15/02/2018. +// Copyright © 2018 Etienne Mercier. All rights reserved. +// + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + + +@end + diff --git a/polestar-indoor-location-provider-ios/AppDelegate.m b/polestar-indoor-location-provider-ios/AppDelegate.m new file mode 100644 index 0000000..ec2c956 --- /dev/null +++ b/polestar-indoor-location-provider-ios/AppDelegate.m @@ -0,0 +1,51 @@ +// +// AppDelegate.m +// polestar-indoor-location-provider-ios +// +// Created by Etienne Mercier on 15/02/2018. +// Copyright © 2018 Etienne Mercier. All rights reserved. +// + +#import "AppDelegate.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Override point for customization after application launch. + return YES; +} + + +- (void)applicationWillResignActive:(UIApplication *)application { + // 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. +} + + +- (void)applicationDidEnterBackground:(UIApplication *)application { + // 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. +} + + +- (void)applicationWillEnterForeground:(UIApplication *)application { + // 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. +} + + +- (void)applicationDidBecomeActive:(UIApplication *)application { + // 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. +} + + +- (void)applicationWillTerminate:(UIApplication *)application { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. +} + + +@end diff --git a/polestar-indoor-location-provider-ios/Assets.xcassets/AppIcon.appiconset/Contents.json b/polestar-indoor-location-provider-ios/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..1d060ed --- /dev/null +++ b/polestar-indoor-location-provider-ios/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/polestar-indoor-location-provider-ios/Base.lproj/LaunchScreen.storyboard b/polestar-indoor-location-provider-ios/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..f83f6fd --- /dev/null +++ b/polestar-indoor-location-provider-ios/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/polestar-indoor-location-provider-ios/Base.lproj/Main.storyboard b/polestar-indoor-location-provider-ios/Base.lproj/Main.storyboard new file mode 100644 index 0000000..08b852b --- /dev/null +++ b/polestar-indoor-location-provider-ios/Base.lproj/Main.storyboard @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/polestar-indoor-location-provider-ios/IndoorLocationProvider/ILPolestarIndoorLocationProvider.h b/polestar-indoor-location-provider-ios/IndoorLocationProvider/ILPolestarIndoorLocationProvider.h new file mode 100644 index 0000000..2f37270 --- /dev/null +++ b/polestar-indoor-location-provider-ios/IndoorLocationProvider/ILPolestarIndoorLocationProvider.h @@ -0,0 +1,16 @@ +#import +#import "NAOLocationHandle.h" +#import "NAOLocationHandleDelegate.h" +#import "NAOSyncDelegate.h" +#import "NAOSensorsDelegate.h" +#import "DBNAOERRORCODE.h" +#import "DBTNAOFIXSTATUS.h" + +@interface ILPolestarIndoorLocationProvider : ILIndoorLocationProvider + +@property (nonatomic, strong) NAOLocationHandle * locationHandle; +@property (nonatomic, strong) NSDictionary* floorByAltitude; + +- (instancetype)initWithPolestarKey:(NSString*) apiKey; + +@end diff --git a/polestar-indoor-location-provider-ios/IndoorLocationProvider/ILPolestarIndoorLocationProvider.m b/polestar-indoor-location-provider-ios/IndoorLocationProvider/ILPolestarIndoorLocationProvider.m new file mode 100644 index 0000000..73d6080 --- /dev/null +++ b/polestar-indoor-location-provider-ios/IndoorLocationProvider/ILPolestarIndoorLocationProvider.m @@ -0,0 +1,99 @@ +#import "ILPolestarIndoorLocationProvider.h" + +@implementation ILPolestarIndoorLocationProvider { + BOOL shouldStart; + BOOL isStarted; + BOOL isDataSync; +} + +- (instancetype)initWithPolestarKey:(NSString*) apiKey +{ + self = [super init]; + if (self) { + shouldStart = NO; + isStarted = NO; + isDataSync = NO; + _locationHandle = [[NAOLocationHandle alloc] initWithKey:apiKey + delegate:self + sensorsDelegate:self]; + [_locationHandle synchronizeData:self]; + } + return self; +} + +- (BOOL) supportsFloor { + return true; +} + +- (void) start { + if (isStarted) { + return; + } + if (isDataSync) { + [_locationHandle start]; + isStarted = YES; + shouldStart = NO; + } + else { + shouldStart = YES; + } +} + +- (void) stop { + [_locationHandle stop]; +} + +- (BOOL) isStarted { + return isStarted; +} + +- (void)didSynchronizationFailure:(DBNAOERRORCODE)errorCode msg:(NSString *)message { + NSLog(@"NAOSyncError %@", message); +} + +- (void)didSynchronizationSuccess { + isDataSync = YES; + if (shouldStart) { + [self start]; + } +} + +- (void)didFailWithErrorCode:(DBNAOERRORCODE)errCode andMessage:(NSString *)message { + [self dispatchDidFailWithError:[NSError errorWithDomain:@"ILPolestarIndoorLocationProvider" code:errCode userInfo:nil]]; +} + +- (void)didLocationChange:(CLLocation *)location { + ILIndoorLocation* indoorLocation = [[ILIndoorLocation alloc] initWithProvider:self latitude:location.coordinate.latitude longitude:location.coordinate.longitude floor:[NSNumber numberWithDouble:location.altitude/5]]; + if (_floorByAltitude) { + NSNumber* floor = _floorByAltitude[[NSNumber numberWithDouble:location.altitude]]; + if (floor) { + indoorLocation.floor = floor; + } + else { + [self dispatchDidFailWithError:[NSError errorWithDomain:@"ILPolestarIndoorLocationProvider : No floor found" code:0 userInfo:nil]]; + } + } + [self dispatchDidUpdateLocation:indoorLocation]; +} + +- (void)didLocationStatusChanged:(DBTNAOFIXSTATUS)status { + +} + +- (void)requiresBLEOn { + +} + +- (void)requiresCompassCalibration { + +} + +- (void)requiresLocationOn { + +} + +- (void)requiresWifiOn { + +} + +@end diff --git a/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/DBNAOAlertRule.h b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/DBNAOAlertRule.h new file mode 100755 index 0000000..34f2d63 --- /dev/null +++ b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/DBNAOAlertRule.h @@ -0,0 +1,23 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file generated by Djinni from com_polestar_naosdk_api_external.djinni + +#import "DBTALERTRULE.h" +#import + +/** Geofencing alert rule */ +@interface DBNAOAlertRule : NSObject +- (nonnull instancetype)initWithId:(int32_t)id + type:(DBTALERTRULE)type + regionId:(int32_t)regionId; ++ (nonnull instancetype)NAOAlertRuleWithId:(int32_t)id + type:(DBTALERTRULE)type + regionId:(int32_t)regionId; + +@property (nonatomic, readonly) int32_t id; + +@property (nonatomic, readonly) DBTALERTRULE type; + +/** id of the region associated with the rule */ +@property (nonatomic, readonly) int32_t regionId; + +@end diff --git a/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/DBNAOERRORCODE.h b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/DBNAOERRORCODE.h new file mode 100755 index 0000000..8e0b654 --- /dev/null +++ b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/DBNAOERRORCODE.h @@ -0,0 +1,24 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file generated by Djinni from com_polestar_naosdk_api_external.djinni + +#import + +/** + *--objc-type-prefix DB + * Error codes + */ +typedef NS_ENUM(NSInteger, DBNAOERRORCODE) +{ + /** Invalid API key : inconsistent key accross services or key does not match PDB: check for typo in your key, check your site details on NAO Cloud and contact Pole Star Team. */ + DBNAOERRORCODE_INVALID_API_KEY, + /** Problem occured during a service instantiation / termination */ + DBNAOERRORCODE_SERVICE_LIFECYCLE, + /** Unable to synchronize data for your site: problem with the connection or missing inputs */ + DBNAOERRORCODE_DATA_SYNCHRO, + /** Unsupported OS */ + DBNAOERRORCODE_UNSUPPORTED_OS, + /** for Pole Star use, you should not see those. */ + DBNAOERRORCODE_INTERNAL_ERROR, + /** generic error code */ + DBNAOERRORCODE_GENERIC_ERROR, +}; diff --git a/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/DBTALERTRULE.h b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/DBTALERTRULE.h new file mode 100755 index 0000000..94537bc --- /dev/null +++ b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/DBTALERTRULE.h @@ -0,0 +1,23 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file generated by Djinni from com_polestar_naosdk_api_external.djinni + +#import + +/** Geofencing alert rule types */ +typedef NS_ENUM(NSInteger, DBTALERTRULE) +{ + /** getting near a beacon */ + DBTALERTRULE_NEARRULE, + /** moving away from a beacon */ + DBTALERTRULE_LEAVINGNEARRULE, + /** entering beacon proximity */ + DBTALERTRULE_ENTERRULE, + /** leaving beacon proximity */ + DBTALERTRULE_EXITRULE, + /** entering a geofence polygon */ + DBTALERTRULE_ENTERGEOFENCERULE, + /** exiting a geofence polygon */ + DBTALERTRULE_EXITGEOFENCERULE, + /** being inside a geofence polygon */ + DBTALERTRULE_ISINSIDEGEOFENCERULE, +}; diff --git a/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/DBTBEACONSTATE.h b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/DBTBEACONSTATE.h new file mode 100755 index 0000000..be5e1bd --- /dev/null +++ b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/DBTBEACONSTATE.h @@ -0,0 +1,19 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file generated by Djinni from com_polestar_naosdk_api_external.djinni + +#import + +/** Beacon proximity service status types */ +typedef NS_ENUM(NSInteger, DBTBEACONSTATE) +{ + /** No change in beacon status OBSOLETE WILL BE REMOVE FROM API IN NEXT VERSION */ + DBTBEACONSTATE_NO_CHANGE, + /** Beacon is going out of range */ + DBTBEACONSTATE_FIRST_UNSEEN, + /** Beacon in transitory state before it's considered out of range (specifically on iOS, status reported when we don't get RSSI in ble measurement) */ + DBTBEACONSTATE_FIRST_UNKNOWN, + /** Beacon is seen with signal below the proximity threshold */ + DBTBEACONSTATE_FIRST_FAR, + /** Beacon is seen with signal above the proximity threshold */ + DBTBEACONSTATE_FIRST_NEAR, +}; diff --git a/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/DBTNAOFIXSTATUS.h b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/DBTNAOFIXSTATUS.h new file mode 100755 index 0000000..ba204d0 --- /dev/null +++ b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/DBTNAOFIXSTATUS.h @@ -0,0 +1,20 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file generated by Djinni from com_polestar_naosdk_api_external.djinni + +#import + +/** + *--objc-type-prefix DB + * NAO Location service status + */ +typedef NS_ENUM(NSInteger, DBTNAOFIXSTATUS) +{ + /** A critical error has occurred: location is not available; details about the error are returned by onError callback. */ + DBTNAOFIXSTATUS_NAO_OUT_OF_SERVICE, + /** Location is unavailable for lack of sensor input: sensors could have been turned off or device might be going off-site. */ + DBTNAOFIXSTATUS_NAO_TEMPORARY_UNAVAILABLE, + /** Location fixes are being produced at a normal rate. */ + DBTNAOFIXSTATUS_NAO_FIX_AVAILABLE, + /** Location is unavailable as device is off-site. */ + DBTNAOFIXSTATUS_NAO_FIX_UNAVAILABLE, +}; diff --git a/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/DBTPOWERMODE.h b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/DBTPOWERMODE.h new file mode 100755 index 0000000..fe6c7b4 --- /dev/null +++ b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/DBTPOWERMODE.h @@ -0,0 +1,16 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file generated by Djinni from com_polestar_naosdk_api_external.djinni + +#import + +/** + *--objc-type-prefix DB + * NAO Services power modes (trade-off between accuracy and power consumption) + */ +typedef NS_ENUM(NSInteger, DBTPOWERMODE) +{ + /** accurate power mode */ + DBTPOWERMODE_HIGH, + /** low-power mode */ + DBTPOWERMODE_LOW, +}; diff --git a/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOAnalyticsHandle.h b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOAnalyticsHandle.h new file mode 100755 index 0000000..363783d --- /dev/null +++ b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOAnalyticsHandle.h @@ -0,0 +1,49 @@ +// +// NAOAnalyticsHandle.h +// NaoSDK +// +// Created by Pole Star on 23/11/2015. +// Copyright © 2015 POLE STAR SA. All rights reserved. +// + +#import + +#import "NAOAnalyticsHandleDelegate.h" +#import "NAOSyncDelegate.h" +#import "NAOSensorsDelegate.h" +#import "NAOServiceHandle.h" + +@class NaoContext; + +/** NAO Analytics Service + + The NAOAnalyticsHandle inherits from NAOServiceHandle which itself inhgerits form NSObject. + You need to create an instance for NAOAnalyticsHandle to get access to the analytics service. + The NAOAnalyticsHandle enables you to start the analytics service. + */ +@interface NAOAnalyticsHandle : NAOServiceHandle + +/** WARNING : init not available, please use initWithKey: delegate: sensorsDelegate: + + */ +-(instancetype _Nonnull) init __attribute__((unavailable("init not available, please use initWithKey: delegate: sensorsDelegate:"))); + +/** Init NAOAnalyticsHandle with API key + + By default, for the analytics service, the configuration file (alert.json) is located on Amazon S3. + However, you can host this file on your own private server if you want. + The data will be synchronised each time you call the method **synchroniseData** of your manager. + + @param key: The API Key is key available in the developer section of NAO Cloud. A key is associated to one and only one application. + By Default, one API key is created at the site creation, this API key is associated with the site. The services available through this API key are the services activated on this associated site. + + @param delegate: Object implementing the NAOAnalyticsHandleDelegate protocol + + @param sensorsDelegate: Object implementing the NAOSensorsDelegate protocol + + */ +- (id _Nonnull)initWithKey:(NSString * _Nonnull)key delegate:(id _Nonnull)delegate sensorsDelegate:(id _Nonnull)sensorsDelegate; + +- (id _Nonnull)initWithNaoContext:(NaoContext * _Nullable)naoContext key:(NSString * _Nonnull)key delegate:(id _Nonnull)delegate sensorsDelegate:(id _Nonnull)sensorsDelegate ; + +@end diff --git a/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOAnalyticsHandleDelegate.h b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOAnalyticsHandleDelegate.h new file mode 100755 index 0000000..dc54d84 --- /dev/null +++ b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOAnalyticsHandleDelegate.h @@ -0,0 +1,25 @@ +// +// NAOAnalyticsHandleDelegate.h +// NaoSDK +// +// Created by Pole Star on 23/11/2015. +// Copyright © 2015 POLE STAR SA. All rights reserved. +// + +#import +#import "DBNAOERRORCODE.h" + +/** NAOAnalyticsHandleDelegate receives NAOAnalyticsHandle event + + */ +@protocol NAOAnalyticsHandleDelegate + +/** NAO Analytics Error + + @param errCode: Indicates an error code among DBNAOERRORCODE. + @param message: The message contains additionnal information. + */ +- (void) didFailWithErrorCode:(DBNAOERRORCODE)errCode andMessage:(NSString*)message; + + +@end diff --git a/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOBeaconProximityHandle.h b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOBeaconProximityHandle.h new file mode 100755 index 0000000..778c47a --- /dev/null +++ b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOBeaconProximityHandle.h @@ -0,0 +1,50 @@ +// +// NAOBeaconProximityHandle.h +// NaoSDK +// +// Created by Pole Star on 23/11/2015. +// Copyright © 2015 POLE STAR SA. All rights reserved. +// + +#import + +#import "NAOBeaconProximityHandleDelegate.h" +#import "NAOSyncDelegate.h" +#import "NAOSensorsDelegate.h" +#import "NAOServiceHandle.h" + +@class NaoContext; + +/** NAO Beacon Proxomity Service + + The NAOBeaconProximityHandle inherits from NAOServiceHandle which itself inhgerits form NSObject. + You need to create an instance for NAOBeaconProximityHandle to get access to the Beacon Proximity service. + The NAOBeaconProximityHandle enables you to start the beacon proximity service. + + */ +@interface NAOBeaconProximityHandle : NAOServiceHandle + +/** WARNING : init not available, please use initWithKey: delegate: sensorsDelegate: + + */ +-(instancetype _Nonnull) init __attribute__((unavailable("init not available, please use initWithKey: delegate: sensorsDelegate:"))); + +/** Init Handle with key + + You must provide a sensorsDelegate when registering to the location manager to listen for sensor activation requests. + Your application can embed a configuration file, if so, it must be located in a folder ** Assets.xcassets ** of your Xcode Project. + The NAOBeaconProximityManager will automatically copy this folder in the application and it will be loaded at the moment of register. + If you don't have a data embedded inside your application, you need to call **synchroniseData** to get the data from our server. + + @param key: The API Key is key available in the developer section of NAO Cloud. A key is associated to one and only one application. + By Default, one API key is created at the site creation, this API key is associated with the site. The services available through this API key are the services activated on this associated site. + + @param delegate: object implementing the NAOBeaconProximityHandleDelegate protocol + + @param sensorsDelegate: object implementing the NAOSensorsDelegate protocol + */ +- (id _Nonnull)initWithKey:(NSString * _Nonnull)key delegate:(id _Nonnull)delegate sensorsDelegate:(id _Nonnull)sensorsDelegate; + +- (id _Nonnull)initWithNaoContext:(NaoContext * _Nullable)naoContext key:(NSString * _Nonnull)key delegate:(id _Nonnull)delegate sensorsDelegate:(id _Nonnull)sensorsDelegate ; + +@end diff --git a/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOBeaconProximityHandleDelegate.h b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOBeaconProximityHandleDelegate.h new file mode 100755 index 0000000..dcc0f13 --- /dev/null +++ b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOBeaconProximityHandleDelegate.h @@ -0,0 +1,56 @@ +// +// NAOBeaconProximityHandleDelegate.h +// NaoSDK +// +// Created by Pole Star on 23/11/2015. +// Copyright © 2015 POLE STAR SA. All rights reserved. +// + +#import +#import "DBTBEACONSTATE.h" +#import "DBNAOERRORCODE.h" + + +/** Beacon Proximity Error Codes + + */ +typedef enum { + NAOBEACON_KEY, + NAOBEACON_INTERNET_CONNECTION +} NAOBEACON_MANAGER_ERROR ; + + +/** NAOBeaconProximityHandleDelegate receives event from NAOBeaconProximityHandle + + */ +@protocol NAOBeaconProximityHandleDelegate + +/** Beacon Proximity Error + + Notifies of an error. + + @param errCode: Indicates an error code among DBNAOERRORCODE. + @param message: Message containning additionnal information + */ +- (void) didFailWithErrorCode:(DBNAOERRORCODE)errCode andMessage:(NSString*)message; + +/** Beacon Ranging + + This method indicates that a new beacon is visible and is ranged. You can access the ranging parameters through the beacon object. + + @param beaconPublicID: Public ID of the beacon, it is the label of indicated on the beacon + @param rssi: Received Signal Strength Indicator of the beacon + */ +- (void) didRangeBeacon:(NSString*)beaconPublicID withRssi:(int)rssi; + +/** Proximity Change + + Indicates that the proximity from the beacon has changed (Near or Far). + + @param proximity: Indicates the proximity of the beacon (Near or Far) + @param beaconPublicID: Public ID of the beacon, it is the label of indicated on the beacon + */ +- (void) didProximityChange:(DBTBEACONSTATE)proximity forBeacon:(NSString*)beaconPublicID; + + +@end diff --git a/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOBeaconReportingHandle.h b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOBeaconReportingHandle.h new file mode 100755 index 0000000..f61d7ed --- /dev/null +++ b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOBeaconReportingHandle.h @@ -0,0 +1,49 @@ +// +// NAOBeaconReportingHandle.h +// NaoSDK +// +// Created by Pole Star on 15/02/2016. +// Copyright © 2016 POLE STAR SA. All rights reserved. +// + +#import + +#import "NAOBeaconReportingHandleDelegate.h" +#import "NAOSyncDelegate.h" +#import "NAOSensorsDelegate.h" +#import "NAOServiceHandle.h" + +@class NaoContext; + +/** NAO BeaconReporting Service + + The NAOBeaconReportingHandle inherits from NAOServiceHandle which itself inhgerits form NSObject. + You need to create an instance for NAOBeaconReportingHandle to get access to the beacon reporting service. + The NAOBeaconReportingHandle enables you to start the beacon reporting service. + */ +@interface NAOBeaconReportingHandle : NAOServiceHandle + +/** WARNING : init not available, please use initWithKey: delegate: sensorsDelegate: + + */ +-(instancetype _Nonnull) init __attribute__((unavailable("init not available, please use initWithKey: delegate: sensorsDelegate:"))); + +/** Init NAOBeaconReportingHandle with API key + + By default, for the beacon reporting service, the configuration file (alert.json) is located on Amazon S3. + However, you can host this file on your own private server if you want. + The data will be synchronised each time you call the method **synchroniseData** of your manager. + + @param key: The API Key is key available in the developer section of NAO Cloud. A key is associated to one and only one application. + By Default, one API key is created at the site creation, this API key is associated with the site. The services available through this API key are the services activated on this associated site. + + @param delegate: Object implementing the NAOBeaconReportingHandleDelegate protocol + + @param sensorsDelegate: Object implementing the NAOSensorsDelegate protocol + + */ +- (id _Nonnull)initWithKey:(NSString * _Nonnull)key delegate:(id _Nonnull)delegate sensorsDelegate:(id _Nonnull)sensorsDelegate; + +- (id _Nonnull)initWithNaoContext:(NaoContext * _Nullable)naoContext key:(NSString * _Nonnull)key delegate:(id _Nonnull)delegate sensorsDelegate:(id _Nonnull)sensorsDelegate ; + +@end diff --git a/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOBeaconReportingHandleDelegate.h b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOBeaconReportingHandleDelegate.h new file mode 100755 index 0000000..8837906 --- /dev/null +++ b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOBeaconReportingHandleDelegate.h @@ -0,0 +1,25 @@ +// +// NAOBeaconReportingHandleDelegate.h +// NaoSDK +// +// Created by Pole Star on 15/02/2016. +// Copyright © 2016 POLE STAR SA. All rights reserved. +// + +#import +#import "DBNAOERRORCODE.h" + +/** NAOBeaconReportingHandleDelegate receives NAOBeaconReportingHandle event + + */ +@protocol NAOBeaconReportingHandleDelegate + +/** NAO BeaconReporting Error + + @param errCode: Indicates an error code among DBNAOERRORCODE. + @param message: The message contains additionnal information. + */ +- (void) didFailWithErrorCode:(DBNAOERRORCODE)errCode andMessage:(NSString*)message; + + +@end diff --git a/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOGeofenceData.h b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOGeofenceData.h new file mode 100755 index 0000000..f003acc --- /dev/null +++ b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOGeofenceData.h @@ -0,0 +1,31 @@ +// +// NAOGeofenceData.h +// NaoSDK +// +// Created by Pole Star on 08/12/2016. +// Copyright © 2016 POLE STAR SA. All rights reserved. +// + +#import + +@class DBNAOGeofenceData; + +/** Region data + @since 4.2.2*/ +@interface NAOGeofenceData : NSObject + +/** regionId linked to the data */ +@property (readonly) int32_t regionId; + +/** siteId linked to the data */ +@property (readonly) int32_t siteId; + +/** name entered by client from NAO Cloud */ +@property (readonly) NSString * name; + +/** category entered by client from NAO Cloud */ +@property (readonly) NSString * category; + +-(instancetype)initWithDBNAOGeofenceData:(DBNAOGeofenceData *)dbNAOGeofenceData; + +@end diff --git a/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOGeofenceHandleDelegate.h b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOGeofenceHandleDelegate.h new file mode 100755 index 0000000..6591108 --- /dev/null +++ b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOGeofenceHandleDelegate.h @@ -0,0 +1,34 @@ +// +// NAOGeofenceHandleDelegate.h +// NaoSDK +// +// Created by Pole Star on 22/11/2015. +// Copyright © 2015 POLE STAR SA. All rights reserved. +// + +#import +#import "NAOGeofencingHandleDelegate.h" + +/** NAOGeofenceHandleDelegate. + + */ +@protocol NAOGeofenceHandleDelegate + + +/** Receives notification when entering a geofence. + + @param regionId: id of the region affected by the change + @param regionName: name of the region affected by the change + @since 4.1.2 + */ +- (void) didEnterGeofence:(int)regionId andName:(NSString*)regionName; + +/** Receives notification when leaving a geofence. + + @param regionId: id of the region affected by the change + @param regionName: name of the region affected by the change + @since 4.1.2 + */ +- (void) didExitGeofence:(int)regionId andName:(NSString*)regionName; + +@end diff --git a/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOGeofencingHandle.h b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOGeofencingHandle.h new file mode 100755 index 0000000..39946e1 --- /dev/null +++ b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOGeofencingHandle.h @@ -0,0 +1,59 @@ +// +// NAOGeofencingHandle.h +// NaoSDK +// +// Created by Pole Star on 22/11/2015. +// Copyright © 2015 POLE STAR SA. All rights reserved. +// + +#import + +#import "NAOGeofencingHandleDelegate.h" +#import "NAOSyncDelegate.h" +#import "NAOSensorsDelegate.h" +#import "NAOServiceHandle.h" +#import "NAOGeofenceData.h" + +@class NaoContext; + +/** NAO Geofencing Service + + The NAOGeofencingHandle inherits from NAOServiceHandle which itself inhgerits form NSObject. + You need to create an instance for NAOGeofencingHandle to get access to the geofencing service. + The NAOGeofencingHandle enables you to start the geofencing service. + */ +@interface NAOGeofencingHandle : NAOServiceHandle + +/** WARNING : init not available, please use initWithKey: delegate: sensorsDelegate: + + */ +-(instancetype _Nonnull) init __attribute__((unavailable("init not available, please use initWithKey: delegate: sensorsDelegate:"))); + +/** Init the handle with a key + + You must provide a sensorsDelegate when registering to the location manager to listen for sensor activation requests. + Your application can embed a configuration file, if so, it must be located in a folder ** Assets.xcassets ** of your Xcode Project. + The NAOGeofencingManager will automatically copy this folder in the application and it will be loaded at the moment of register. + If you don't have a data embedded inside your application, you need to call **synchroniseData** to get the data from our server. + + @param key: The API Key is key available in the developer section of NAO Cloud. A key is associated to one and only one application. + By Default, one API key is created at the site creation, this API key is associated with the site. The services available through this API key are the services activated on this associated site. + + @param delegate: Object implementing the NAOGeofencingHandleDelegate protocol + + @param sensorsDelegate: Object implementing the NAOSensorsDelegate protocol + */ +- (id _Nonnull)initWithKey:(NSString * _Nonnull)key delegate:(id _Nonnull)delegate sensorsDelegate:(id _Nonnull)sensorsDelegate; + +/** + + + @param geofenceId: Id of geofence wanted + @return: Return the NAOGeofenceData wanted + @since 4.2.2 + */ +-(NAOGeofenceData *)getGeofenceData:(int)geofenceId; + +- (id _Nonnull)initWithNaoContext:(NaoContext * _Nullable)naoContext key:(NSString * _Nonnull)key delegate:(id _Nonnull)delegate sensorsDelegate:(id _Nonnull)sensorsDelegate ; + +@end diff --git a/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOGeofencingHandleDelegate.h b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOGeofencingHandleDelegate.h new file mode 100755 index 0000000..1711b01 --- /dev/null +++ b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOGeofencingHandleDelegate.h @@ -0,0 +1,35 @@ +// +// NAOGeofencingHandleDelegate.h +// NaoSDK +// +// Created by Pole Star on 22/11/2015. +// Copyright © 2015 POLE STAR SA. All rights reserved. +// + +#import +#import "NaoAlert.h" +#import "DBNAOERRORCODE.h" + +/** NAOGeofencingHandleDelegate is a protocol that is implemented by one of your objects to received the geofences events from the NAOGeofencingHandle. + + */ +@protocol NAOGeofencingHandleDelegate + + +/** This method notifies of an error + + @param errCode: Indicates an error code among DBNAOERRORCODE. + @param message: Message providing additionnal information on the error. + */ +- (void) didFailWithErrorCode:(DBNAOERRORCODE)errCode andMessage:(NSString*)message; + +/** This method notifies of a new NAO Alert + + An alert is event which is sent to the application based on the exit or the entrance of a geofence. You can configure the alerts in the NAO Cloud page dedicated to geonotifications. + Alerts are an easy way to contextualize the digital content of your application. If no alert is configured on a given geofence, nothing will be send to the application, it is as if the geofence were inactive. + + @param alert: Object containing configuration information provided on NAO Cloud. + */ +- (void) didFireNAOAlert:(NaoAlert*) alert; + +@end diff --git a/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOLocationHandle.h b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOLocationHandle.h new file mode 100755 index 0000000..763350c --- /dev/null +++ b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOLocationHandle.h @@ -0,0 +1,58 @@ +// +// NAOLocationHandle.h +// NaoSDK +// +// Created by Pole Star on 22/11/2015. +// Copyright © 2015 POLE STAR SA. All rights reserved. +// + +#import + +#import "NAOLocationHandleDelegate.h" +#import "NAOSyncDelegate.h" +#import "NAOSensorsDelegate.h" +#import "NAOServiceHandle.h" + +#import "DBTPOWERMODE.h" + +@class NaoContext; + +/** Nao Location Service + + The NAOLocationHandle inherits from NAOServiceHandle which itself inhgerits form NSObject. + You need to create an instance for NAOLocationHandle to get access to the location service. + The NAOLocationHandle enables you to start the location service. + */ +@interface NAOLocationHandle : NAOServiceHandle + +/** WARNING : init not available, please use initWithKey: delegate: sensorsDelegate: + + */ +-(instancetype _Nonnull) init __attribute__((unavailable("init not available, please use initWithKey: delegate: sensorsDelegate:"))); + +/** Init the Handle with a key + + The **client** must implement the NAOLocationhandleDelegate to receive location events. Several clients can be listening the location events triggered by NAOLocationhandle. The first register will start the location service. This methods will return an error if the API key of the NAOLocationhandle is not set or not valid. You must provide a sensorsDelegate when registering to the location handle to listen for sensor activation requests. Your application can embed a database, if so, it must be located in a folder ** Assets.xcassets **. The NAOLocationhandle will automatically copy this folder in the application and it will be loaded at the moment of register. If you don't have a database embedded inside your application, you need to call **synchroniseData** to get the PDB from our server. + + @param key: The API Key is key available in the developer section of NAO Cloud. A key is associated to one and only one application. + By Default, one API key is created at the site creation, this API key is associated with the site. The services available through this API key are the services activated on this associated site. + + @param delegate: Object implementing the NAOLocationHandleDelegate + + @param sensorsDelegate: Object implementing the NAOSensorsDelegate + */ +- (id _Nonnull)initWithKey:(NSString * _Nonnull)key delegate:(id _Nonnull)delegate sensorsDelegate:(id _Nonnull)sensorsDelegate; + + +//For Polestar use only +- (id _Nonnull)initWithNaoContext:(NaoContext * _Nullable)naoContext key:(NSString * _Nonnull)key delegate:(id _Nonnull)delegate sensorsDelegate:(id _Nonnull)sensorsDelegate ; + + +/** Database Version + + @return Database version: Version of the Database used. + */ +- (NSString * _Nullable)getDatabaseVersions; + + +@end diff --git a/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOLocationHandleDelegate.h b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOLocationHandleDelegate.h new file mode 100755 index 0000000..038e0cc --- /dev/null +++ b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOLocationHandleDelegate.h @@ -0,0 +1,80 @@ +// +// NAOLocationDelegate.h +// NaoSDK +// +// Created by Pole Star on 22/11/2015. +// Copyright © 2015 POLE STAR SA. All rights reserved. +// + +#import +#import +#import "DBNAOERRORCODE.h" +#import "DBTNAOFIXSTATUS.h" + +/** The NAOLocationhandleDelegate is a protocol that is implemented by one of your objects to received the location events from the NAOLocationHandle. + */ + +@protocol NAOLocationHandleDelegate + + + +/** Location Error + + @param errCode: Indicates an error code among DBNAOERRORCODE. + @param message: Provinding additionnal information on the message + */ +- (void) didFailWithErrorCode:(DBNAOERRORCODE)errCode andMessage:(NSString*)message; + +/** Location Change + Returns the **location** of the user. The location coordinates are in WGS84 format. + Locations are sent approximately every second when the status of the NAOLocationhandle is **AVAILABLE**. + + @param location: Location of the user provided as a CLLocation object. + Course value (ie compass bearing) is set to -1000 at the start of the service and it may take up to 6 locations to get a valid value. + Value will stay at -1000 if compass is disabled. + If compass calibration is needed, NAOSensorDelegate.requiresCompassCalibration is triggered. + When the compass is calibrated again, NAOSensorDelegate.didCompassCalibrated is triggered. + + */ +- (void) didLocationChange:(CLLocation *) location; + + +/** Location Status + Indicates the status of the NAO Location service + + @param status: location status, one of DBTNAOFIXSTATUS. + */ +- (void) didLocationStatusChanged:(DBTNAOFIXSTATUS) status; + + +/** Enter Site (Optional) + + Site is determined by the positioning area which is actually where the positioning graph is drawn. + Triggered when e.g. receiving the first signal from a beacon/access point in the covered area. + + IMPORTANT: This is not based on accurate geofencing and should not to be relied on when time/precision is required. + Use NAO Geofencing service instead for such use cases or request advice from Pole Star team. + + @param name: name of the site defined on NAO Cloud + */ +@optional +- (void) didEnterSite:(NSString *)name; + +/** Exit Site (Optional) + + Site is determined by the positioning area which is actually where the positioning graph is drawn. + Triggered after no beacon/access point in the covered area has been seen for some time. + + Can come after a significant delay due to app foreground/background status etc. + + IMPORTANT: This is not based on accurate geofencing and should not to be relied on when time/precision is required. + Use NAO Geofencing service instead for such use cases or request advice from Pole Star team. + + @param name: name of the site defined on NAO Cloud + + */ +@optional +- (void) didExitSite:(NSString *)name; + + +@end diff --git a/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOSDK.h b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOSDK.h new file mode 100755 index 0000000..3327ece --- /dev/null +++ b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOSDK.h @@ -0,0 +1,40 @@ +// +// NAOSDK.h +// NaoSDK +// +// Created by Pole Star on 26/05/2016. +// Copyright © 2016 POLE STAR SA. All rights reserved. +// + +#ifndef NAOSDK_h +#define NAOSDK_h + + +#import "DBNAOERRORCODE.h" +#import "DBTBEACONSTATE.h" +#import "DBTNAOFIXSTATUS.h" +#import "DBTPOWERMODE.h" +#import "DBNAOAlertRule.h" +#import "DBTALERTRULE.h" + +#import "NaoAlert.h" +#import "NAOAnalyticsHandle.h" +#import "NAOAnalyticsHandleDelegate.h" +#import "NAOBeaconProximityHandle.h" +#import "NAOBeaconProximityHandleDelegate.h" +#import "NAOBeaconReportingHandle.h" +#import "NAOBeaconReportingHandleDelegate.h" +#import "NaoContext.h" +#import "NAOGeofencingHandle.h" +#import "NAOGeofencingHandleDelegate.h" +#import "NAOGeofenceHandleDelegate.h" +#import "NAOLocationHandle.h" +#import "NAOLocationHandleDelegate.h" +#import "NAOSensorsDelegate.h" +#import "NAOServiceHandle.h" +#import "NAOServicesConfig.h" +#import "NAOSyncDelegate.h" +#import "NAOGeofenceData.h" + + +#endif /* NAOSDK_h */ diff --git a/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOSensorsDelegate.h b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOSensorsDelegate.h new file mode 100755 index 0000000..cf12696 --- /dev/null +++ b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOSensorsDelegate.h @@ -0,0 +1,46 @@ +// +// NAOSensorsDelegate.h +// NaoSDK +// +// Created by Pole Star on 21/01/2016. +// Copyright © 2016 POLE STAR SA. All rights reserved. +#import + +/** Each service handle must set a NAOSensorsDelegate which has the following methods to request sensor activation. + + */ +@protocol NAOSensorsDelegate + +/** Wifi Activation Request + + Notifies that the Wifi is off and required by the service. You should usually display a pop-up to the user asking to switch on its Wifi. + */ +- (void) requiresWifiOn; + +/** BLE Activation Request + + Notifies that the BLE (Bluetooth 4.0) is off and required by the service. You should usually display a pop-up to the user asking to switch on its BLE. + */ +- (void) requiresBLEOn; + +/** Location Activation Request + + Notifies that the Location services are off and required by the service. You should usually display a pop-up to the user asking to switch on its Location services. + */ +- (void) requiresLocationOn; + +/** Compass Calibration Request + + Notifies that the compass need to be calibrated. + */ +- (void) requiresCompassCalibration; + + +/** Compass Calibrated (Optional) + + Notifies that the compass is now calibrated + */ +@optional +- (void) didCompassCalibrated; + +@end diff --git a/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOServiceHandle.h b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOServiceHandle.h new file mode 100755 index 0000000..396cc02 --- /dev/null +++ b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOServiceHandle.h @@ -0,0 +1,97 @@ +// +// NAOServiceHandle.h +// NaoSDK +// +// Created by Pole Star on 03/02/2016. +// Copyright © 2016 POLE STAR SA. All rights reserved. +// + +#import +#import "NAOSyncDelegate.h" +#import "DBTPOWERMODE.h" + +@protocol INaoServiceProvider; + +/** NAO Service Handle + + Mother Handle Object of NAO Service Handles + */ +@interface NAOServiceHandle : NSObject + +@property (nonatomic, retain) id provider; + +/** Data Synchronisation + + You must provide a sensorsDelegate when registering to the service handle to listen for sensor activation requests. + The NAOServiceHandle will automatically copy this folder in the application and it will be loaded at the moment of register. + If you don't have a data embedded inside your application, you need to call ** synchroniseData ** to get the data from our server. + + @param delegate: Object implementing the NAOSyncDelegate protocol + */ +- (void)synchronizeData:(id)delegate; + +/** Start Service + The service will start if not already running. + + */ +- (BOOL)start; + +/** Stop Service + If they are no more listeners, service will shut down. + + */ +- (void)stop; + +/** API Key + + @return apiKey: The API Key is key available in the developer section of NAO Cloud. A key is associated to one and only one application. + By Default, one API key is created at the site creation, this API key is associated with the site. The services available through this API key are the services activated on this associated site. + */ +- (NSString *)getApiKey; + +/** Power Mode + The power mode is used to control the trade-off between battery consumption and accuracy. + + @param power: The following modes are possible: +
+
+ + * DBTPOWERMODE_HIGH +
+ * DBTPOWERMODE_LOW +
+ + We advise to use the high accuracy only when the service is displayed to the user. + Otherwise, if your application is in background or if the position is not displayed we advise to use the **LOW_ENERGY** mode. + In terms of accuracy, the position in **LOW_ENERGY** mode is not as smooth as the **HIGH_ACCURACY** mode but is more than enough for most of your use the cases in background. + + */ +- (void)setPowerMode:(DBTPOWERMODE)power; + +/** + @return power mode of the service handle + */ +- (DBTPOWERMODE)getPowerMode; + + +/** Sets maximum number of calibration requests. + In some venues, magnetic interferences can cause frequent device compass decalibration. + This method provides a way to reduce notification spam to the user. + + @param max: Maximum number of calibration requests to be issued. Default is -1, which is infinity. Set it to 0 to always ignore the notification. + */ +- (void)setCompassCalibrationScreenShowedMaxNumber:(int)max; + +/** Sets minimum interval between calibration requests. + Provides a way to control how often the end user will be prompted about compass calibration. + + @param nSec: Minimum time interval between two calibration requests, in seconds. Default is 1800 seconds (30 minutes). + */ +- (void)setTimeMinBetweenCompassCalibrationScreen:(int)nSec; + +/** Resets the number of times the calibration has been displayed. + + */ +- (void)resetCompassCalibrationScreenShowed; + +@end diff --git a/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOServicesConfig.h b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOServicesConfig.h new file mode 100755 index 0000000..f582554 --- /dev/null +++ b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOServicesConfig.h @@ -0,0 +1,77 @@ +// +// NAOServicesConfig.h +// NaoSDK +// +// Created by Pole Star on 02/02/2016. +// Copyright © 2016 POLE STAR SA. All rights reserved. +// + +#import +#import "DBTPOWERMODE.h" +#import "NAOSyncDelegate.h" + +@class NaoContext; + +/** Configuration of NAO Services + + This class holds a configuration for all the NAO services used inside your application. + + */ +@interface NAOServicesConfig : NSObject + +/** Set the Root URL + + @param rootURL Url where are hosted the configuration required for the NAO services (PDB and app.json) + */ ++ (void) setRootURL:(NSString*)rootURL; + +/** Get the the Root URL + + @return Returns the root url used by the services + */ ++ (NSString*) getRootURL; + +/** Get SDK software version + + @return Returns the software version of the SDK used + */ ++ (NSString*) getSoftwareVersion; + +/** + + */ ++ (void)synchronizeData:(id)delegate apiKey:(NSString *)apiKey; + +/** + + */ ++ (void)startLoggingMeasurements; + +/** + + */ ++ (void)stopLoggingMeasurements; + +/** + + */ ++ (DBTPOWERMODE) getPowerMode; + +/** + + */ ++ (void)uploadNAOLogInfo; + +/** Sets the Wake Up Notifier to receive notifications when the device arrives on site. + It is based on Ibeacons. + */ ++ (void)enableOnSiteWakeUp; + +/** Disable the Wake Up Notifier to not receive notifications when the device arrives on site. + It is based on Ibeacons. + */ ++ (void)disableOnSiteWakeUp; + ++ (NaoContext *)getNaoContext; + +@end diff --git a/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOSyncDelegate.h b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOSyncDelegate.h new file mode 100755 index 0000000..e2bed4d --- /dev/null +++ b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NAOSyncDelegate.h @@ -0,0 +1,30 @@ +// +// NAOSynchronizableDelegate.h +// NaoSDK +// +// Created by Pole Star on 18/12/2015. +// Copyright © 2015 POLE STAR SA. All rights reserved. +// + +#import +#import "DBNAOERRORCODE.h" + +/** Synchronisation Delegate + + The syncDelegate will be notified of the result of the synchronisation by the following methods. + */ +@protocol NAOSyncDelegate + +/** Synchronisation Success + + */ +- (void) didSynchronizationSuccess; + +/** Synchronisation Failure + + @param errorCode : Error code + @param message: Message detailling why the synchronisation has failed. + */ +- (void) didSynchronizationFailure:(DBNAOERRORCODE)errorCode msg:(NSString*) message; + +@end diff --git a/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NaoAlert.h b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NaoAlert.h new file mode 100755 index 0000000..3a3a9df --- /dev/null +++ b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NaoAlert.h @@ -0,0 +1,35 @@ +// +// NAOAlert.h +// NAOMicroService +// +// Created by J.CHOUKI on 06/03/2014. +// Copyright (c) 2014 Pole Star. All rights reserved. +// + +#import +#import "DBNAOAlertRule.h" + +@class DBNaoAlert; + + +/** NaoAlert + Object returned on trigger by GeofencingHandleDelegate + */ +@interface NaoAlert : NSObject + +/** Alert unique identifier */ +@property (readonly) int identifier; + +/** Alert name : name of the alert set in nao-cloud */ +@property (readonly) NSString *name; + +/** Alert content : Additional data (optional text value from nao-cloud) */ +@property (readonly) NSString *content; + +/** Alert rules : All rules fulfilled to trigger the alert */ +@property (readonly) NSArray *rules; + + +- (id)initWithDBNaoAlert:(DBNaoAlert *)dbNaoAlert; + +@end \ No newline at end of file diff --git a/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NaoContext.h b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NaoContext.h new file mode 100755 index 0000000..aa59ed9 --- /dev/null +++ b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/NaoContext.h @@ -0,0 +1,47 @@ +// +// NaoContext.h +// NaoSDK +// +// Created by Pole Star on 02/02/2016. +// Copyright © 2016 POLE STAR SA. All rights reserved. +// + +#import +#import "DBTPOWERMODE.h" +#import "NAOSyncDelegate.h" + + + +@class PSTINAOServiceManager; +@class NAOSensorsManager; +@class NaoSynchroBroker; +@class ServiceHttpHelper; +@class ServicePrefHelper; +@class ServiceConnectivityHelper; +@class GeofencingOSManager; + +/** For Polestar internal use */ +@interface NaoContext : NSObject + +@property (strong) PSTINAOServiceManager *serviceManager; +@property (strong) NAOSensorsManager *sensorsManager; +@property (strong) NaoSynchroBroker *synchroBroker; +@property (strong) ServiceHttpHelper *httpHelper; +@property (strong) ServicePrefHelper *prefHelper; +@property (strong) ServiceConnectivityHelper *connectivityHelper; +@property (strong) GeofencingOSManager *geofencingOSManager; +@property (strong, nonatomic) NSString *mRootURL; + +- (id)init; + +- (NSString *)getRootURL; +- (NSString *)getSoftwareVersion; +- (void)setRootURL:(NSString *)rootURL; +- (DBTPOWERMODE)getPowerMode; +- (void)synchronizeData:(id)delegate apiKey:(NSString *)apiKey; +- (void)writeToLog:(NSString *)txt; +- (void)uploadNAOLogInfo; + +- (NSArray *)regionsOfAllActiveAlerts:(NSString *)apiKey; + +@end diff --git a/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/libNAOSDK.a b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/libNAOSDK.a new file mode 100755 index 0000000..307a760 Binary files /dev/null and b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/libNAOSDK.a differ diff --git a/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/nao.kml b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/nao.kml new file mode 100644 index 0000000..9a5cc5a --- /dev/null +++ b/polestar-indoor-location-provider-ios/IndoorLocationProvider/NAOSdk/nao.kml @@ -0,0 +1,15 @@ + + + + nao.kml + + User Positions + + + -0.5561381453180401,44.82581797384842,-5 -0.5561266191592832,44.82586016370076,-5 -0.556160832180113,44.82586675361721,-5 -0.5561266191592832,44.82586016370076,-5 -0.5560971259360279,44.82585448288413,-5 -0.5561266191592832,44.82586016370076,-5 -0.5561022127066703,44.82604256277407,-5 -0.556160832180113,44.82586675361721,-5 -0.556046068001405,44.82605689820769,-5 -0.5561022127066703,44.82604256277407,-5 -0.5560662800953005,44.82600274210636,-5 -0.556046068001405,44.82605689820769,-5 -0.5558452152856778,44.82658199468428,-5 -0.5558798796738198,44.82648855237282,-5 -0.5558452152856778,44.82658199468428,-5 -0.5558125060275014,44.8266733184815,-5 -0.555821275401141,44.826577555674056,-5 -0.5558452152856778,44.82658199468428,-5 -0.556041182982733,44.82661833163083,-5 -0.5558452152856778,44.82658199468428,-5 -0.5553498395399695,44.826377753068975,-5 -0.555381314691064,44.8263292707694,-5 -0.5549501233546266,44.82623848005849,-5 -0.5549355365308852,44.826335957538454,-5 -0.5559468004055914,44.8258255280282,-5 -0.5559854317197185,44.825744703513124,-5 -0.5559203038616107,44.82591195088122,-5 -0.5559468004055914,44.8258255280282,-5 -0.5557586155198869,44.82578928089626,-5 -0.5559468004055914,44.8258255280282,-5 -0.5560971259360279,44.82585448288413,-5 -0.5559468004055914,44.8258255280282,-5 -0.5557586155198869,44.82578928089626,-5 -0.5557294118637088,44.825888058429776,-5 -0.5557900481453953,44.825722403827356,-5 -0.5557586155198869,44.82578928089626,-5 -0.5555838955877734,44.82575562728881,-5 -0.5557586155198869,44.82578928089626,-5 -0.5555838955877734,44.82575562728881,-5 -0.5556193682413888,44.82567302592111,-5 -0.5555609777479129,44.82585779464372,-5 -0.5555838955877734,44.82575562728881,-5 -0.5554448363817723,44.82576021465081,-5 -0.5554262304552763,44.82584027349717,-5 -0.5554913583133839,44.82567780443003,-5 -0.5554448363817723,44.82576021465081,-5 -0.5553082948066492,44.825729788985996,-5 -0.5553363989268518,44.82564754053359,-5 -0.5552780084333759,44.82581319535111,-5 -0.5553082948066492,44.825729788985996,-5 -0.5551520691116733,44.82569497707378,-5 -0.5553082948066492,44.825729788985996,-5 -0.5554448363817723,44.82576021465081,-5 -0.5553082948066492,44.825729788985996,-5 -0.5551520691116733,44.82569497707378,-5 -0.555127540623265,44.82577656019206,-5 -0.5551814395403196,44.82563001932312,-5 -0.5551520691116733,44.82569497707378,-5 -0.5561958622546751,44.825162053271406,-5 -0.5562549263049918,44.82503270214478,-5 -0.5561718321411993,44.82523340140711,-5 -0.5561958622546751,44.825162053271406,-5 -0.5560224791438702,44.82513150214134,-5 -0.5561958622546751,44.825162053271406,-5 -0.5563471042532766,44.82518870299321,-5 -0.5561958622546751,44.825162053271406,-5 -0.5560224791438702,44.82513150214134,-5 -0.5559786943550866,44.825241365649134,-5 -0.5560617885188792,44.82503270214478,-5 -0.5560224791438702,44.82513150214134,-5 -0.5558722335602502,44.825105027967425,-5 -0.5560224791438702,44.82513150214134,-5 -0.5558541737489988,44.82509683011951,-5 -0.5559045833441365,44.82493075939472,-5 -0.5557599441497196,44.82505405667888,-5 -0.5558541737489988,44.82509683011951,-5 -0.5558722335602502,44.825105027967425,-5 -0.5558541737489988,44.82509683011951,-5 -0.5557207641538009,44.82504619667738,-5 -0.5557069539816026,44.82510756623703,-5 -0.5557361492283406,44.82499925219975,-5 -0.5557207641538009,44.82504619667738,-5 -0.5555696792063848,44.82501588712076,-5 -0.5557207641538009,44.82504619667738,-5 -0.5557599441497196,44.82505405667888,-5 -0.5557207641538009,44.82504619667738,-5 -0.5555696792063848,44.82501588712076,-5 -0.5555430114422281,44.8250741163355,-5 -0.5556103850885464,44.82494190939176,-5 -0.5555696792063848,44.82501588712076,-5 -0.5554227531172438,44.82498641186856,-5 -0.5555696792063848,44.82501588712076,-5 -0.5554227531172438,44.82498641186856,-5 -0.5554037725731701,44.82503588785278,-5 -0.5554419509727505,44.82493553796513,-5 -0.5554227531172438,44.82498641186856,-5 -0.5552475485257644,44.8249512635675,-5 -0.5554227531172438,44.82498641186856,-5 -0.5562357281604663,44.82647800035592,-5 -0.5562141985064607,44.82653576028839,-5 -0.5564387324119642,44.82560838551788,-5 -0.5567298102452134,44.82566389333192,-5 -0.5563082072011546,44.825597872785096,-5 -0.5562002974368777,44.825571813148755,-5 -0.5552475485257644,44.8249512635675,-5 -0.5550996824157999,44.82487884253075,-5 -0.5549944569439507,44.82486647228099,-5 -0.5550996824157999,44.82487884253075,-5 -0.5549469688174783,44.82484220677793,-5 -0.5549626893349525,44.82462557750271,-5 -0.5549944569439507,44.82486647228099,-5 -0.5549469688174783,44.82484220677793,-5 -0.5550143424637967,44.82475619231022,-5 -0.5549944569439507,44.82486647228099,-5 -0.5563483406608998,44.825183077665656,-5 -0.5563471042532766,44.82518870299321,-5 -0.5564508830975229,44.82520635477819,-5 -0.5563471042532766,44.82518870299321,-5 -0.5562002974368777,44.825571813148755,-5 -0.5563471042532766,44.82518870299321,-5 -0.5564020811486544,44.82560653782561,-5 -0.5563697417984397,44.82568681681524,-5 -0.5563697417984397,44.82568681681524,-5 -0.5563115309680116,44.8256810826054,-5 -0.5555838955877734,44.82575562728881,-5 -0.5554448363817723,44.82576021465081,-5 -0.5564624479354413,44.82555371928647,-5 -0.5564387324119642,44.82560838551788,-5 -0.5564387324119642,44.82560838551788,-5 -0.5564020811486544,44.82560653782561,-5 -0.5563697417984397,44.82568681681524,-5 -0.556409088007575,44.82568617968083,-5 -0.5553182188419641,44.82647765445808,-5 -0.5552937846662506,44.82644095600874,-5 -0.5552937846662506,44.82644095600874,-5 -0.5552995338840337,44.82642158737327,-5 -0.5562294698663197,44.82617794977129,-5 -0.556409088007575,44.82568617968083,-5 -0.5560971259360279,44.82585448288413,-5 -0.5562002974368777,44.825571813148755,-5 -0.555821275401141,44.826577555674056,-5 -0.5556699212710468,44.8265474985121,-5 -0.5556699212710468,44.8265474985121,-5 -0.5556099916462957,44.82669478647198,-5 -0.5553182188419641,44.82647765445808,-5 -0.5554912178388398,44.82651201007807,-5 -0.5556699212710468,44.8265474985121,-5 -0.5554912178388398,44.82651201007807,-5 -0.5554912178388398,44.82651201007807,-5 -0.5554217047627091,44.826693767074794,-5 -0.5553182188419641,44.82647765445808,-5 -0.5552765370127751,44.826564303481874,-5 -0.5552995338840337,44.82642158737327,-5 -0.5551977727286431,44.826397529480154,-5 -0.5551977727286431,44.826397529480154,-5 -0.5552046717900355,44.82635430679948,-5 -0.5552046717900355,44.82635430679948,-5 -0.5552506655325978,44.82631455005988,-5 -0.5551977727286431,44.826397529480154,-5 -0.5550718648584202,44.82636776292054,-5 -0.5550718648584202,44.82636776292054,-5 -0.5551083723915735,44.82626867686477,-5 -0.5556699212710468,44.8265474985121,-5 -0.5556890433913182,44.82648479026497,-5 -0.5554912178388398,44.82651201007807,-5 -0.5555165668567162,44.82645115002478,-5 -0.5552995338840337,44.82642158737327,-5 -0.5553498395399695,44.826377753068975,-5 -0.556041182982733,44.82661833163083,-5 -0.556025081652809,44.82666538623865,-5 -0.5562610905643162,44.82639304410915,-5 -0.5561342484461631,44.82637087209955,-5 -0.5562294698663197,44.82617794977129,-5 -0.5561342484461631,44.82637087209955,-5 -0.5562610905643162,44.82639304410915,-5 -0.5562357281604663,44.82647800035592,-5 -0.5561342484461631,44.82637087209955,-5 -0.5561063930454461,44.82645676489558,-5 -0.5562357281604663,44.82647800035592,-5 -0.5561567483422043,44.826465032704554,-5 -0.5561063930454461,44.82645676489558,-5 -0.5561567483422043,44.826465032704554,-5 -0.556041182982733,44.82661833163083,-5 -0.5561567483422043,44.826465032704554,-5 -0.5564020811486544,44.82560653782561,-5 -0.5563082072011546,44.825597872785096,-5 -0.5550718648584202,44.82636776292054,-5 -0.5549355365308852,44.826335957538454,-5 -0.5558541737489988,44.82509683011951,-5 -0.5558012770864483,44.825209508674426,-5 -0.556510867129271,44.825492745351866,0 -0.5565126273978357,44.82547880964766,0 -0.5565572410403797,44.825483796440366,0 -0.5565126273978357,44.82547880964766,0 -0.5564549232529338,44.825472359633274,0 -0.5565126273978357,44.82547880964766,0 -0.5563770833063324,44.82545235830459,0 -0.5564549232529338,44.825472359633274,0 -0.5563488895732849,44.825525609920774,0 -0.5563770833063324,44.82545235830459,0 -0.5563827160253274,44.825437723630856,0 -0.5563770833063324,44.82545235830459,0 -0.5565572410403797,44.825483796440366,0 -0.5563940083409784,44.825408384439875,0 -0.5565743090307984,44.82543779515667,0 -0.5565572410403797,44.825483796440366,0 -0.5563940083409784,44.825408384439875,0 -0.5565743090307984,44.82543779515667,0 -0.5552431408939013,44.82436520671076,0 -0.555359921880853,44.82439069266523,0 -0.555169029882951,44.82449900784591,0 -0.5552431408939013,44.82436520671076,0 -0.5551064197804317,44.824514076823114,0 -0.555169029882951,44.82449900784591,0 -0.5561148461107417,44.82578911533259,0 -0.5561512355227418,44.82579523210469,0 -0.556245205096733,44.82581102764323,0 -0.5561512355227418,44.82579523210469,0 -0.5560588169093051,44.82607945649194,0 -0.5560730174599323,44.8260186703768,0 -0.5560120339029327,44.82607023119474,0 -0.5560588169093051,44.82607945649194,0 -0.5561433601689524,44.82609612785577,0 -0.5560588169093051,44.82607945649194,0 -0.5558693912436269,44.826453977414864,0 -0.5558146045412571,44.82660077114197,0 -0.5557874317747672,44.826673576839276,0 -0.5558146045412571,44.82660077114197,0 -0.5558930661677984,44.82639054346933,0 -0.5558693912436269,44.826453977414864,0 -0.5557572854516163,44.82675434966583,0 -0.5557874317747672,44.826673576839276,0 -0.5555798428443173,44.82682003782924,0 -0.5556043599192617,44.82675109173642,0 -0.555631521311822,44.82667470928635,0 -0.5556043599192617,44.82675109173642,0 -0.5559017926209535,44.82593733567752,0 -0.5557099330946076,44.826460781596765,0 -0.555631521311822,44.82667470928635,0 -0.5557099330946076,44.826460781596765,0 -0.5554519310812965,44.82669261257484,0 -0.5555486061809201,44.82642385293951,0 -0.5557408805094313,44.825889320896835,0 -0.5555486061809201,44.82642385293951,0 -0.5553824128 + + + + + + diff --git a/polestar-indoor-location-provider-ios/Info.plist b/polestar-indoor-location-provider-ios/Info.plist new file mode 100644 index 0000000..1727089 --- /dev/null +++ b/polestar-indoor-location-provider-ios/Info.plist @@ -0,0 +1,53 @@ + + + + + NSLocationWhenInUseUsageDescription + We need your authorization to display your location on the map + MGLMapboxMetricsEnabledSettingShownInApp + YES + MWZMapwizeApiKey + YOUR_API_KEY + MGLMapboxAccessToken + pk.mapwize + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/polestar-indoor-location-provider-ios/ViewController.h b/polestar-indoor-location-provider-ios/ViewController.h new file mode 100644 index 0000000..bb386dc --- /dev/null +++ b/polestar-indoor-location-provider-ios/ViewController.h @@ -0,0 +1,12 @@ +#import +#import +#import +#import "ILPolestarIndoorLocationProvider.h" + +@interface ViewController : UIViewController + +@property (weak, nonatomic) IBOutlet MGLMapView *mglMapView; +@property (nonatomic, strong) MapwizePlugin* mapwizePlugin; + +@end + diff --git a/polestar-indoor-location-provider-ios/ViewController.m b/polestar-indoor-location-provider-ios/ViewController.m new file mode 100644 index 0000000..91d4387 --- /dev/null +++ b/polestar-indoor-location-provider-ios/ViewController.m @@ -0,0 +1,88 @@ +#import "ViewController.h" +#import + +@interface ViewController () + +@property (nonatomic, retain) MWZMapwizeView* mapwizeView; + +@end + +@implementation ViewController { + ILPolestarIndoorLocationProvider* provider; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + [self initMapwize]; +} + +- (void) initMapwize { + MWZUIOptions* opts = [[MWZUIOptions alloc] init]; + MWZMapwizeViewUISettings* settings = [[MWZMapwizeViewUISettings alloc] init]; + + self.mapwizeView = [[MWZMapwizeView alloc] initWithFrame:self.view.frame + mapwizeOptions:opts + uiSettings:settings]; + self.mapwizeView.delegate = self; + self.mapwizeView.translatesAutoresizingMaskIntoConstraints = NO; + [self.view addSubview:self.mapwizeView]; + [[NSLayoutConstraint constraintWithItem:self.mapwizeView + attribute:NSLayoutAttributeLeft + relatedBy:NSLayoutRelationEqual + toItem:self.view + attribute:NSLayoutAttributeLeft + multiplier:1.0f + constant:0.0f] setActive:YES]; + [[NSLayoutConstraint constraintWithItem:self.mapwizeView + attribute:NSLayoutAttributeTop + relatedBy:NSLayoutRelationEqual + toItem:self.view + attribute:NSLayoutAttributeTop + multiplier:1.0f + constant:0.0f] setActive:YES]; + [[NSLayoutConstraint constraintWithItem:self.mapwizeView + attribute:NSLayoutAttributeBottom + relatedBy:NSLayoutRelationEqual + toItem:self.view + attribute:NSLayoutAttributeBottom + multiplier:1.0f + constant:0.0f] setActive:YES]; + [[NSLayoutConstraint constraintWithItem:self.mapwizeView + attribute:NSLayoutAttributeRight + relatedBy:NSLayoutRelationEqual + toItem:self.view + attribute:NSLayoutAttributeRight + multiplier:1.0f + constant:0.0f] setActive:YES]; +} + +- (void)mapwizeView:(MWZMapwizeView *)mapwizeView didTapOnPlaceInformationButton:(MWZPlace *)place { + +} + +- (void)mapwizeView:(MWZMapwizeView *)mapwizeView didTapOnPlaceListInformationButton:(MWZPlaceList *)placeList { + +} + +- (void)mapwizeViewDidTapOnFollowWithoutLocation:(MWZMapwizeView *)mapwizeView { + +} + +- (void)mapwizeViewDidTapOnMenu:(MWZMapwizeView *)mapwizeView { + +} + +- (void) mapwizeViewDidLoad:(MWZMapwizeView*) mapwizeView { + provider = [[ILPolestarIndoorLocationProvider alloc] initWithPolestarKey:@"emulator"]; + [provider start]; + [mapwizeView.mapwizePlugin setIndoorLocationProvider:provider]; +} + +- (BOOL) mapwizeView:(MWZMapwizeView *)mapwizeView shouldShowInformationButtonFor:(id)mapwizeObject { + if ([mapwizeObject isKindOfClass:MWZPlace.class]) { + return YES; + } + return NO; +} + +@end diff --git a/polestar-indoor-location-provider-ios/main.m b/polestar-indoor-location-provider-ios/main.m new file mode 100644 index 0000000..5f587e8 --- /dev/null +++ b/polestar-indoor-location-provider-ios/main.m @@ -0,0 +1,16 @@ +// +// main.m +// polestar-indoor-location-provider-ios +// +// Created by Etienne Mercier on 15/02/2018. +// Copyright © 2018 Etienne Mercier. All rights reserved. +// + +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +}