MCPcopy Create free account
hub / github.com/react-native-maps/react-native-maps / addMapsCocoapods

Function addMapsCocoapods

plugin/src/ios.ts:99–118  ·  view source on GitHub ↗
(
  src: string,
  useGoogleMaps: boolean,
)

Source from the content-addressed store, hash-verified

97 * @returns Podfile with react-native-maps integration configured.
98 */
99export function addMapsCocoapods(
100 src: string,
101 useGoogleMaps: boolean,
102): MergeResults {
103 let newSrc =
104 ' rn_maps_path = File.dirname(`node --print "require.resolve(\'react-native-maps/package.json\')"`) \n';
105
106 if (useGoogleMaps) {
107 newSrc += " pod 'react-native-maps/Google', :path => rn_maps_path \n";
108 }
109
110 return mergeContents({
111 tag: 'react-native-maps',
112 src,
113 newSrc,
114 anchor: /use_native_modules/,
115 offset: 0,
116 comment: '#',
117 });
118}
119
120const withMapsCocoaPods: ConfigPlugin<{useGoogleMaps: boolean}> = (
121 config,

Callers 1

withMapsCocoaPodsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…