Leminur
Leminur

Reputation: 361

Libraries stopped working after Xcode updated. React Native 0.62.2

I had trouble when updating Mac data. After I updated to a certain Mac Version, Spotlight stopped working when using the emulator. That was solved after some time. However, after I updated XCode, some libraries in my app that worked previously stopped working, even images, as it shows in the picture below. Error Description (There should be a calendar component like this, also there are styles problems.)

I have searched for some ways to solve this trouble. I have tried this method as shown in this reply. This solved the image not being shown problem, however, the other libraries are having the same trouble, and I don't how to solve them. I don't know what I could post here besides the package.json dependencies:


  "dependencies": {
    "@react-native-community/async-storage": "^1.11.0",
    "@react-native-community/datetimepicker": "^2.4.2",
    "@react-native-community/masked-view": "^0.1.10",
    "@react-native-community/picker": "^1.6.1",
    "@react-native-firebase/app": "^7.3.0",
    "@react-native-firebase/auth": "^8.0.7",
    "@react-native-firebase/database": "^7.2.4",
    "@react-native-firebase/firestore": "^7.2.1",
    "@react-native-firebase/storage": "^7.1.5",
    "@react-navigation/bottom-tabs": "^5.5.0",
    "@react-navigation/drawer": "^5.8.0",
    "@react-navigation/material-top-tabs": "^5.2.8",
    "@react-navigation/native": "^5.4.3",
    "@react-navigation/stack": "^5.4.0",
    "geolib": "^3.3.1",
    "jsc-android": "^241213.1.0",
    "luxon": "^1.24.1",
    "native-base": "^2.13.12",
    "react": "16.13.1",
    "react-native": "0.62.2",
    "react-native-fast-image": "^8.3.2",
    "react-native-flags": "^1.0.0",
    "react-native-gesture-handler": "^1.6.1",
    "react-native-image-slider-box": "^1.0.12",
    "react-native-image-zoom-viewer": "^3.0.1",
    "react-native-maps": "^0.27.1",
    "react-native-reanimated": "^1.9.0",
    "react-native-safe-area-context": "^1.0.2",
    "react-native-screens": "^2.8.0",
    "react-native-simple-radio-button": "^2.7.4",
    "react-native-tab-view": "^2.14.2",
    "react-native-vector-icons": "^6.6.0",
    "react-native-view-pdf": "^0.11.0",
    "react-redux": "^7.2.0",
    "redux": "^4.0.5",
    "redux-thunk": "^2.3.0"
  },
  "devDependencies": {
    "@babel/core": "7.9.6",
    "@babel/runtime": "7.9.6",
    "@react-native-community/eslint-config": "1.1.0",
    "babel-jest": "26.0.1",
    "eslint": "7.0.0",
    "jest": "26.0.1",
    "metro-react-native-babel-preset": "0.59.0",
    "react-test-renderer": "16.13.1"
  },
  "jest": {
    "preset": "react-native"
  }

Is there a way to get the libraries to work? I really appreciate the time! Thanks!

Upvotes: 3

Views: 586

Answers (3)

Leminur
Leminur

Reputation: 361

I have tried to clean install and make the project as clean as possible. However, after I uninstalled Xcode from the iOS Store, and installed directly from their website, the code went back normal again. I am using version 11.7, and Xcode was the reason why my code did not work. What a mess.

I appreciate the help of the people around here! Thank you so much!

Upvotes: 1

sebastianf182
sebastianf182

Reputation: 9978

Delete your node_modules, and before doing a clean install, remove ALL the carets from the package.json. That will install those exact versions. What you have now, might trigger the install of a newer version of a dependency that "should" not break anything, but I found that most of the time, this is what breaks my build.

So every "dependency: ^1.2.3" becomes "dependency: 1.2.3"

Upvotes: 0

Vivek Verma
Vivek Verma

Reputation: 551

You can try to re install the node modules and run pod install inside ios directory.

  1. Delete node_modules/ folder
  2. run yarn install or npm install in root directory.
  3. run pod install inside ios directory.

If still issue is not resolved the you can try clearing your derived data on Xcode.

Go to Xcode => Preferences => Locations & click on arrow in front of /Xcode/DerivedData and then delete the derived data folder and restart your xcode.

Upvotes: 1

Related Questions