expo-beacon 0.7.17 → 0.7.18

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,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-beacon",
3
- "version": "0.7.17",
3
+ "version": "0.7.18",
4
4
  "description": "Expo module for scanning, pairing, and monitoring iBeacons on Android and iOS",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -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,YAqDpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
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"}
@@ -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
- const group = xcodeProject.pbxGroupByName(projectName);
116
- xcodeProject.addSourceFile(filePath, {}, group);
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
  });