Skip to content
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

Native component for "AIRMap" does not exist #1798

Closed
inanbayram opened this issue Nov 17, 2017 · 15 comments
Closed

Native component for "AIRMap" does not exist #1798

inanbayram opened this issue Nov 17, 2017 · 15 comments

Comments

@inanbayram
Copy link

inanbayram commented Nov 17, 2017

Is a fix for this problem Native component for "AIRMap" does not exist available?

I installed react-native-maps manually like the instructions but this is still now working and I'm getting only a red box...

"react-native": "0.49.5"
"react-native-maps": "^0.17.1",

@maxlxq
Copy link

maxlxq commented Nov 20, 2017

react-native unlink react-native-maps && react-native link react-native-maps && react-native run-ios

@inanbayram
Copy link
Author

Thank you @maxlxq but I have still the same problem...

@archanasantoshwhatkar
Copy link

me too having same issue. pls guide.

@Masoodt
Copy link

Masoodt commented Nov 27, 2017

I've Solved this problem by these steps:
1-In X-Code > Linked Frameworks and Libraries : Remove libAirMaps.a and re Add it
2-Clean project
3-Delete iOS app from simulator/device
4-Run
Done!

@gracepark
Copy link

I'm also getting this error:

"react-native": "0.50.3",
"react-native-maps": "^0.17.1",

In iOS I can't find the libAIRMaps.a binary file. I've tried unlinking and linking react-native-maps, restarted, but still getting the same error...Any help is greatly appreciated!

@marcmoo
Copy link

marcmoo commented Dec 3, 2017

i got it solved by 2 hrs!
in documentation(https://github.com/airbnb/react-native-maps) they say we need to do something on the --(following are what the document say)--

"Option 1: CocoaPods - Same as the included AirMapsExplorer example
Setup your Podfile like the included example/ios/Podfile, replace all references to AirMapsExplorer with your project name, and then run pod install. (If you do not need GoogleMaps support for iOS, then you can probably completely skip this step.)"

but, i even can not find the profile of Podfile.......

then i cleverly create my project name as "AirMapsExplorer"(so i don't need to change the target name right?) by run the command $react-native init AirMapsExpolorer......

after all, it is then working........

i have to say the styles are also important cuz just import the AirMap will only show a blank screen on my ios simulator.

what you need to also do is set-up the style(following are my App.js file:

/**

import React, { Component } from "react";
import { Platform, StyleSheet, Text, View } from "react-native";
import MapView from "react-native-maps";

export default class App extends Component {
render() {
return (

<MapView
style={styles.map}
initialRegion={{
latitude: 37.78825,
longitude: -122.4324,
latitudeDelta: 0.0922,
longitudeDelta: 0.0421
}}
/>

);
}
}

const styles = StyleSheet.create({
container: {
position: "absolute",
top: 0,
left: 0,
right: 0,
bottom: 0,
justifyContent: "flex-end",
alignItems: "center"
},
map: {
position: "absolute",
top: 0,
left: 0,
right: 0,
bottom: 0
}
});

@marcmoo
Copy link

marcmoo commented Dec 3, 2017

in above code:
i don't know why it didn't show the part, that just very basic codes from documentation and paste that in too.

@chenjh
Copy link

chenjh commented Dec 7, 2017

  1. Click on your project
  2. Go to Build Phases
  3. Go to Link Binary With Libraries
  4. Add libAirMaps.a
  5. Run the project
    This work for me.

@alvelig
Copy link
Contributor

alvelig commented Dec 9, 2017

I recently made a fresh example build with pods and GoogleMaps with no issues.
https://github.com/alvelig/react-native-maps-pods-example.
Try to check it out or build through the README.MD. If it does not help, let me know.

@alvelig alvelig closed this as completed Dec 9, 2017
@jiteshwadia
Copy link

jiteshwadia commented Feb 15, 2018

@alvelig , I am following the steps according to the README.MD.

Error I got while - Pod install

Analyzing dependencies
Fetching podspec for `React` from `../node_modules/react-native`
Fetching podspec for `react-native-google-maps` from `../node_modules/react-native-maps`
Fetching podspec for `react-native-maps` from `../node_modules/react-native-maps`
Fetching podspec for `yoga` from `../node_modules/react-native/ReactCommon/yoga/yoga.podspec

[!] CocoaPods could not find compatible versions for pod "GoogleMaps":
  In Podfile:
    GoogleMaps

    react-native-google-maps (from `../node_modules/react-native-maps`) was resolved to 0.20.1, which depends on
      GoogleMaps (= 2.5.0)

Specs satisfying the `GoogleMaps, GoogleMaps (= 2.5.0)` dependency were found, but they required a higher minimum deployment target.

Below is my Pod file contents:

# Uncomment the next line to define a global platform for your project

platform :ios, '8.0'

target 'TestProject' do
  rn_path = '../node_modules/react-native'

    pod 'yoga', path: "#{rn_path}/ReactCommon/yoga/yoga.podspec"
    pod 'React', path: rn_path, subspecs: [
      'Core',
      'RCTActionSheet',
      'RCTAnimation',
      'RCTGeolocation',
      'RCTImage',
      'RCTLinkingIOS',
      'RCTNetwork',
      'RCTSettings',
      'RCTText',
      'RCTVibration',
      'RCTWebSocket',
      'BatchedBridge'
    ]

    pod 'GoogleMaps'  # Remove this line if you don't want to support GoogleMaps on iOS
    pod 'react-native-maps', path: '../node_modules/react-native-maps'
    pod 'react-native-google-maps', path: '../node_modules/react-native-maps'  # If you need GoogleMaps support on iOS

  end

post_install do |installer|
  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
    if target.name == "React"
      target.remove_from_project
    end
  end
end


I tried changing ios version from 8.0 to 11.0, but still got the error.
Should I file this as new issue.

@rborn
Copy link
Collaborator

rborn commented Feb 15, 2018

@jiteshwadia try a pod update

@jiteshwadia
Copy link

@rborn , It Worked. Thanks !!

@TheoGit
Copy link

TheoGit commented Mar 29, 2018

Helped me tremendously - thanks

@noumanDev
Copy link

@TheoGit which solution worked for you?

@TheoGit
Copy link

TheoGit commented Apr 2, 2018

@jiteshwadia solution with the coco Pods, sadly now my Permissions and Orientation packages don't work - I'm going to delete my Node_Modules and use my package.json from a previous project - good luck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests