10.1 C
Monday, December 18, 2023

ios – Xcode Error: GoogleService-Data.plist Can not Be Discovered Throughout Expo Construct – [React Native]

After spending a very good period of time troubleshooting this situation in my Xcode / React Native venture, I lastly cracked the issue associated to GoogleService-Data.plist not being present in my venture.

error: Construct enter file can't be discovered: '/Customers/expo/workingdir/construct/frontend/cellular/ios/GoogleService-Data.plist'. Did you neglect to declare this file as an output of a script section or customized construct rule which produces it?

The error was fairly annoying at first, however after some trial &. error, I managed to discover a working resolution.

  1. I opened my venture in Xcode.

  2. Launch Xcode and open your venture. Navigate to Your Goal’s Construct Phases.

  3. Click on on the venture file (the blue icon) on the high of the Undertaking Navigator. Choose your app’s goal from the record. Add or Edit a Run Script Part:

  4. Go to the “Construct Phases” tab.


If you have already got a script section that ought to produce GoogleService-Data.plist, click on on it to broaden and edit the script.

If you do not have a related script section, add one by clicking the ‘+’ button on the high left of the “Construct Phases” part, then select “New Run Script Part”.

  1. Within the script editor space, write or modify the script that generates or modifies GoogleService-Data.plist.


Be sure that the script writes the output file to the right location, usually to $(SRCROOT), $(BUILT_PRODUCTS_DIR), or $(TARGET_BUILD_DIR) relying in your venture construction and necessities.
Specify Output Recordsdata (Non-compulsory):


Beneath the script editor, you might even see an space to specify “Output Recordsdata” or “Output Recordsdata Record”.

Right here, you’ll be able to add the trail the place the script will place GoogleService-Data.plist. For instance:

  1. Enter the anticipated path of the GoogleService-Data.plist file, like:

    $(SRCROOT)/GoogleService-Data.plist // <-- If venture in Root PATH.

    or like

    $(SRCROOT)/path/to/GoogleService-Data.plist // <-- If venture in nested PATH.
  2. This step, whereas not obligatory, turned out to be fairly insightful for incremental builds. It’s a great way to let Xcode know when it must re-run the script.

  3. I then ran a brand new construct on my expo venture after cleansing my xcode construct folder.

Latest news
Related news


Please enter your comment!
Please enter your name here