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

fatal error: 'UIKit/UIUserActivity.h' file not found #25492

Closed
lehang123 opened this issue Jul 4, 2019 · 17 comments
Closed

fatal error: 'UIKit/UIUserActivity.h' file not found #25492

lehang123 opened this issue Jul 4, 2019 · 17 comments
Labels
Bug Resolution: Locked This issue was locked by the bot.

Comments

@lehang123
Copy link

lehang123 commented Jul 4, 2019

I just follow the step on the fackbook guide and try to run iOS with the awesome project

React Native version:
react-native-cli: 2.0.1
react-native: 0.60.0
Xcode version :
Version 9.4.1 (9F2000)

when I run react-native run-ios

info In file included from /Users/gonglehan/Desktop/WonderWorld/ProjectN/node_modules/react-native/Libraries/LinkingIOS/RCTLinkingManager.m:8:
/Users/gonglehan/Desktop/WonderWorld/ProjectN/node_modules/react-native/Libraries/LinkingIOS/RCTLinkingManager.h:10:9: fatal error: 'UIKit/UIUserActivity.h' file not found
#import <UIKit/UIUserActivity.h>
^~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

info

error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening ProjectN.xcworkspace. Run CLI with --verbose flag for more details.
** BUILD FAILED **

I tried finding this head file from xCode but I found nothing, and when I deleted the #import <UIKit/UIUserActivity.h> from the RCTLinkingManager file. It works fine, however whenever I do another npm install (for example new library or sth). The code come back, and i have to command it again.

@lehang123 lehang123 added the Bug label Jul 4, 2019
@kelset
Copy link
Contributor

kelset commented Jul 4, 2019

Can you check if you have pods installed correctly? It seems to me it's the same issue as #25480

Also, it seems that you are using an old version of Xcode - can you try and update to 10.2?

@lehang123
Copy link
Author

I tried to update the Xcode to 10.2 but it requires a higher macOS version. And for some reason my Mac doesn’t shows me the options to update, I’m currently in macOS 10.13: High Sierra

@lehang123
Copy link
Author

Can you check if you have pods installed correctly? It seems to me it's the same issue as #25480

Also, it seems that you are using an old version of Xcode - can you try and update to 10.2?

Thanks man ! it's like what you said, I updated Xcode to 10.2.1, then it works

@kelset
Copy link
Contributor

kelset commented Jul 4, 2019

cool :) thanks for letting me know :)

@kelset kelset closed this as completed Jul 4, 2019
@vijaykmittalmu
Copy link

Can you check if you have pods installed correctly? It seems to me it's the same issue as #25480
Also, it seems that you are using an old version of Xcode - can you try and update to 10.2?

Thanks man ! it's like what you said, I updated Xcode to 10.2.1, then it works

I was facing above-mentioned issue since last 3-4 days and we can also resolve this issue without update Xcode 10.2.1 because I was facing this issue when I create RN project with 0.60.0 RN version but if I create RN Project with another downgrade version like 0.59.4 then it's started working fine.

command use: react-native init project_name --version 0.59.4

@AnderLuiz
Copy link

Can you check if you have pods installed correctly? It seems to me it's the same issue as #25480
Also, it seems that you are using an old version of Xcode - can you try and update to 10.2?

Thanks man ! it's like what you said, I updated Xcode to 10.2.1, then it works

I was facing above-mentioned issue since last 3-4 days and we can also resolve this issue without update Xcode 10.2.1 because I was facing this issue when I create RN project with 0.60.0 RN version but if I create RN Project with another downgrade version like 0.59.4 then it's started working fine.

command use: react-native init project_name --version 0.59.4

Same problem here. v0.59 works but v0.60 does not work with Xcode 9.4.1.

I cannot upgrade to Xcode 10.2.1 because I m running on a Mac mini 2011.

@ben-pritchard
Copy link

I was able to resolve this without upgrading my Xcode (thank god, still using 9.3).

The build terminal output showed that there were 3 packages that I had linked manually that I needed to unlink (via: react-native unlink PACKAGE-NAME) so that the autolinking could work.

After running that command for the 3 packages I had linked manually, I ran an npm install and react-native run-ios and everything worked.

@SeanRenet
Copy link

SeanRenet commented Jul 24, 2019

I was facing above-mentioned issue since last 3-4 days and we can also resolve this issue without update Xcode 10.2.1 because I was facing this issue when I create RN project with 0.60.0 RN version but if I create RN Project with another downgrade version like 0.59.4 then it's started working fine.

command use: react-native init project_name --version 0.59.4

OMG This needs to be on the website. A whole day of googling and this is what worked. Fixed all the rando errors react was throwing.
.

@ankur-sardar
Copy link

Have you fixed this issue? Can anyone please tell me a solution for this? In my case, from XCode I can run the app but can not run the app from the command line (react-native run-ios)

@petheameya
Copy link

I am using Xcode 10.3 and I am also facing same issue

@leitom
Copy link

leitom commented Aug 5, 2019

works for me with: react-native init project_name --version 0.59.4

@s3vi26
Copy link

s3vi26 commented Aug 12, 2019

I was facing above-mentioned issue since last 3-4 days and we can also resolve this issue without update Xcode 10.2.1 because I was facing this issue when I create RN project with 0.60.0 RN version but if I create RN Project with another downgrade version like 0.59.4 then it's started working fine.
command use: react-native init project_name --version 0.59.4

OMG This needs to be on the website. A whole day of googling and this is what worked. Fixed all the rando errors react was throwing.
.

Seriously! Thank you for this!

@danielidt
Copy link

im unable to update my xcode version past 9.2, is there no other way around this??

@rajsuvariya
Copy link
Contributor

I have just created a project with react native version 0.60.4 and haven't done anything and if I try to run react-native run-ios it gives me this error. I am using xCode v9.3. I can not upgrade as this is the max version supported with my current mac os

@LAITONEN
Copy link
Contributor

Same with macOS 10.13.6, react-native 0.61.5, Xcode 9.4 (which is a minimum supported version according to the website)

@LAITONEN
Copy link
Contributor

Ok, I got it. Had issues setting-up a new project after not using React-Native for a lot of time.

My system:

  • macOS High Sierra 10.13.6
  • XCode 9.4

Had to reinstall the project in order to use the installation guide from version 0.59.0, because the installation guide from 0.61 uses approach with npx react-native ..., which disallows the usage of react-native below 0.60 (quite totalitarian). 0.59.0 was still using the global version of react-native installed through npm.

In other words:
Reinstall the project by removing the old one and use the steps mentioned in the "Getting Started" guide of React-Native 0.59.0 (or any other version compatible with your version of OS and XCode) to install your project again. No need to delete any build or node_modules or installing pods again and so forth, just pick the version of React-Native compatible with your macOS and Xcode (by downgrading and reinstalling the project until you get it) and no need to upgrade to the latest versions, they are developed for the latest systems, if you don't want to buy the latest devices to support the latest software (OS) or you can't afford them, just stay with the old ones - it's totally fine :)

@facebook facebook locked as resolved and limited conversation to collaborators Jul 4, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

15 participants