Xcode "Failed to load Info.plist from bundle at path" during app installation to simulator

I’m migrating my app and it’s frameworks to SPM and Tuist. The app target builds successfully but then fails to install to the simulator with this error:

Failed to load Info.plist from bundle at path /Users/RElli9/Library/Developer/CoreSimulator/Devices/EEEF4E99-CCAF-4F14-89EC-DB7D98571257/data/Library/Caches/com.apple.mobile.installd.staging/temp.1kyxh8/extracted/NPOS.app/Frameworks/RetailCheckoutCapabilityImplementation.framework

RetailCheckoutCapabilityImplementation is one of our internal dependencies, it’s also been migrated to SPM. This error seems to be related to specifying this dependency as a dynamic framework in Tuist/Package.swift i.e.:

    let packageSettings = PackageSettings(
        productTypes: [
            // all of my frameworks listed here
            "RetailCheckoutCapabilityImplementation": .framework,

If I leave it as productTypes: [:] then it installs and runs. But I need to use dynamic frameworks because I’m running into duplicate symbol warnings from some 3rd-party binaries (among other reasons).

I’ve confirmed that the RetailCheckoutCapabilityImplementation.framework folder in DerivedData does indeed contain an Info.plist. The path in the error message seems to be temporary – the whole folder at com.apple.mobile.installd.staging is empty by the time this error appears. I can see it populated with a new temp.xxxx folder briefly but it doesn’t stick around long enough to see what it contains.

Could anyone help me troubleshoot this? I’m stumped on what to even try next. I didn’t find anything on this forum with this type of error, and my google searches are not turning up anything relevant.

Hey @rich.ellis :wave:

I have personally never seen this specific error as well.

Is this directory the bundle identifier of the app? Does the bundle identifier match what you would expect?

The generated RetailCheckoutCapabilityImplementation should be a regular target once generated … can you spot anything odd, focusing on the Info.plist?

What could also help is to try and create a more contained example – there must be something odd either about the app that uses the framework or the framework itself.

Alternatively, have you considered defining RetailCheckoutCapabilityImplementation with Project.swift instead of Package.swift? I’d be curious if that helps. If it does but you really wanna stick to Package.swift, you can again compare the two generated projects to understand the differences. xcdiff is a really useful tool to make those comparisons easier.

Thanks for the ideas. I’m currently trying to narrow it down by commenting out all frameworks and then adding them back in.

But while I do that, I’m curious about the suggestion to define the framework in Project.swift. RetailCheckoutCapabilityImplementation is an internal framework but it’s defined in a different repo, so I think I have to put that in Package.swift. But maybe I’m misunderstanding what you are suggesting?

I wasn’t aware it was in a different repository. In that case, yeah, you’ll need to stick to SwiftPM :+1: