-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'RCTConvert+AirMap.h' file not found #3597
Comments
Hi @WASHSWATDAVID |
Have you find a solution? I'm facing the same problem |
try add below code to your
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I'm also having this issue with a fresh react native project using typescript template. react 17.0.1 react-native 0.64.1 react-native-maps 0.28.0 . I'm searching for a solution but if I can't find one I'm hoping someone can post one here. |
I don't know why it no longer says this in the installation instructions but I've seen it on YouTube of people installing older versions on this library and the instruction use to say to put my pod file now looks like:
This fixed it for me, hope it helps people in the future. |
This one not work for me, in case i am using use_framework! in my podfile. |
Dear @JustineUIT, I hope it's not too late. I'm putting here a fully working Podfile example. Hope also helps who ended up with this discussion further. A briefly key thing to know is the setting pre-installer section in Podfile and marking whole build failing libraries as Static, let's see in example:
Pro tip: after applying this and find all the libraries they needs static library change. Remove Pods one last time and remove DerivedData too |
Thanks you, work like a charm! |
Works Great! |
Worked perfectly, thanks |
Worked perfectly, thanks 💯 |
Thanks, worked here also perfectly :) ! |
This really worked, thanks a lot! however I almost have no idea what these pre and post installers do.. and can they be included at the lib level? |
Thank you for such a perfect solution. |
Does someone know how to fix this error using the expo managed workflow with a standalone (development) client build? I added the Here is the {
"expo": {
"name": "MyProject",
"slug": "my-app",
"owner": "silthus",
"version": "1.0.0-dev.52",
"runtimeVersion": "1.8.1",
"orientation": "portrait",
"icon": "./assets/images/app-icon-all.png",
"splash": {
"image": "./assets/images/splash-logo-all.png",
"resizeMode": "contain",
"backgroundColor": "#191015"
},
"plugins": [
"@react-native-firebase/app",
"@react-native-firebase/perf",
"@react-native-firebase/crashlytics",
"expo-notifications",
[
"expo-build-properties",
{
"ios": {
"useFrameworks": "static"
}
}
]
],
"updates": {
"fallbackToCacheTimeout": 0,
"url": "https://u.expo.dev/XXXXXXXXXXXXXXXXXXXXXX"
},
"assetBundlePatterns": [
"**/*"
],
"android": {
"icon": "./assets/images/app-icon-android-legacy.png",
"googleServicesFile": "google-services.json",
"adaptiveIcon": {
"foregroundImage": "./assets/images/app-icon-android-adaptive-foreground.png",
"backgroundImage": "./assets/images/app-icon-android-adaptive-background.png"
},
"splash": {
"image": "./assets/images/splash-logo-android-universal.png",
"resizeMode": "contain",
"backgroundColor": "#191015"
},
"config": {
"googleMaps": {
"apiKey": "XXXXXXXXXXXXXXXXXXXXXXXXX"
}
},
"versionCode": 52
},
"ios": {
"icon": "./assets/images/app-icon-ios.png",
"supportsTablet": true,
"splash": {
"image": "./assets/images/splash-logo-ios-mobile.png",
"tabletImage": "./assets/images/splash-logo-ios-tablet.png",
"resizeMode": "contain",
"backgroundColor": "#191015"
},
"config": {
"googleMapsApiKey": "XXXXXXXXXXXXXXXXX"
},
"buildNumber": "1.0.0"
},
"web": {
"favicon": "./assets/images/app-icon-web-favicon.png",
"splash": {
"image": "./assets/images/splash-logo-web.png",
"resizeMode": "contain",
"backgroundColor": "#191015"
},
"build": {
"babel": {
"include": [
"@ui-kitten/components"
]
}
}
}
}
} |
@Silthus I started getting the same error for my Expo project, I'm unsure but I think it started after Expo 46 upgrade. Have you found a solution? |
Same issue here after adding |
I made it work following this discussion thread. The solution, or better say workaround, for the problem is the following: Create a const fs = require('fs');
const path = require('path');
const generateCode = require('@expo/config-plugins/build/utils/generateCode');
const configPlugins = require('@expo/config-plugins');
const code = `
$static_library = [
'React',
'Google-Maps-iOS-Utils',
'GoogleMaps',
'react-native-maps',
'react-native-google-maps',
'React-hermes'
]
pre_install do |installer|
Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
installer.pod_targets.each do |pod|
bt = pod.send(:build_type)
if $static_library.include?(pod.name)
puts "Overriding the build_type to static_library from static_framework for #{pod.name}"
def pod.build_type;
Pod::BuildType.static_library
end
end
end
installer.pod_targets.each do |pod|
bt = pod.send(:build_type)
puts "#{pod.name} (#{bt})"
puts " linkage: #{bt.send(:linkage)} packaging: #{bt.send(:packaging)}"
end
end`;
module.exports = (config) => {
return configPlugins.withDangerousMod(config, [
'ios',
async (config) => {
const filePath = path.join(
config.modRequest.platformProjectRoot,
'Podfile'
);
const contents = fs.readFileSync(filePath, 'utf-8');
const addCode = generateCode.mergeContents({
tag: 'withReactNativeFirebase',
src: contents,
newSrc: code,
anchor: /\s*get_default_flags\(\)/i,
offset: 2,
comment: '#',
});
if (!addCode.didMerge) {
console.error(
"ERROR: Cannot add withReactNativeMaps to the project's ios/Podfile because it's malformed."
);
return config;
}
fs.writeFileSync(filePath, addCode.contents);
return config;
},
]);
}; Then load then plugin inside ...
"plugins": [
"@react-native-firebase/app",
"@react-native-firebase/perf",
"@react-native-firebase/crashlytics",
"expo-notifications",
"./react-native-maps-plugin", // <--- this one here without the .js ending
[
"expo-build-properties",
{
"ios": {
"useFrameworks": "static",
"deploymentTarget": "13.0"
}
}
]
],
... See the linked thread for more information and some alternative solutions. In the long run however, I think this should be made as an official Expo plugin. I might send a PR if I find the time. |
Please see the solution: #3597 (comment) This solved my problem. @BrodaNoel @beydogan |
That doesn't seem to apply for devs using Expo |
I'm using expo and removing |
This solution works perfectly! Thank you so much! |
** ANY SOLUTION ** After this I am getting Below is my pod file
|
To be more specific about the additional statements you need to add to your files: Additional statements need to be added to # Podfile:
...
# Platform should be at least 13.0
platform :ios, '13.0'
# ...
# add the following 2 statements
pod 'GoogleMaps'
pod 'Google-Maps-iOS-Utils'
target 'casualjob' do
# add the following 2 statements (if not present)
rn_maps_path = '../node_modules/react-native-maps'
pod 'react-native-google-maps', :path => rn_maps_path
# ....
post_install do |installer|
react_native_post_install(
installer,
# Set `mac_catalyst_enabled` to `true` in order to apply patches
# necessary for Mac Catalyst builds
:mac_catalyst_enabled => false
)
# ...
# add the following section
installer.pods_project.targets.each do |target|
if target.name == 'react-native-google-maps'
target.build_configurations.each do |config|
config.build_settings['CLANG_ENABLE_MODULES'] = 'No'
end
end
end
# ...
end Additional statements need to be added to // AppDelegate.mm
// ...
#import "AppDelegate.h"
// ...
// Add the following statement (if not present)
#import <GoogleMaps/GoogleMaps.h>
// ...
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// add the following statement (if not present)
// Replace YOUR_API_KEY below with your project's Google API Key
[GMSServices provideAPIKey:@"YOUR_API_KEY"];
// ...
}
// ... For the configuration:
|
Were you able to solve this within Expo @SohelIslamImran? |
@jakobsen9 Try this #4563 (comment) |
Thanks, I found this earlier – works like a charm 🙌 |
This saved the day !! Thanks a lot. Here is my version of the podfile,
|
That was an issue I faced on |
Thank you |
# Why Upgrades `react-native-maps` to `1.13.0` # How > Note: I couldn't build an iOS project with Google Maps included. I'll take a closer look later. It's a known issue, but the proposed solution didn't work (react-native-maps/react-native-maps#3597). # Test Plan - expo go with NCL ✅
Bug report
Summary
Environment info
react-native info
output:My Xcode version 12.1 (12A7403)
"react-native-maps": "0.27.1",
Podfile
Steps to reproduce
When I build my ios project always shown
'RCTConvert+AirMap.h' file not found
messageThe text was updated successfully, but these errors were encountered: