@situm/cordova 3.5.4 → 3.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/example/README.md +9 -6
- package/package.json +1 -1
- package/plugin.xml +2 -2
- package/src/android/app/build.gradle +1 -1
- package/src/android/app/src/test/java/es/situm/plugin/SitumMapperTest.java +2 -2
- package/src/android/situm.gradle +1 -1
- package/src/ios/Podfile +1 -1
- package/src/ios/SitumCordovaPlugin.xcodeproj/project.pbxproj +6 -27
- package/src/ios/situmcordovaplugintests/SitumCreatorTests.m +16 -16
- package/tests/common-resources/locationRequest/locationRequest2.json +26 -30
- package/tests/common-resources/locationRequest/locationRequest3.json +27 -31
- package/tests/common-resources/locationRequest/locationRequest4.json +25 -29
- package/tests/common-resources/locationStatus/locationStatus12.json +3 -3
- package/tests/scripts/copy_android_resources.sh +2 -2
- package/src/ios/situmcordovaplugintests/PoiCategoryIconTests.m +0 -43
- package/src/ios/situmcordovaplugintests/RouteTests.m +0 -42
package/example/README.md
CHANGED
|
@@ -62,10 +62,10 @@ npm install
|
|
|
62
62
|
This example provides you with a template on [`src/constants.ts.example`](src/constants.ts.example) to set all your credentials used on the sdk tab just in one file. So rename this file to `constants.ts` and set up your credentials before running the app:
|
|
63
63
|
|
|
64
64
|
```typescript
|
|
65
|
-
export const API_USER =
|
|
66
|
-
export const API_KEY =
|
|
67
|
-
export const BUILDING_IDENTIFIER =
|
|
68
|
-
export const VIEWER_DOMAIN =
|
|
65
|
+
export const API_USER = 'YOUR_SITUM_API_USER';
|
|
66
|
+
export const API_KEY = 'YOUR_SITUM_API_KEY';
|
|
67
|
+
export const BUILDING_IDENTIFIER = 'YOUR_BUILDING_IDENTIFIER';
|
|
68
|
+
export const VIEWER_DOMAIN = 'https://map-viewer.situm.com';
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
> [!NOTE]
|
|
@@ -85,7 +85,7 @@ ionic cap run ios
|
|
|
85
85
|
> [!NOTE]
|
|
86
86
|
> iOS only
|
|
87
87
|
>
|
|
88
|
-
> You might need to update the pods of this app by executing inside `example/ios`:
|
|
88
|
+
> You might need to update the pods of this app by executing inside `example/ios/App`:
|
|
89
89
|
>
|
|
90
90
|
> $ pod install --repo-update
|
|
91
91
|
>
|
|
@@ -103,7 +103,10 @@ To integrate our plugin in a Cordova project, follow this 3 steps:
|
|
|
103
103
|
1. Configure your Content-Security-Policy \<meta\> tag in your `www/index.html` to be able to display our MapView on Android:
|
|
104
104
|
|
|
105
105
|
```html
|
|
106
|
-
<meta
|
|
106
|
+
<meta
|
|
107
|
+
http-equiv="Content-Security-Policy"
|
|
108
|
+
content="default-src 'self' data: https://ssl.gstatic.com https://map-viewer.situm.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *; img-src 'self' data: content:;"
|
|
109
|
+
/>
|
|
107
110
|
```
|
|
108
111
|
|
|
109
112
|
2. Configure your `config.xml` file to be able to display our MapView on iOS by adding the following \<allow-navigation\> tag:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@situm/cordova",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.6",
|
|
4
4
|
"description": "Situm Wayfinding for Capacitor and Cordova. Integrate plug&play indoor navigation experience with floorplans, POIs, routes and turn-by-turn directions in no time. With the power of Situm.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"repository": "https://github.com/situmtech/cordova",
|
package/plugin.xml
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
|
|
4
4
|
id="@situm/cordova"
|
|
5
|
-
version="3.5.
|
|
5
|
+
version="3.5.6">
|
|
6
6
|
<name>Situm Cordova plugin Official</name>
|
|
7
7
|
<description>This is the stable branch.</description>
|
|
8
8
|
<license>MIT</license>
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
<config>
|
|
91
91
|
</config>
|
|
92
92
|
<pods use-frameworks="false">
|
|
93
|
-
<pod name="SitumSDK" spec="~> 3.
|
|
93
|
+
<pod name="SitumSDK" spec="~> 3.12.0"/>
|
|
94
94
|
</pods>
|
|
95
95
|
</podspec>
|
|
96
96
|
|
|
@@ -44,7 +44,7 @@ dependencies {
|
|
|
44
44
|
implementation ('com.googlecode.json-simple:json-simple:1.1.1'){
|
|
45
45
|
exclude group: 'junit', module:'junit'
|
|
46
46
|
}
|
|
47
|
-
implementation ('es.situm:situm-sdk:3.13.
|
|
47
|
+
implementation ('es.situm:situm-sdk:3.13.1@aar') {
|
|
48
48
|
transitive = true
|
|
49
49
|
}
|
|
50
50
|
implementation 'org.apache.cordova:framework:10.1.1'
|
|
@@ -1209,8 +1209,8 @@ public class SitumMapperTest {
|
|
|
1209
1209
|
}
|
|
1210
1210
|
|
|
1211
1211
|
private void testIndication(JSONObject indication, JSONObject defaultIndication) throws JSONException {
|
|
1212
|
-
Assert.assertEquals(Indication.Orientation.
|
|
1213
|
-
|
|
1212
|
+
Assert.assertEquals(Indication.Orientation.valueOf(defaultIndication.get(ORIENTATION_TYPE).toString()),
|
|
1213
|
+
Indication.Orientation.valueOf(indication.get(ORIENTATION_TYPE).toString()));
|
|
1214
1214
|
Assert.assertEquals(Double.class, indication.get(ORIENTATION).getClass());
|
|
1215
1215
|
Assert.assertEquals(defaultIndication.getDouble(ORIENTATION), indication.getDouble(ORIENTATION), 0);
|
|
1216
1216
|
Assert.assertEquals(Integer.class, indication.get(STEP_IDX_DESTINTATION).getClass());
|
package/src/android/situm.gradle
CHANGED
package/src/ios/Podfile
CHANGED
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
0DF4AB1E21143D5800D81A31 /* SitumPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 0DF4AB1421143D5700D81A31 /* SitumPlugin.m */; };
|
|
49
49
|
0DF4AB1F21143D5800D81A31 /* ViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 0DF4AB1521143D5700D81A31 /* ViewController.h */; };
|
|
50
50
|
0DF4AB2021143D5800D81A31 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0DF4AB1621143D5700D81A31 /* ViewController.m */; };
|
|
51
|
+
230FADC12BC815C30079D285 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 230FADB52BC8145A0079D285 /* libc++.tbd */; };
|
|
51
52
|
29A6B8BBD41A308233C44F3E /* Pods_SitumCordovaPlugin.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF639F8C42C24AB0EC736F85 /* Pods_SitumCordovaPlugin.framework */; };
|
|
52
53
|
3A4011372153B0D500AC3BD5 /* InputCoordinateTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A4011362153B0D500AC3BD5 /* InputCoordinateTests.m */; };
|
|
53
54
|
3A4011392153B24400AC3BD5 /* InputLocationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A4011382153B24400AC3BD5 /* InputLocationTests.m */; };
|
|
@@ -100,7 +101,6 @@
|
|
|
100
101
|
954995F0214F8BBB007F3C28 /* Constants.h in Headers */ = {isa = PBXBuildFile; fileRef = 954995EE214F8BBB007F3C28 /* Constants.h */; };
|
|
101
102
|
954995F1214F8BBB007F3C28 /* Constants.m in Sources */ = {isa = PBXBuildFile; fileRef = 954995EF214F8BBB007F3C28 /* Constants.m */; };
|
|
102
103
|
954995F2214F8BBB007F3C28 /* Constants.m in Sources */ = {isa = PBXBuildFile; fileRef = 954995EF214F8BBB007F3C28 /* Constants.m */; };
|
|
103
|
-
954995F8214FACD8007F3C28 /* PoiCategoryIconTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 954995F7214FACD8007F3C28 /* PoiCategoryIconTests.m */; };
|
|
104
104
|
957695E1217DA8960082E679 /* LocationRequestTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 957695E0217DA8960082E679 /* LocationRequestTest.m */; };
|
|
105
105
|
95B14A2B214A402E0073A9E1 /* PointTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 95B14A2A214A402E0073A9E1 /* PointTests.m */; };
|
|
106
106
|
95B14A2D214A44800073A9E1 /* AngleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 95B14A2C214A44800073A9E1 /* AngleTests.m */; };
|
|
@@ -115,7 +115,6 @@
|
|
|
115
115
|
95B14A41214A4CF20073A9E1 /* LocationStatusTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 95B14A40214A4CF20073A9E1 /* LocationStatusTests.m */; };
|
|
116
116
|
95B14A43214A4E550073A9E1 /* NavigationProgressTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 95B14A42214A4E550073A9E1 /* NavigationProgressTests.m */; };
|
|
117
117
|
95B14A45214A50E60073A9E1 /* PoiCategoryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 95B14A44214A50E60073A9E1 /* PoiCategoryTests.m */; };
|
|
118
|
-
95B14A47214A51BA0073A9E1 /* RouteTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 95B14A46214A51BA0073A9E1 /* RouteTests.m */; };
|
|
119
118
|
95B14A49214A535A0073A9E1 /* RouteStepTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 95B14A48214A535A0073A9E1 /* RouteStepTests.m */; };
|
|
120
119
|
95B14A4B214A54CA0073A9E1 /* ConversionAreaTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 95B14A4A214A54CA0073A9E1 /* ConversionAreaTests.m */; };
|
|
121
120
|
95B14A4D214A56CE0073A9E1 /* BuildingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 95B14A4C214A56CE0073A9E1 /* BuildingTests.m */; };
|
|
@@ -202,6 +201,7 @@
|
|
|
202
201
|
0DF4AB1421143D5700D81A31 /* SitumPlugin.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SitumPlugin.m; sourceTree = "<group>"; };
|
|
203
202
|
0DF4AB1521143D5700D81A31 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
|
|
204
203
|
0DF4AB1621143D5700D81A31 /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
|
|
204
|
+
230FADB52BC8145A0079D285 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/usr/lib/libc++.tbd"; sourceTree = DEVELOPER_DIR; };
|
|
205
205
|
30325A0B136B343700982B63 /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; };
|
|
206
206
|
3A4011362153B0D500AC3BD5 /* InputCoordinateTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InputCoordinateTests.m; sourceTree = "<group>"; };
|
|
207
207
|
3A4011382153B24400AC3BD5 /* InputLocationTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InputLocationTests.m; sourceTree = "<group>"; };
|
|
@@ -257,7 +257,6 @@
|
|
|
257
257
|
952D03AF21B160DE000C6530 /* DirectionsRequestTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DirectionsRequestTest.m; sourceTree = "<group>"; };
|
|
258
258
|
954995EE214F8BBB007F3C28 /* Constants.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Constants.h; sourceTree = "<group>"; };
|
|
259
259
|
954995EF214F8BBB007F3C28 /* Constants.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Constants.m; sourceTree = "<group>"; };
|
|
260
|
-
954995F7214FACD8007F3C28 /* PoiCategoryIconTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PoiCategoryIconTests.m; sourceTree = "<group>"; };
|
|
261
260
|
957695E0217DA8960082E679 /* LocationRequestTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LocationRequestTest.m; sourceTree = "<group>"; };
|
|
262
261
|
95B14A2A214A402E0073A9E1 /* PointTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PointTests.m; sourceTree = "<group>"; };
|
|
263
262
|
95B14A2C214A44800073A9E1 /* AngleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AngleTests.m; sourceTree = "<group>"; };
|
|
@@ -272,7 +271,6 @@
|
|
|
272
271
|
95B14A40214A4CF20073A9E1 /* LocationStatusTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LocationStatusTests.m; sourceTree = "<group>"; };
|
|
273
272
|
95B14A42214A4E550073A9E1 /* NavigationProgressTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NavigationProgressTests.m; sourceTree = "<group>"; };
|
|
274
273
|
95B14A44214A50E60073A9E1 /* PoiCategoryTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PoiCategoryTests.m; sourceTree = "<group>"; };
|
|
275
|
-
95B14A46214A51BA0073A9E1 /* RouteTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RouteTests.m; sourceTree = "<group>"; };
|
|
276
274
|
95B14A48214A535A0073A9E1 /* RouteStepTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RouteStepTests.m; sourceTree = "<group>"; };
|
|
277
275
|
95B14A4A214A54CA0073A9E1 /* ConversionAreaTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ConversionAreaTests.m; sourceTree = "<group>"; };
|
|
278
276
|
95B14A4C214A56CE0073A9E1 /* BuildingTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BuildingTests.m; sourceTree = "<group>"; };
|
|
@@ -290,6 +288,7 @@
|
|
|
290
288
|
isa = PBXFrameworksBuildPhase;
|
|
291
289
|
buildActionMask = 2147483647;
|
|
292
290
|
files = (
|
|
291
|
+
230FADC12BC815C30079D285 /* libc++.tbd in Frameworks */,
|
|
293
292
|
3AC2FF4E21ADA883005D438A /* SitumSDK.framework in Frameworks */,
|
|
294
293
|
0D884A1321145F820066C765 /* libCordova.a in Frameworks */,
|
|
295
294
|
0D884A232114644C0066C765 /* SitumSDK.framework in Frameworks */,
|
|
@@ -325,7 +324,7 @@
|
|
|
325
324
|
name = Products;
|
|
326
325
|
sourceTree = CORDOVALIB;
|
|
327
326
|
};
|
|
328
|
-
0867D691FE84028FC02AAC07 = {
|
|
327
|
+
0867D691FE84028FC02AAC07 /* CordovaLib */ = {
|
|
329
328
|
isa = PBXGroup;
|
|
330
329
|
children = (
|
|
331
330
|
0DF4AB0521143D5700D81A31 /* situmcordovaplugin */,
|
|
@@ -344,6 +343,7 @@
|
|
|
344
343
|
0D5184E921145DEB00BFA9E3 /* Frameworks */ = {
|
|
345
344
|
isa = PBXGroup;
|
|
346
345
|
children = (
|
|
346
|
+
230FADB52BC8145A0079D285 /* libc++.tbd */,
|
|
347
347
|
0D884A0821145E510066C765 /* SitumSDK.framework */,
|
|
348
348
|
3AC2FF4D21ADA883005D438A /* SitumSDK.framework */,
|
|
349
349
|
BF639F8C42C24AB0EC736F85 /* Pods_SitumCordovaPlugin.framework */,
|
|
@@ -447,11 +447,9 @@
|
|
|
447
447
|
95B14A40214A4CF20073A9E1 /* LocationStatusTests.m */,
|
|
448
448
|
95B14A42214A4E550073A9E1 /* NavigationProgressTests.m */,
|
|
449
449
|
95B14A44214A50E60073A9E1 /* PoiCategoryTests.m */,
|
|
450
|
-
95B14A46214A51BA0073A9E1 /* RouteTests.m */,
|
|
451
450
|
95B14A48214A535A0073A9E1 /* RouteStepTests.m */,
|
|
452
451
|
95B14A4A214A54CA0073A9E1 /* ConversionAreaTests.m */,
|
|
453
452
|
95D33B48214B9680000E073E /* PoiTests.m */,
|
|
454
|
-
954995F7214FACD8007F3C28 /* PoiCategoryIconTests.m */,
|
|
455
453
|
);
|
|
456
454
|
path = situmcordovaplugintests;
|
|
457
455
|
sourceTree = "<group>";
|
|
@@ -696,7 +694,6 @@
|
|
|
696
694
|
D2AAC07B0554694100DB518D /* Sources */,
|
|
697
695
|
D2AAC07C0554694100DB518D /* Frameworks */,
|
|
698
696
|
0D884E7E2116FD8E0066C765 /* Resources */,
|
|
699
|
-
DF7CE5352F475FBC1C87C1F3 /* [CP] Copy Pods Resources */,
|
|
700
697
|
);
|
|
701
698
|
buildRules = (
|
|
702
699
|
);
|
|
@@ -738,7 +735,7 @@
|
|
|
738
735
|
en,
|
|
739
736
|
Base,
|
|
740
737
|
);
|
|
741
|
-
mainGroup = 0867D691FE84028FC02AAC07
|
|
738
|
+
mainGroup = 0867D691FE84028FC02AAC07 /* CordovaLib */;
|
|
742
739
|
productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
|
|
743
740
|
projectDirPath = "";
|
|
744
741
|
projectRoot = "";
|
|
@@ -756,7 +753,6 @@
|
|
|
756
753
|
buildActionMask = 2147483647;
|
|
757
754
|
files = (
|
|
758
755
|
0D884E7D2116FAA20066C765 /* resources in Resources */,
|
|
759
|
-
0D884E88211708900066C765 /* Info.plist in Resources */,
|
|
760
756
|
);
|
|
761
757
|
runOnlyForDeploymentPostprocessing = 0;
|
|
762
758
|
};
|
|
@@ -797,21 +793,6 @@
|
|
|
797
793
|
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";
|
|
798
794
|
showEnvVarsInLog = 0;
|
|
799
795
|
};
|
|
800
|
-
DF7CE5352F475FBC1C87C1F3 /* [CP] Copy Pods Resources */ = {
|
|
801
|
-
isa = PBXShellScriptBuildPhase;
|
|
802
|
-
buildActionMask = 2147483647;
|
|
803
|
-
files = (
|
|
804
|
-
);
|
|
805
|
-
inputPaths = (
|
|
806
|
-
);
|
|
807
|
-
name = "[CP] Copy Pods Resources";
|
|
808
|
-
outputPaths = (
|
|
809
|
-
);
|
|
810
|
-
runOnlyForDeploymentPostprocessing = 0;
|
|
811
|
-
shellPath = /bin/sh;
|
|
812
|
-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SitumCordovaPlugin/Pods-SitumCordovaPlugin-resources.sh\"\n";
|
|
813
|
-
showEnvVarsInLog = 0;
|
|
814
|
-
};
|
|
815
796
|
/* End PBXShellScriptBuildPhase section */
|
|
816
797
|
|
|
817
798
|
/* Begin PBXSourcesBuildPhase section */
|
|
@@ -831,7 +812,6 @@
|
|
|
831
812
|
0D5CFD64212C275E00C6E436 /* CDVUIWebViewNavigationDelegate.m in Sources */,
|
|
832
813
|
95B14A37214A47D20073A9E1 /* DimensionTests.m in Sources */,
|
|
833
814
|
95B14A41214A4CF20073A9E1 /* LocationStatusTests.m in Sources */,
|
|
834
|
-
954995F8214FACD8007F3C28 /* PoiCategoryIconTests.m in Sources */,
|
|
835
815
|
954995F2214F8BBB007F3C28 /* Constants.m in Sources */,
|
|
836
816
|
95B14A35214A476B0073A9E1 /* CoordinateTests.m in Sources */,
|
|
837
817
|
952D03B021B160DE000C6530 /* DirectionsRequestTest.m in Sources */,
|
|
@@ -844,7 +824,6 @@
|
|
|
844
824
|
95D33B49214B9680000E073E /* PoiTests.m in Sources */,
|
|
845
825
|
95B14A2F214A45B10073A9E1 /* BoundTests.m in Sources */,
|
|
846
826
|
3A40113D2153CBA800AC3BD5 /* InputIndicationTests.m in Sources */,
|
|
847
|
-
95B14A47214A51BA0073A9E1 /* RouteTests.m in Sources */,
|
|
848
827
|
0D5CFD61212C275E00C6E436 /* CDVUIWebViewDelegate.m in Sources */,
|
|
849
828
|
95B14A33214A46E20073A9E1 /* CartesianCoordinateTests.m in Sources */,
|
|
850
829
|
3A4011372153B0D500AC3BD5 /* InputCoordinateTests.m in Sources */,
|
|
@@ -57,8 +57,7 @@
|
|
|
57
57
|
CLLocationCoordinate2D center = CLLocationCoordinate2DMake(42.8723472943445, -8.56325268745422);
|
|
58
58
|
SITDimensions *dimensions = [[SITDimensions alloc] initWithWidth:71.0686153823893 height:42.6106416714803];
|
|
59
59
|
SITAngle *angle = [[SITAngle alloc] initWithRadians:-3.31881803875501];
|
|
60
|
-
NSDateFormatter *dateFormatter = [
|
|
61
|
-
[dateFormatter setDateFormat:kDateFormat];
|
|
60
|
+
NSDateFormatter *dateFormatter = [SitumCreatorTests createDateFormatter];
|
|
62
61
|
NSDate *createdAt = [dateFormatter dateFromString:@"Wed Jan 04 18:41:43 +0000 2017"];
|
|
63
62
|
NSDate *updatedAt = [dateFormatter dateFromString:@"Wed Sep 12 12:10:25 +0000 2018"];
|
|
64
63
|
|
|
@@ -113,8 +112,7 @@
|
|
|
113
112
|
//floor1.json
|
|
114
113
|
+ (SITFloor *) createFloorWithAltitude {
|
|
115
114
|
SITFloor *floor = [[SITFloor alloc] init];
|
|
116
|
-
NSDateFormatter *dateFormatter = [
|
|
117
|
-
[dateFormatter setDateFormat:kDateFormat];
|
|
115
|
+
NSDateFormatter *dateFormatter = [SitumCreatorTests createDateFormatter];
|
|
118
116
|
floor.createdAt = [dateFormatter dateFromString:@"Thu Jan 01 00:00:00 +0000 1970"];
|
|
119
117
|
floor.updatedAt = [dateFormatter dateFromString:@"Thu Jan 01 00:00:00 +0000 1970"];
|
|
120
118
|
floor.altitude = 2.5;
|
|
@@ -132,8 +130,7 @@
|
|
|
132
130
|
+ (SITFloor *) createFloorWithoutAltitude {
|
|
133
131
|
SITFloor *floor = [[SITFloor alloc] init];
|
|
134
132
|
|
|
135
|
-
NSDateFormatter *dateFormatter = [
|
|
136
|
-
[dateFormatter setDateFormat:kDateFormat];
|
|
133
|
+
NSDateFormatter *dateFormatter = [SitumCreatorTests createDateFormatter];
|
|
137
134
|
floor.createdAt = [dateFormatter dateFromString:@"Thu Jan 01 00:00:00 +0000 1970"];
|
|
138
135
|
floor.updatedAt = [dateFormatter dateFromString:@"Thu Jan 01 00:00:00 +0000 1970"];
|
|
139
136
|
floor.name = @"testName";
|
|
@@ -533,8 +530,7 @@
|
|
|
533
530
|
category.name = string;
|
|
534
531
|
CLLocationCoordinate2D coordinate = CLLocationCoordinate2DMake(5, 2);
|
|
535
532
|
SITPoint *point = [[SITPoint alloc] initWithCoordinate:coordinate buildingIdentifier:@"101"];
|
|
536
|
-
NSDateFormatter *formatter = [
|
|
537
|
-
[formatter setDateFormat:kDateFormat];
|
|
533
|
+
NSDateFormatter *formatter = [SitumCreatorTests createDateFormatter];
|
|
538
534
|
NSDate *createdAt = [formatter dateFromString:@"Thu Jan 01 00:00:00 +0000 1970"];
|
|
539
535
|
NSDate *updatedAt = [formatter dateFromString:@"Thu Jan 01 00:00:00 +0000 1970"];
|
|
540
536
|
|
|
@@ -563,8 +559,7 @@
|
|
|
563
559
|
SITMultilanguageString *string = [[SITMultilanguageString alloc] initWithValue:@"Sin categoría" defaultLocale:[NSLocale localeWithLocaleIdentifier:@"es_ES"]];
|
|
564
560
|
category.name = string;
|
|
565
561
|
|
|
566
|
-
NSDateFormatter *formatter = [
|
|
567
|
-
[formatter setDateFormat:kDateFormat];
|
|
562
|
+
NSDateFormatter *formatter = [SitumCreatorTests createDateFormatter];
|
|
568
563
|
NSDate *createdAt = [formatter dateFromString:@"Thu Jan 01 00:00:00 +0000 1970"];
|
|
569
564
|
NSDate *updatedAt = [formatter dateFromString:@"Thu Jan 01 00:00:00 +0000 1970"];
|
|
570
565
|
|
|
@@ -590,8 +585,7 @@
|
|
|
590
585
|
CLLocationCoordinate2D coordinate = CLLocationCoordinate2DMake(5, 7);
|
|
591
586
|
SITPoint *point = [[SITPoint alloc] initWithCoordinate:coordinate buildingIdentifier:@"101"];
|
|
592
587
|
|
|
593
|
-
NSDateFormatter *formatter = [
|
|
594
|
-
[formatter setDateFormat:kDateFormat];
|
|
588
|
+
NSDateFormatter *formatter = [SitumCreatorTests createDateFormatter];
|
|
595
589
|
NSDate *createdAt = [formatter dateFromString:@"Thu Jan 01 00:00:00 +0000 1970"];
|
|
596
590
|
NSDate *updatedAt = [formatter dateFromString:@"Thu Jan 01 00:00:00 +0000 1970"];
|
|
597
591
|
|
|
@@ -616,8 +610,7 @@
|
|
|
616
610
|
building.identifier = @"101";
|
|
617
611
|
SITPoint *point = [[SITPoint alloc] initWithCoordinate:coordinate buildingIdentifier:@"101" floorIdentifier:@"12" cartesianCoordinate:cartesianCoordinate];
|
|
618
612
|
|
|
619
|
-
NSDateFormatter *formatter = [
|
|
620
|
-
[formatter setDateFormat:kDateFormat];
|
|
613
|
+
NSDateFormatter *formatter = [SitumCreatorTests createDateFormatter];
|
|
621
614
|
NSDate *createdAt = [formatter dateFromString:@"Thu Jan 01 00:00:00 +0000 1970"];
|
|
622
615
|
NSDate *updatedAt = [formatter dateFromString:@"Thu Jan 01 00:00:00 +0000 1970"];
|
|
623
616
|
|
|
@@ -648,8 +641,7 @@
|
|
|
648
641
|
building.identifier = @"101";
|
|
649
642
|
SITPoint *point = [[SITPoint alloc] initWithCoordinate:coordinate buildingIdentifier:@"101" floorIdentifier:@"12" cartesianCoordinate:cartesianCoordinate];
|
|
650
643
|
|
|
651
|
-
NSDateFormatter *formatter = [
|
|
652
|
-
[formatter setDateFormat:kDateFormat];
|
|
644
|
+
NSDateFormatter *formatter = [SitumCreatorTests createDateFormatter];
|
|
653
645
|
NSDate *createdAt = [formatter dateFromString:@"Thu Jan 01 00:00:00 +0000 1970"];
|
|
654
646
|
NSDate *updatedAt = [formatter dateFromString:@"Thu Jan 01 00:00:00 +0000 1970"];
|
|
655
647
|
|
|
@@ -924,5 +916,13 @@
|
|
|
924
916
|
return ca;
|
|
925
917
|
}
|
|
926
918
|
|
|
919
|
+
+ (NSDateFormatter *)createDateFormatter{
|
|
920
|
+
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]init];
|
|
921
|
+
[dateFormatter setDateFormat:kDateFormat];
|
|
922
|
+
[dateFormatter setLocale:[[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"]];
|
|
923
|
+
[dateFormatter setTimeZone:[NSTimeZone timeZoneWithAbbreviation:@"UTC"]];
|
|
924
|
+
return dateFormatter;
|
|
925
|
+
}
|
|
926
|
+
|
|
927
927
|
@end
|
|
928
928
|
|
|
@@ -1,32 +1,28 @@
|
|
|
1
1
|
[
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
{
|
|
3
|
+
"buildingIdentifier": 1051,
|
|
4
|
+
"name": "Ed. Emprendia - Situm",
|
|
5
|
+
"interval": 1000,
|
|
6
|
+
"indoorProvider": "INPHONE",
|
|
7
|
+
"useBle": true,
|
|
8
|
+
"useWifi": true,
|
|
9
|
+
"motionMode": "BY_FOOT",
|
|
10
|
+
"useForegroundService": true,
|
|
11
|
+
"outdoorLocationOptions": {
|
|
12
|
+
"userDefinedThreshold": false,
|
|
13
|
+
"computeInterval": 1,
|
|
14
|
+
"averageSnrThreshold": 25.0
|
|
5
15
|
},
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
},
|
|
20
|
-
"beaconFilters": [
|
|
21
|
-
{
|
|
22
|
-
"uuid": "54"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"uuid": "68"
|
|
26
|
-
}
|
|
27
|
-
],
|
|
28
|
-
"smallestDisplacement": 1.0,
|
|
29
|
-
"realtimeUpdateInterval": "REALTIME",
|
|
30
|
-
"autoEnableBleDuringPositioning": false
|
|
31
|
-
}
|
|
32
|
-
]
|
|
16
|
+
"beaconFilters": [
|
|
17
|
+
{
|
|
18
|
+
"uuid": "54"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"uuid": "68"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"smallestDisplacement": 1.0,
|
|
25
|
+
"realtimeUpdateInterval": "REALTIME",
|
|
26
|
+
"autoEnableBleDuringPositioning": false
|
|
27
|
+
}
|
|
28
|
+
]
|
|
@@ -1,33 +1,29 @@
|
|
|
1
1
|
[
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
{
|
|
3
|
+
"buildingIdentifier": 1051,
|
|
4
|
+
"name": "Ed. Emprendia - Situm",
|
|
5
|
+
"interval": 1000,
|
|
6
|
+
"indoorProvider": "INPHONE",
|
|
7
|
+
"useBle": true,
|
|
8
|
+
"useWifi": true,
|
|
9
|
+
"motionMode": "BY_FOOT",
|
|
10
|
+
"useForegroundService": true,
|
|
11
|
+
"useDeadReckoning": true,
|
|
12
|
+
"useGps": true,
|
|
13
|
+
"outdoorLocationOptions": {
|
|
14
|
+
"userDefinedThreshold": false,
|
|
15
|
+
"computeInterval": 1,
|
|
16
|
+
"averageSnrThreshold": 25.0
|
|
5
17
|
},
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"userDefinedThreshold": false,
|
|
19
|
-
"computeInterval": 1,
|
|
20
|
-
"averageSnrThreshold": 25.0
|
|
21
|
-
},
|
|
22
|
-
"beaconFilters": [
|
|
23
|
-
{
|
|
24
|
-
"uuid": "54"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"uuid": "68"
|
|
28
|
-
}
|
|
29
|
-
],
|
|
30
|
-
"smallestDisplacement": 1.0,
|
|
31
|
-
"realtimeUpdateInterval": "REALTIME"
|
|
32
|
-
}
|
|
33
|
-
]
|
|
18
|
+
"beaconFilters": [
|
|
19
|
+
{
|
|
20
|
+
"uuid": "54"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"uuid": "68"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"smallestDisplacement": 1.0,
|
|
27
|
+
"realtimeUpdateInterval": "REALTIME"
|
|
28
|
+
}
|
|
29
|
+
]
|
|
@@ -1,31 +1,27 @@
|
|
|
1
1
|
[
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
{
|
|
3
|
+
"buildingIdentifier": 1051,
|
|
4
|
+
"name": "Ed. Emprendia - Situm",
|
|
5
|
+
"interval": 1000,
|
|
6
|
+
"indoorProvider": "INPHONE",
|
|
7
|
+
"useBle": true,
|
|
8
|
+
"useWifi": true,
|
|
9
|
+
"motionMode": "BY_FOOT",
|
|
10
|
+
"useForegroundService": true,
|
|
11
|
+
"outdoorLocationOptions": {
|
|
12
|
+
"userDefinedThreshold": false,
|
|
13
|
+
"computeInterval": 1,
|
|
14
|
+
"averageSnrThreshold": 25.0
|
|
5
15
|
},
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"averageSnrThreshold": 25.0
|
|
19
|
-
},
|
|
20
|
-
"beaconFilters": [
|
|
21
|
-
{
|
|
22
|
-
"uuid": "54"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"uuid": "68"
|
|
26
|
-
}
|
|
27
|
-
],
|
|
28
|
-
"smallestDisplacement": 1.0,
|
|
29
|
-
"realtimeUpdateInterval": "BATTERY_SAVER"
|
|
30
|
-
}
|
|
31
|
-
]
|
|
16
|
+
"beaconFilters": [
|
|
17
|
+
{
|
|
18
|
+
"uuid": "54"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"uuid": "68"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"smallestDisplacement": 1.0,
|
|
25
|
+
"realtimeUpdateInterval": "BATTERY_SAVER"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"statusOrdinal":
|
|
3
|
-
"statusName":"TIME_SETTINGS_MANUAL"
|
|
4
|
-
}
|
|
2
|
+
"statusOrdinal": 15,
|
|
3
|
+
"statusName": "TIME_SETTINGS_MANUAL"
|
|
4
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#! /bin/bash
|
|
2
|
-
|
|
3
|
-
cp -r tests/common-resources
|
|
2
|
+
mkdir src/android/app/src/test/resources/
|
|
3
|
+
cp -r tests/common-resources/* src/android/app/src/test/resources/
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// PoiCategoryIconTests.m
|
|
3
|
-
// situmcordovaplugintests
|
|
4
|
-
//
|
|
5
|
-
// Created by Cristina Sánchez Barreiro on 17/09/2018.
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
#import <XCTest/XCTest.h>
|
|
9
|
-
#import "SitumCreatorTests.h"
|
|
10
|
-
#import "SitumLocationWrapper.h"
|
|
11
|
-
#import "TestingHelper.h"
|
|
12
|
-
|
|
13
|
-
@interface PoiCategoryIconTests : XCTestCase
|
|
14
|
-
|
|
15
|
-
@property (nonatomic, strong) NSString *filePath;
|
|
16
|
-
@property (nonatomic, strong) TestingHelper *helper;
|
|
17
|
-
|
|
18
|
-
@end
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
@implementation PoiCategoryIconTests
|
|
22
|
-
|
|
23
|
-
- (void)setUp {
|
|
24
|
-
[super setUp];
|
|
25
|
-
_filePath = @"resources/poiCategoryIcon";
|
|
26
|
-
_helper = [TestingHelper new];
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
- (void)tearDown {
|
|
30
|
-
// Put teardown code here. This method is called after the invocation of each test method in the class.
|
|
31
|
-
[super tearDown];
|
|
32
|
-
}
|
|
33
|
-
- (void) testPoiCategoryIcon {
|
|
34
|
-
UIImage *image = [SitumCreatorTests createPoiCategoryIcon];
|
|
35
|
-
|
|
36
|
-
NSDictionary *imageJO = [SitumLocationWrapper.shared bitmapToJsonObject:image];
|
|
37
|
-
NSString *fileName = @"poiCategoryIcon1";
|
|
38
|
-
//read from json object in resources
|
|
39
|
-
NSDictionary *jsonImage = [TestingHelper dataFromJSONFileNamed: fileName inDirectory : _filePath];
|
|
40
|
-
[_helper assertImage: jsonImage: imageJO];
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
@end
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// RouteTests.m
|
|
3
|
-
// situmcordovaplugintests
|
|
4
|
-
//
|
|
5
|
-
// Created by Cristina Sánchez Barreiro on 13/09/2018.
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
#import <XCTest/XCTest.h>
|
|
9
|
-
#import "SitumCreatorTests.h"
|
|
10
|
-
#import "SitumLocationWrapper.h"
|
|
11
|
-
#import "TestingHelper.h"
|
|
12
|
-
|
|
13
|
-
@interface RouteTests : XCTestCase
|
|
14
|
-
|
|
15
|
-
@property (nonatomic, strong) NSString *filePath;
|
|
16
|
-
@property (nonatomic, strong) TestingHelper *helper;
|
|
17
|
-
|
|
18
|
-
@end
|
|
19
|
-
|
|
20
|
-
@implementation RouteTests
|
|
21
|
-
|
|
22
|
-
- (void)setUp {
|
|
23
|
-
[super setUp];
|
|
24
|
-
_filePath = @"resources/route";
|
|
25
|
-
_helper = [TestingHelper new];
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
- (void)tearDown {
|
|
29
|
-
// Put teardown code here. This method is called after the invocation of each test method in the class.
|
|
30
|
-
[super tearDown];
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
- (void) testRoute {
|
|
34
|
-
SITRoute *route1 = [SitumCreatorTests createRouteBuildingWithDegreesPointWithCoordinates];
|
|
35
|
-
NSDictionary *routeJO1 = [SitumLocationWrapper.shared routeToJsonObject:route1];
|
|
36
|
-
NSString *fileName1 = @"route1";
|
|
37
|
-
//read from json object in resources
|
|
38
|
-
NSDictionary *jsonRoute1 = [TestingHelper dataFromJSONFileNamed: fileName1 inDirectory : _filePath];
|
|
39
|
-
[_helper assertRoute: jsonRoute1: routeJO1];
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
@end
|