0
votes

I am trying to get react-native-maps to work. I have followed these instructions react-native-maps but I am getting an error when running react-native run-ios, and dont know what is causing it.

package.json

{
  "name": "mobile",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
  },
  "dependencies": {
    "axios": "^0.18.0",
    "i": "^0.3.6",
    "npm": "^5.8.0",
    "prop-types": "^15.6.1",
    "react": "16.3.1",
    "react-native": "0.55.1",
    "react-native-drawer": "^2.5.0",
    "react-native-elements": "^0.19.1",
    "react-native-maps": "^0.21.0",
    "react-native-material-ui": "^1.22.1",
    "react-native-router-flux": "^4.0.0-beta.28",
    "react-native-sidebar": "^0.3.0",
    "react-native-vector-icons": "^4.6.0",
    "react-redux": "^5.0.7",
    "redux": "^3.7.2"
  },
  "devDependencies": {
    "babel-jest": "22.4.3",
    "babel-preset-react-native": "4.0.0",
    "jest": "22.4.3",
    "react-test-renderer": "16.3.1",
    "eslint-config-rallycoding": "^3.2.0"
  },
  "jest": {
    "preset": "react-native"
  },
  "rnpm": {
    "assets": [
      "./assets/fonts"
    ]
  }
}

The error looks like this:

The following build commands failed:

CompileC build/Build/Intermediates.noindex/mobile.build/Debug-iphonesimulator/mobile.build/Objects-normal/x86_64/AppDelegate.o mobile/AppDelegate.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (1 failure)

Installing build/Build/Products/Debug-iphonesimulator/mobile.app An error was encountered processing the command (domain=IXErrorDomain, code=13): Failed to get bundle ID from /Users/danieltuttle/project/code/frontend/traveler-mobile/ios/build/Build/Products/Debug-iphonesimulator/mobile.app Print: Entry, ":CFBundleIdentifier", Does Not Exist

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/mobile.app/Info.plist Print: Entry, ":CFBundleIdentifier", Does Not Exist

When I look at the mobile.app folder. I see that there is nothing there. No Info.plist. Nothing. Because this is the build folder, it seems like it should be created. Do I have to set it there?

Can sombody give a tip how to solve this? Thanks!

1
Make sure you have CFBundleIdentifier added in your info.plist - Aditya
The CFBundleIdentifier key exists in info.plist - Dan
Does it have a string associated with the key? - MattyK14
I upated the question. Sorry I was looking at the wrong info.plist before. - Dan
At minimum, add the steps you took to install react-native-maps and your package.json file. That CFBundleIdentifier error can show up for a ton of different reasons, so just the error will result in people suggesting many valid possible solutions, but it's all just going to be shots in the dark. - Michael Cheng

1 Answers

0
votes

I realized the problem in the image there is a + sign next to the @import statement and next to [GMSServices] ... It says add this line. So I took the whole line. But the problem was the + sign. I took it away then it worked.

enter image description here