Skip to content

[iOS][v0.40] Unable to archive - React/RCTDefines.h file not found #12265

Closed
@ggordan

Description

@ggordan

Description

I am currently having issues archiving the application. The issue only occurs when attempting to archive, running in debug mode works just fine. Possibly related to #12042.

When attempting to archive the app the following occurs:

screenshot 2017-02-07 17 26 00

Was wondering whether anyone has come across this, and if there are any solutions. I've attempted various things, including solutions mentioned in #12042 however my knowledge of iOS development is minimal.

Additional Information

  • React Native version: 0.40
  • Platform: iOS only
  • Operating System: MacOS

Activity

zibs

zibs commented on Feb 7, 2017

@zibs

@ggordan Following most of these steps just solved my problem with this error: http://imgur.com/a/KUOQC - in particular step 2.

Thanks to @skellock for posting.

ggordan

ggordan commented on Feb 8, 2017

@ggordan
Author

Thanks for the suggestion @zibs . Unfortunately, none of those steps seem to have worked. The file not found error changes from time to time. Right now it's something different, though the app builds and runs just fine.

screenshot 2017-02-08 10 00 41

freakinruben

freakinruben commented on Feb 8, 2017

@freakinruben

Is DEAD_CODE_STRIPPING disabled for all your targets?

skellock

skellock commented on Feb 8, 2017

@skellock
Contributor

Do you have any 3rd party libs installed that haven't been upgraded?

ggordan

ggordan commented on Feb 8, 2017

@ggordan
Author

@freakinruben DEAD_CODE_STRIPPING is disabled for Debug and Release.

@skellock All third party libraries have been upgraded, and the issue appears to be coming from within react-native libraries. Maybe it could be an issue with 3rd party libraries, but I imagine that in that scenario I wouldn't be able to build and run the app, which isn't the case.

freakinruben

freakinruben commented on Feb 8, 2017

@freakinruben

The fact that it happens not all the time is even more strange.. But debugging this is a pain in the butt, I ended up throwing away the xcode project, workspace and schemes and recreating them, without much luck the first few tries.
Did you try deleting node_modules and downloading them again, making sure the ^ of the specified versions doesn't mess with the versions you want from npm?

skellock

skellock commented on Feb 8, 2017

@skellock
Contributor

@ggordan I've seen Xcode fail with that error before (blaming wrong lib) when I've had a 3rd party lib not upgraded AND when i've missed the new import statements up at my app level (both in the app & default test).

freakinruben

freakinruben commented on Feb 10, 2017

@freakinruben

@ggordan Just found this solution which fixed issues for me with archiving a release with a different build-name than 'release'

skellock

skellock commented on Feb 10, 2017

@skellock
Contributor

@freakinruben thx for closing the loop! Something about Xcode was definitely off. I remember being able to compile in Xcode, but not the command line at one point. If I had hair left, I'd tear it out.

ggordan

ggordan commented on Feb 14, 2017

@ggordan
Author

@freakinruben Thanks a lot for that. Managed to get it to archive

SamSaffron

SamSaffron commented on Feb 15, 2017

@SamSaffron

FWIW, I have $300 on the table for anyone that can figure out how to upgrade DiscourseMobile per:

https://discuss.reactjs.org/t/having-a-hell-of-a-time-upgrading-from-react-native-39-to-40/6331

nihgwu

nihgwu commented on Feb 15, 2017

@nihgwu
Contributor

@SamSaffron I'd like to help if no one else do that, I'm always using the bleeding edge version of React Native

SamSaffron

SamSaffron commented on Feb 15, 2017

@SamSaffron

@nihgwu sounds like a plan, should I update that topic to say that you are taking this? any timeframe?

nihgwu

nihgwu commented on Feb 15, 2017

@nihgwu
Contributor

Ok, I'll done in an hour or two, I suppose

10 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @SamSaffron@skellock@ggordan@freakinruben@zibs

        Issue actions

          [iOS][v0.40] Unable to archive - React/RCTDefines.h file not found · Issue #12265 · facebook/react-native