@rnmapbox/maps 10.0.11 → 10.0.12-rc.0
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,4 +1,4 @@
|
|
|
1
|
-
import { ConfigPlugin
|
|
1
|
+
import { ConfigPlugin } from 'expo/config-plugins';
|
|
2
2
|
declare type InstallerBlockName = 'pre' | 'post';
|
|
3
3
|
export declare type MapboxPlugProps = {
|
|
4
4
|
RNMapboxMapsImpl?: string;
|
|
@@ -12,11 +12,6 @@ export declare const addInstallerBlock: (src: string, blockName: InstallerBlockN
|
|
|
12
12
|
export declare const addConstantBlock: (src: string, { RNMapboxMapsImpl, RNMapboxMapsVersion, RNMapboxMapsDownloadToken, }: MapboxPlugProps) => string;
|
|
13
13
|
export declare const applyCocoaPodsModifications: (contents: string, { RNMapboxMapsImpl, RNMapboxMapsVersion, RNMapboxMapsDownloadToken, }: MapboxPlugProps) => string;
|
|
14
14
|
export declare const addMapboxInstallerBlock: (src: string, blockName: InstallerBlockName) => string;
|
|
15
|
-
/**
|
|
16
|
-
* Exclude building for arm64 on simulator devices in the pbxproj project.
|
|
17
|
-
* Without this, production builds targeting simulators will fail.
|
|
18
|
-
*/
|
|
19
|
-
export declare const setExcludedArchitectures: (project: XcodeProject) => XcodeProject;
|
|
20
15
|
export declare const addMapboxMavenRepo: (src: string) => string;
|
|
21
16
|
declare const _default: ConfigPlugin<MapboxPlugProps>;
|
|
22
17
|
export default _default;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports._addMapboxMavenRepo = exports.addMapboxMavenRepo = exports.
|
|
6
|
+
exports._addMapboxMavenRepo = exports.addMapboxMavenRepo = exports.addMapboxInstallerBlock = exports.applyCocoaPodsModifications = exports.addConstantBlock = exports.addInstallerBlock = void 0;
|
|
7
7
|
const fs_1 = require("fs");
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
9
|
const config_plugins_1 = require("expo/config-plugins");
|
|
@@ -119,26 +119,6 @@ const withCocoaPodsInstallerBlocks = (config, { RNMapboxMapsImpl, RNMapboxMapsVe
|
|
|
119
119
|
return exportedConfig;
|
|
120
120
|
},
|
|
121
121
|
]);
|
|
122
|
-
/**
|
|
123
|
-
* Exclude building for arm64 on simulator devices in the pbxproj project.
|
|
124
|
-
* Without this, production builds targeting simulators will fail.
|
|
125
|
-
*/
|
|
126
|
-
const setExcludedArchitectures = (project) => {
|
|
127
|
-
const configurations = project.pbxXCBuildConfigurationSection();
|
|
128
|
-
for (const { buildSettings } of Object.values(configurations || {})) {
|
|
129
|
-
// Guessing that this is the best way to emulate Xcode.
|
|
130
|
-
// Using `project.addToBuildSettings` modifies too many targets.
|
|
131
|
-
if (typeof buildSettings?.PRODUCT_NAME !== 'undefined') {
|
|
132
|
-
buildSettings['"EXCLUDED_ARCHS[sdk=iphonesimulator*]"'] = '"arm64"';
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
return project;
|
|
136
|
-
};
|
|
137
|
-
exports.setExcludedArchitectures = setExcludedArchitectures;
|
|
138
|
-
const withExcludedSimulatorArchitectures = (config) => (0, config_plugins_1.withXcodeProject)(config, (exportedConfig) => {
|
|
139
|
-
exportedConfig.modResults = (0, exports.setExcludedArchitectures)(exportedConfig.modResults);
|
|
140
|
-
return exportedConfig;
|
|
141
|
-
});
|
|
142
122
|
const withAndroidPropertiesDownloadToken = (config, { RNMapboxMapsDownloadToken }) => {
|
|
143
123
|
const key = 'MAPBOX_DOWNLOADS_TOKEN';
|
|
144
124
|
if (RNMapboxMapsDownloadToken) {
|
|
@@ -269,7 +249,6 @@ const withMapboxAndroid = (config, { RNMapboxMapsImpl, RNMapboxMapsDownloadToken
|
|
|
269
249
|
return config;
|
|
270
250
|
};
|
|
271
251
|
const withMapbox = (config, { RNMapboxMapsImpl, RNMapboxMapsVersion, RNMapboxMapsDownloadToken }) => {
|
|
272
|
-
config = withExcludedSimulatorArchitectures(config);
|
|
273
252
|
config = withMapboxAndroid(config, {
|
|
274
253
|
RNMapboxMapsImpl,
|
|
275
254
|
RNMapboxMapsVersion,
|
package/plugin/src/withMapbox.ts
CHANGED
|
@@ -5,8 +5,6 @@ import {
|
|
|
5
5
|
ConfigPlugin,
|
|
6
6
|
createRunOncePlugin,
|
|
7
7
|
withDangerousMod,
|
|
8
|
-
withXcodeProject,
|
|
9
|
-
XcodeProject,
|
|
10
8
|
withGradleProperties,
|
|
11
9
|
WarningAggregator,
|
|
12
10
|
withProjectBuildGradle,
|
|
@@ -185,35 +183,6 @@ const withCocoaPodsInstallerBlocks: ConfigPlugin<MapboxPlugProps> = (
|
|
|
185
183
|
},
|
|
186
184
|
]);
|
|
187
185
|
|
|
188
|
-
/**
|
|
189
|
-
* Exclude building for arm64 on simulator devices in the pbxproj project.
|
|
190
|
-
* Without this, production builds targeting simulators will fail.
|
|
191
|
-
*/
|
|
192
|
-
export const setExcludedArchitectures: (
|
|
193
|
-
project: XcodeProject,
|
|
194
|
-
) => XcodeProject = (project: XcodeProject): XcodeProject => {
|
|
195
|
-
const configurations: { buildSettings: Record<string, string> }[] =
|
|
196
|
-
project.pbxXCBuildConfigurationSection();
|
|
197
|
-
for (const { buildSettings } of Object.values(configurations || {})) {
|
|
198
|
-
// Guessing that this is the best way to emulate Xcode.
|
|
199
|
-
// Using `project.addToBuildSettings` modifies too many targets.
|
|
200
|
-
if (typeof buildSettings?.PRODUCT_NAME !== 'undefined') {
|
|
201
|
-
buildSettings['"EXCLUDED_ARCHS[sdk=iphonesimulator*]"'] = '"arm64"';
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
return project;
|
|
206
|
-
};
|
|
207
|
-
|
|
208
|
-
const withExcludedSimulatorArchitectures: ConfigPlugin = (config) =>
|
|
209
|
-
withXcodeProject(config, (exportedConfig) => {
|
|
210
|
-
exportedConfig.modResults = setExcludedArchitectures(
|
|
211
|
-
exportedConfig.modResults,
|
|
212
|
-
);
|
|
213
|
-
|
|
214
|
-
return exportedConfig;
|
|
215
|
-
});
|
|
216
|
-
|
|
217
186
|
const withAndroidPropertiesDownloadToken: ConfigPlugin<MapboxPlugProps> = (
|
|
218
187
|
config,
|
|
219
188
|
{ RNMapboxMapsDownloadToken },
|
|
@@ -408,7 +377,6 @@ const withMapbox: ConfigPlugin<MapboxPlugProps> = (
|
|
|
408
377
|
config,
|
|
409
378
|
{ RNMapboxMapsImpl, RNMapboxMapsVersion, RNMapboxMapsDownloadToken },
|
|
410
379
|
) => {
|
|
411
|
-
config = withExcludedSimulatorArchitectures(config);
|
|
412
380
|
config = withMapboxAndroid(config, {
|
|
413
381
|
RNMapboxMapsImpl,
|
|
414
382
|
RNMapboxMapsVersion,
|