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

iOS 11.3 XCode 9.3 (9E145) don't build #18638

thedevdavid opened this issue Mar 31, 2018 · 46 comments

iOS 11.3 XCode 9.3 (9E145) don't build #18638

thedevdavid opened this issue Mar 31, 2018 · 46 comments
Platform: iOS iOS applications. Resolution: Fixed A PR that fixes this issue has been merged. Resolution: Locked This issue was locked by the bot.


Copy link

thedevdavid commented Mar 31, 2018

I've updated XCode to 9.3 (9E145) and iPhone X to 11.3 and now my project isn't building. It doesn't work with iOS 11.2 simulator too. But it works with react-native run-ios

OS: macOS High Sierra 10.13.4
Node: 9.2.0
Yarn: 1.5.1
npm: 5.8.0
Watchman: 4.9.0
Xcode: Xcode 9.3 Build version 9E145
Android Studio: 3.0 AI-171.4443003

Packages: (wanted => installed)
react: 16.0.0-beta.5 => 16.0.0-beta.5
react-native: 0.49.5 => 0.49.5

Steps to Reproduce

Update iDevice and Xcode then try to build.

Expected Behavior

Build success

Actual Behavior

Build fails.

/Users/*****/node_modules/react-native/Libraries/Text/RCTTextField.m:131:108: Values of type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead

RCTLogWarn(@"Native TextInput(%@) is %zd events ahead of JS - try to make your JS faster.", self.text, eventLag);

Enum values with underlying type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead

Sometimes it's RCTImage, RCTImageCache, etc..

Copy link

Thanks for posting this! It looks like your issue may refer to an older version of React Native. Can you reproduce the issue on the latest release, v0.54?

Thank you for your contributions.

Copy link

Jemian commented Apr 1, 2018

This is my problem, too. I have xcode 9.2 and ios 11.3. I am too new at coding to know how to post an error message. Sorry.

This picture is the error message I receive.
"Could not locate device support files.

This iPad Pro (9.7 inch)(Model A1674, A1675) is running iOS 11.3(15E216) which may not be supported by this version of Xcode."

I'm hoping to learn a work-around.

Copy link

Same problem. I just updated Xcode to 9.3(9E145) and the same errors occur when I try to archive. Different part is building for simulator is fine, but only archive or building for generic iOS device have the problem.
I was about to submit a build, but suddenly can't upload a new build to itunesconnect. =(
Any clue?

Copy link

ken-talkingsource commented Apr 2, 2018

Same problem.
react-native version: "0.42.0"
Xcode: 9.3(9E145)
Many type error happened with RCTLogWarn ?

Copy link

fenglu09 commented Apr 2, 2018

Same problem.
react-native version: 0.43.2
If i open my project with Xcode 9.2 it was built success. Open with Xcode: 9.3 was built failed with error.

Copy link

Same problem.
react-native version: 0.46.4
Xcode 9.2 was built success, Xcode 9.3 was built failed.

Copy link

dangjian commented Apr 2, 2018

Sam problem.
react-native: 0.47.2
xCode 9.3

Copy link

philly25 commented Apr 2, 2018

Yes, problem appears only when trying to make Product -> Archive.

RN: 0.46.4
Xcode 9.3

I have other error:

/node_modules/react-native/Libraries/Image/RCTImageCache.m:28:55: Enum values with underlying type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead

Copy link

teyou commented Apr 2, 2018

RN 0.49.3
Xcode 9.3
have the same issue

/node_modules/react-native/Libraries/Image/RCTImageCache.m:28:55: Enum values with underlying type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead

UPDATED SOLUTION (choose 1 from below)

  1. downgrade to XCode 9.2
  2. Upgrade to latest RN version
  3. manually apply the patch on multiple NSString stringWithFormat method which has %zd format

change %zd to %lld and add (long long) into respective format
link to sample patch:


return [NSString stringWithFormat:@"%@|%g|%g|%g|%zd|%@",
imageTag, size.width, size.height, scale, resizeMode, responseDate];

after apply patch:

return [NSString stringWithFormat:@"%@|%g|%g|%g|%lld|%@",
imageTag, size.width, size.height, scale, (long long)resizeMode, responseDate];

Copy link

peteroid commented Apr 2, 2018

Having the same issue with the same env of @teyou

At the end I downgraded the Xcode to 9.2 to archive the app. I just wondered why Apple doesn't mention this such breaking change in the release note of Xcode 9.3.

Xcode 9.2

Copy link

mickey13 commented Apr 2, 2018

@teyou Thanks for that. Updating React Native to the latest version breaks my iOS (and Android) build for a new set of reasons. I may need to use your suggestion.

Copy link

bsiddiqui commented Apr 2, 2018

@mickey13 you can also downgrade xcode.

I've been using the xcode beta when building the app through simulator and using an older version when archiving with xcode. It's annoying but a decent fix until you have time to upgrade react-native.

Copy link

hramos commented Apr 2, 2018

Has anyone reproduced this in 0.54?

Copy link

I use @teyou 's solution 3 and modified about 3 ~ 4 files
Built successfully.

Copy link

dangjian commented Apr 3, 2018

@peteroid thank you for the solution. It is a high risk to upgrade the RN version. For now, downgrading to Xcode 9.2 is the best solution.

Copy link

@hramos I had a similar issue with 0.47 and after upgrading to 0.54 the build works.

Copy link

Yeah cool, dowgrade to Xcode 9.2 works. Thanks for the solution.

Copy link

@hramos Maybe this guy is on 0.54.4 and same issue? #18650

Copy link

ocarreterom commented Apr 3, 2018

@hramos I don't have any problems on RN 0.54.4 running on iOS 11.3 with Xcode 9.3 (9E145)

Copy link

fmoessle commented Apr 3, 2018

I had the same issue using RN 0.47

Try to upgrade your RN Version via this guide:

@hramos hramos closed this as completed Apr 3, 2018
@hramos hramos added the Resolution: Fixed A PR that fixes this issue has been merged. label Apr 3, 2018
Copy link

any workaround for older versions? (besides downgrading xcode)

Copy link

nmolkeri commented Apr 6, 2018

I work on a company product, I am then releasing the app so Ic an downgrade the Xcode to 9.2 and make a work around for it. But what about other developers at different location? They are gonna think I messed up the code as I am the one releasing the code. Also my company has policy to not upgrade the RN version from 0.44.3 to any higher version. This is gonna be hassle.

Copy link

@andrejunges You can use XCode quick fix tool (tap on the red circle).

Copy link

skaan commented Apr 7, 2018

Just quick fixing with xcode solved this for me, thanks!!

Copy link

jeffzing commented Apr 8, 2018

now i take the downgrade solution,keep watching

Copy link

navata commented Apr 9, 2018

We must downgrade Xcode
Don't have any solution?

Copy link

afdhald commented Apr 9, 2018

try this:

RCTLogWarn(@"Native TextInput(%@) is %ld events ahead of JS - try to make your JS faster.", self.text, (long)eventLag);

Copy link

Upgrading the react-native: 0.49.3 to react-native: 0.55.2, now it working.

Copy link

navata commented Apr 11, 2018

I try to upgrade RN 0.47 to RN 0.5x. But It have many issues and not working with other library old. Do you have this issue?!

Copy link

I had merge conflict in android_manifest and a file that contain the numbers of build/certificates in iOS. I resolved this conflicts and now the iOS build works.

Copy link

Obooman commented Apr 13, 2018

I tried update react-native from 0.48 to 0.54, everything seems fine - NO errors should be fixed.
If there are errors with third-party dependencies, don't forget to update them to the latest version.

Copy link

To make @teyou's third solution work, I also had to cast eventLag to long in RCTTextView.m:238, RCTTextField.m:93 and RCTTextInput.m:90 (i.e. replace eventLag by (long)eventLag)

Copy link

with React Native 0.55 it's ok 👍

Copy link

@teyou's third solution + @antoinerousseau additions worked for me.
Thank you guys!

Copy link

chetstone commented Apr 15, 2018

Yes it's risky to patch RN but it's a little safer if you create a patch script that's run in npm/yarn postinstall. That way, if you have to reinstall RN your patches will be automatically applied.

In package.json add:
"postinstall": "bin/"

The patch script and data are in my gist.

Note that I'm patching RN 0.33 so my patch file may not work on your version. Some of the changes are the same as mentioned above, some are different.

I'm still stuck on RN 0.33 because I still support iOS 7. And I can't downgrade to Xcode 9.2 because my test device is already on iOS 11.3 (I sent in the phone for a battery replacement and it came back with the upgrade).

Thanks @teyou, @antoinerousseau and @edencakir .

I forgot to mention how to create the patch file, which you'll need to do, since you probably can't use mine.

With a clean react-native:

cd node_modules
cp -pr react-native react-native.orig

Then build with xcode, click on the little red dot, fix the error, and repeat till you've fixed all these casting errors. Then:

diff -Naur --exclude='*.plist' react-native.orig react-native > ../notes/rn33.3x.patch

Copy link

Thanks @chetstone for the tips on the patch -- works like a charm!

Copy link

yuyao110120 commented Apr 18, 2018

RN 0.54.2 and 0.55.3

Xcode 9.3 archive success.

But when export archive select certificate, show error 'Profile doesn't include the beta-reports-active entitlement.'

Xcode 9.2 no problem.

Copy link

franj0 commented Apr 19, 2018

Hi guys, I had same issue.
Try next steps:

  1. Close all js http://localhost:8081/debugger-ui in browser
  2. Open incognito/private window of browser
  3. Put app under debug mode(debug JS Remote)
  4. Clean project in xCode cmd+shift+k
  5. Archive

It's wierd solution, but wors for me, ty


Copy link

navata commented Apr 20, 2018

Hi all,
Do we must to upgrade RN for this issue?
No anything solution other ?

Copy link

franj0 commented Apr 20, 2018

@navata did u try my solution 'couz I did't upgrade RN

Copy link

In Xcode just hover the error line and then you will find FIX button press it and re-Archive.

Etheryte pushed a commit to Etheryte/react-native that referenced this issue Apr 24, 2018
Copy link

wkwyatt commented Apr 26, 2018

@peteroid How do you find Xcode version 9.2 in that link you posted?

Copy link

navata commented Apr 26, 2018

@wkwyatt you can find in (login with account Apple developer)

Copy link

I confirm @areeb111 solution (and thank him): simply let xcode fix the issues in native code.

Then ensure closing previously running react-native server (react-native start) before starting after xcode auto-fixes

Copy link

need help, I upgrade RN 0.46.4 to 0.54 and it gives so many errors like; react-native-impelementations (on checkbx) etc.

is there any solution without updating react native?
I'm gonna kill myself now

Copy link

Mine seems to archive after update to 9.3.1

@facebook facebook locked as resolved and limited conversation to collaborators May 17, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Apr 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Platform: iOS iOS applications. Resolution: Fixed A PR that fixes this issue has been merged. Resolution: Locked This issue was locked by the bot.
None yet

No branches or pull requests