firebase-ios-sdk: Xcode15 Beta1: Firebase iOS SDK: Unable to process Info.plist during build process

Description

Environment

  • Xcode version: Xcode15 Beta1
  • Firebase Component: Crashlytics
  • Installation method: Swift Package Manager (SPM)
  • Firebase SDK version: 10.4.0

Problem

During the build process of my iOS application, I encountered an error related to processing the Info.plist file.

Here is the error message: error: Info.plist Error Unable to process Info.plist at path /Users/...../Info.plist This could be a timing issue, make sure the Firebase run script build phase is the last build phase and no other scripts have moved RakutenIchiba.app from the location Xcode generated it. You can also add '$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)' as an "Input Files" dependency for your Firebase run script build phase.

Reproducing the issue

Steps to Reproduce

  1. [Add the steps you take to reproduce the issue. This could be setting up a new project, adding Firebase via SPM, adding a Run Script phase, etc.]

What I’ve tried

  • I’ve checked the order of Build Phases to make sure the Run Script phase for Firebase is the last phase.
  • I’ve verified the location and reference of the Info.plist file.
  • I’ve cleaned the project and cleared the derived data.
  • [Add any other troubleshooting steps you’ve tried.]

Despite these attempts, the issue persists. Any guidance or suggestions to resolve this would be appreciated.

Thank you.

Firebase SDK Version

10.4.0

Xcode Version

15.0 Beta1

Installation Method

Swift Package Manager

Firebase Product(s)

Crashlytics

Targeted Platforms

iOS

Relevant Log Output

No response

If using Swift Package Manager, the project’s Package.resolved

Expand Package.resolved snippet

Replace this line with the contents of your Package.resolved.

If using CocoaPods, the project’s Podfile.lock

Expand Podfile.lock snippet

Replace this line with the contents of your Podfile.lock!

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 1
  • Comments: 35 (12 by maintainers)

Most upvoted comments

When supplying the input files to the run phase as per the documentation, Xcode 15 Beta 1 produces the error:

Cycle inside […]; building could produce unreliable results.

Xcode seems to use what you put in the input files to determine the build order. When I move the input files into the script itself, the error goes away but the above problem mentioned in this GitHub issue appears together with the warning:

DEBUG_INFORMATION_FORMAT should be set to dwarf-with-dsym for all configurations. This could also be a timing issue, make sure the Firebase run script build phase is the last build phase and no other scripts have moved the dSYM from the location Xcode generated it. Unable to process […].app.dSYM at path /Users/[…]/Library/Developer/Xcode/DerivedData/[…]/Build/Products/[…]/[…].app.dSYM

What seems to be happening is that both the Info.plist and dSYM file are first put in place after a successful build. The files are not there after a clean build producing the error but they first appear when building with the Crashlytics script commented out. This would mean that the script will always be one build behind and, in case of a clean build, will not not have either of the files available.

I’ve found the setting that’s causing the issue:

In Xcode 15, it looks like User Script Sandboxing is set to YES by default (it was set to NO by default in Xcode 14).

To workaround this issue, you can manually set it to NO: Screenshot 2023-06-07 at 11 29 52 AM

When I set it to NO, my run script succeeds.

I want to figure out if there’s a way to set certain files as being accessibly by the Run Script.

@pavm035 sorry for the delay. That warning is unrelated, but you should just be able to update your project settings based on the warning and it will go away 👍

@srclima if you’re running into issues, you may check out this related issue that we need Apple’s help to fix: https://github.com/firebase/firebase-ios-sdk/issues/11471

Closing this for now. For issues related to Xcode 15 that aren’t plist related, feel free to check out the above issue or open a new one.

@pavm035 and others, I’ve uploaded a new build of upload-symbols to resolve these issues https://github.com/firebase/firebase-ios-sdk/pull/11463. Can you please try the new version of upload-symbols and see if it resolves your issues?

This version should

  1. Support non-embedded / no Info.plist files (by not reading them)
  2. Support User Script Sandboxing. You will need to update your Input Files or Input File Lists in your Run Script

Required Input Files:

$(BUILT_PRODUCTS_DIR)/$(UNLOCALIZED_RESOURCES_FOLDER_PATH)/GoogleService-Info.plist
$(BUILT_PRODUCTS_DIR)/$(EXECUTABLE_PATH)
${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}
${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}

For more information, see the PR description for https://github.com/firebase/firebase-ios-sdk/pull/11463

@samedson Here is the package settings Screenshot 2023-06-13 at 12 55 37

I have the same error message too.

In my case the Xcode 15 doesn’t copy the Info.plist to /Users/...../ aka /Users/{username}/Library/Developer/Xcode/DerivedData/{Scheme-...}/Build/Products/{...}-iphoneos/{App Name}.app/Info.plist.

Workaround by copying the Info.plist to the build folder /Users/...../{App Name}.app/ & rebuild.