( src: string, useGoogleMaps: boolean, )
| 97 | * @returns Podfile with react-native-maps integration configured. |
| 98 | */ |
| 99 | export 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 | |
| 120 | const withMapsCocoaPods: ConfigPlugin<{useGoogleMaps: boolean}> = ( |
| 121 | config, |
no outgoing calls
no test coverage detected
searching dependent graphs…