2
votes

enter image description here

error code message is

Values of type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead Replace '%zd events ahead of JS - try to make your JS faster.", self.text, ' with '%ld events ahead of JS - try to make your JS faster.", self.text, (long)'

My package.json file is as follows.

{
"name": "*****",
"version": "****",
"private": true,
"scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
},
"dependencies": {
    "firebase": "^5.0.4",
    "moment": "^2.20.1",
    "prop-types": "^15.6.0",
    "react": "^16.0.0-alpha.12",
    "react-addons-update": "^15.6.2",
    "react-moment": "^0.6.9",
    "react-native": "^0.48.4",
    "react-native-camera": "^1.1.4",
    "react-native-check-box": "^2.0.2",
    "react-native-communications": "^2.2.1",
    "react-native-device-info": "^0.13.0",
    "react-native-elements": "^0.18.5",
    "react-native-facebook-login": "^1.6.0",
    "react-native-fcm": "^10.0.3",
    "react-native-gifted-chat": "^0.4.3",
    "react-native-image-crop-picker": "^0.18.2",
    "react-native-image-picker": "^0.26.7",
    "react-native-image-zoom-viewer": "^2.0.20",
    "react-native-keyboard-aware-scroll-view": "^0.4.3",
    "react-native-keyboard-spacer": "^0.4.1",
    "react-native-maps": "^0.17.1",
    "react-native-modal": "^4.1.1",
    "react-native-modal-selector": "0.0.24",
    "react-native-permissions": "^1.0.6",
    "react-native-progress": "^3.4.0",
    "react-native-simple-radio-button": "^2.7.2",
    "react-native-snap-carousel": "^3.5.0",
    "react-native-splash-screen": "^3.0.6",
    "react-native-swiper": "^1.5.13",
    "react-native-vector-icons": "^4.5.0",
    "react-navigation": "^1.0.0-beta.27",
    "react-redux": "^5.0.6",
    "redux": "^3.7.2",
    "redux-persist": "^5.5.0",
    "redux-thunk": "^2.2.0"
},
"devDependencies": {
    "babel-jest": "21.2.0",
    "babel-preset-react-native": "4.0.0",
    "jest": "21.2.1",
    "react-test-renderer": "16.0.0"
},
"jest": {
    "preset": "react-native"
},
"build:ios": "react-native bundle --entry-file='index.ios.js' --bundle-output='./ios/luxlabUser/main.jsbundle' --dev=false --platform='ios' --assets-dest='./ios'"

}

I was able to build normally in version 9.2 of xcode. However, since version 9.2 does not support builds of iOS 11.4, I upgraded the xcode version. I have been doing my build failure since then.

thanks.

2

2 Answers

1
votes

This was a simple matter..

Just click xcode fix button

1
votes

This should only be a problem if you are using less than RN 0.56 but have updated XCode to 9+. This issue was fixed I am thinking in RN 0.56 because they call out XCode 9 as min version in the releases - https://github.com/react-native-community/react-native-releases/blob/master/CHANGELOG.md#xcode-9-is-now-the-minimum-required-version

I found the fix button (re: react native ios build is failed after update xcode to 9.4. error is Values of type 'NSInteger'), but I have to run build everytime and when I get these errors I have to find and press the fix button. There were just I think 2 places where this needed to happen, but it would have been nicer if it possible to find all these places rather then build then fix one error then repeat build till no more.

It apparently has to do with %zd needing to be %ld and casing to long.

Here is the fix button:

  1. Click the red dot:

  2. Fix button appears:

  3. It reformats with the fix: