Saturday, June 22, 2024
HomeiOS Developmentios - Xcode: Did not Construct - Unable to learn Google Service...

ios – Xcode: Did not Construct – Unable to learn Google Service plist at path


My total venture was working superb till MacOS 14.5 and Xcode 15.4. Nonetheless when making an attempt to construct the app now I get the next

Unable to learn Google Service plist at path
discover: dSYM_directory: No such file or listing

I’ve gone by the next steps.

Step 1)

  • Obtain google-service.plist from Firebase.
  • Add to venture folder, verify goal.
  • Add to Goal > Construct Settings > Copy Bundle Sources

Errors:

Unable to learn Google Service plist at path /Customers/approot/Shared/GoogleService-Data.plist


discover: dSYM_directory: No such file or listing


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

Step 2) Guarantee File Permissions:

Confirm that the GoogleService-Data.plist file has the right permissions.

chmod 644 /Customers/approot/Shared/GoogleService-Data.plist

Step 3) Create a brand new “Run Script Section” to repeat the file

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

echo "Supply path: $SRC"
echo "Vacation spot 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 discovered: $SRC"
    exit 1
fi

Step 4) Examine File System Entry:

Be certain that Xcode has full disk entry. This may typically resolve sandbox-related points.
Go to System Preferences > Safety & Privateness > Privateness tab.
Choose Full Disk Entry and ensure Xcode is added to the listing of purposes with full disk entry.

enter image description here

Step 5) Examine Derived Knowledge:

Delete the derived knowledge folder.
Instance Run Script Section with Debugging

Right here’s an enhanced model of the script to incorporate extra detailed debugging info:

bash
Copy code
#!/bin/bash

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

echo "Supply path: $SRC"
echo "Vacation spot 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 discovered: $SRC"
    exit 1
fi

Step 6) Restart Xcode

  • Re-indexed Challenge
  • Closed Xcode
  • deleted derived knowledge
  • reopened the venture to permit
  • Reinstalled packaages
  • Reinstall Xcode
  • Restart MacOS
  • Bounce out a window

I’ve repeated these steps 250+ instances, the file is within the venture, it has the goal checked, I’ve added to bundle assets, it actually labored earlier than updating macOS. I even have the earlier iOS construct uploaded to AppStoreConnect, we simply wanted newest model and add MacOS app.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments