Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to Build - Unable to read Google Service plist at path

Tags:

xcode

ios

My entire project was working fine until I updated Firebase to 10.27.00 & MacOS 14.5, I'm using Xcode 15.4. When trying to build the app now I get the following

Unable to read Google Service plist at path
find: dSYM_directory: No such file or directory

I have gone through the following steps.

Step 1)

  • Download google-service.plist from Firebase.
  • Add to project folder, check target.
  • Add to Target > Build Settings > Copy Bundle Resources

Errors:

Unable to read Google Service plist at path /Users/approot/Shared/GoogleService-Info.plist


find: dSYM_directory: No such file or directory


Sandbox: cp(38870) deny(1) file-read-data /Users/approot/Shared/GoogleService-Info.plist

Step 2) Ensure File Permissions:

Verify that the GoogleService-Info.plist file has the correct permissions.

chmod 644 /Users/approot/Shared/GoogleService-Info.plist

Step 3) Create a new "Run Script Phase" to copy the file

bash
Copy code
SRC="${SRCROOT}/Shared/GoogleService-Info.plist"
DEST="${BUILT_PRODUCTS_DIR}/${EXECUTABLE_NAME}.app/GoogleService-Info.plist"

echo "Source path: $SRC"
echo "Destination path: $DEST"

if [ -f "$SRC" ]; then
    echo "Copying $SRC to $DEST"
    cp "$SRC" "$DEST"
    if [ $? -ne 0 ]; then
        echo "Error copying file."
        exit 1
    fi
else
    echo "File not found: $SRC"
    exit 1
fi

Step 4) Check File System Access:

Ensure that Xcode has full disk access. This can sometimes resolve sandbox-related issues. Go to System Preferences > Security & Privacy > Privacy tab. Select Full Disk Access and make sure Xcode is added to the list of applications with full disk access.

enter image description here

Step 5) Check Derived Data:

Delete the derived data folder. Example Run Script Phase with Debugging

Here’s an enhanced version of the script to include more detailed debugging information:

bash
Copy code
#!/bin/bash

SRC="${SRCROOT}/Shared/GoogleService-Info.plist"
DEST="${BUILT_PRODUCTS_DIR}/${EXECUTABLE_NAME}.app/GoogleService-Info.plist"

echo "Source path: $SRC"
echo "Destination path: $DEST"

if [ -f "$SRC" ]; then
    echo "File exists. Copying $SRC to $DEST"
    cp "$SRC" "$DEST"
    if [ $? -ne 0 ]; then
        echo "Error copying file."
        exit 1
    fi
else
    echo "File not found: $SRC"
    exit 1
fi

Step 6) Restart Xcode

  • Re-indexed Project
  • Closed Xcode
  • deleted derived data
  • reopened the project to allow
  • Reinstalled packaages
  • Reinstall Xcode
  • Restart MacOS
  • Jump out a window

I've repeated these steps 250+ times, the file is in the project, it has the target checked, I've added to bundle resources, it literally worked before updating macOS. I even have the previous iOS build uploaded to AppStoreConnect, we just needed latest version and upload MacOS app.

like image 853
RileyDev Avatar asked Feb 01 '26 07:02

RileyDev


1 Answers

Open XCode go to runner select GoogleService-info select fullpath in ios/runner/GoogleService-info

enter image description here

like image 150
Deniz Durmaz Avatar answered Feb 03 '26 21:02

Deniz Durmaz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!