expo-beacon 0.7.17 → 0.7.19
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/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withBeaconIOS.d.ts","sourceRoot":"","sources":["../src/withBeaconIOS.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAsC,MAAM,sBAAsB,CAAC;AAMxF,wBAAgB,iBAAiB,IAAI,MAAM,CAoB1C;AA+ED,QAAA,MAAM,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"withBeaconIOS.d.ts","sourceRoot":"","sources":["../src/withBeaconIOS.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAsC,MAAM,sBAAsB,CAAC;AAMxF,wBAAgB,iBAAiB,IAAI,MAAM,CAoB1C;AA+ED,QAAA,MAAM,aAAa,EAAE,YAmEpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -12,16 +12,16 @@ import TSLocationManager
|
|
|
12
12
|
|
|
13
13
|
final class BeaconGeoPlugin: BeaconLifecycleDelegate {
|
|
14
14
|
func beaconDidEnter(identifier: String, uuid: String, major: Int, minor: Int, distance: Double) {
|
|
15
|
-
TSLocationManager.
|
|
15
|
+
TSLocationManager.sharedInstance().start()
|
|
16
16
|
}
|
|
17
17
|
func beaconDidExit(identifier: String, uuid: String, major: Int, minor: Int, distance: Double) {
|
|
18
|
-
TSLocationManager.
|
|
18
|
+
TSLocationManager.sharedInstance().stop()
|
|
19
19
|
}
|
|
20
20
|
func eddystoneDidEnter(identifier: String, namespace: String, instance: String, distance: Double) {
|
|
21
|
-
TSLocationManager.
|
|
21
|
+
TSLocationManager.sharedInstance().start()
|
|
22
22
|
}
|
|
23
23
|
func eddystoneDidExit(identifier: String, namespace: String, instance: String, distance: Double) {
|
|
24
|
-
TSLocationManager.
|
|
24
|
+
TSLocationManager.sharedInstance().stop()
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
`;
|
|
@@ -112,8 +112,19 @@ const withBeaconIOS = (config) => {
|
|
|
112
112
|
const projectName = config.modRequest.projectName;
|
|
113
113
|
const filePath = `${projectName}/BeaconGeoPlugin.swift`;
|
|
114
114
|
if (!xcodeProject.hasFile(filePath)) {
|
|
115
|
-
|
|
116
|
-
xcodeProject.
|
|
115
|
+
// pbxGroupByName returns the group object; addSourceFile needs the UUID key.
|
|
116
|
+
const groups = xcodeProject.hash.project.objects['PBXGroup'];
|
|
117
|
+
let groupKey;
|
|
118
|
+
for (const key of Object.keys(groups)) {
|
|
119
|
+
if (key.endsWith('_comment'))
|
|
120
|
+
continue;
|
|
121
|
+
const g = groups[key];
|
|
122
|
+
if (g.name === projectName || g.path === projectName) {
|
|
123
|
+
groupKey = key;
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
xcodeProject.addSourceFile(filePath, { target: xcodeProject.getFirstTarget().uuid }, groupKey);
|
|
117
128
|
}
|
|
118
129
|
return config;
|
|
119
130
|
});
|