Is it Possible to Have Stray Content in a macOS Framework?

Is it possible to have some additional content at

Versions/A/

in a macOS Framework bundle that is not in any of the standard folders? Will there be any side-effects during signing and notarization? The reason is it'd be a lot easier in my use case to be able to put content here instead of the Resources folder.

Answered by DTS Engineer in 838438022

Always follow the rules in Placing Content in a Bundle. Quoting that doc:

If you put content in the wrong location, you may encounter hard-to-debug code signing and distribution problems. These problems aren’t always immediately obvious.

If you search the forums you’ll find dozens of threads from folks who aren’t following those rules and have indeed run into hard-to-debug code signing and distribution problems )-:

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Accepted Answer

Always follow the rules in Placing Content in a Bundle. Quoting that doc:

If you put content in the wrong location, you may encounter hard-to-debug code signing and distribution problems. These problems aren’t always immediately obvious.

If you search the forums you’ll find dozens of threads from folks who aren’t following those rules and have indeed run into hard-to-debug code signing and distribution problems )-:

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Hi! But how about Mac Catalyst? Should those rules also be followed?

Mac Catalyst apps have the same bundle structure as Mac apps.

On the subject of frameworks, I’ve seen folks using iOS-style ‘shallow’ frameworks on the Mac. That works, but it’s not something we support. I actually researched that while writing the initial version of Posting a Crash Report and our internal consensus was clear: Mac frameworks should use the Mac structure. It’s weird, but it’s better for all code for a given platform to use a consistent structure.

Oh, one place where you will see iOS-style frameworks on the Mac is if you run an iOS app directly on an Apple silicon Mac, that is, the iOS Apps on Mac feature. However, those follow a different path and we only support that structure on that path.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thanks for the reply.

Is it possible to have a macOS structured-framework but things like Versions/A/RandomStuff/whatever.txt?

That's since you said things like Stuff.framework/RandomStuff/whatever.txt is allowed, but is Stuff.framework/Versions/A/RandomStuff/whatever.txt allowed?

Written by johnzhou721 in 838916022
you said things like Stuff.framework/RandomStuff/whatever.txt is allowed … ?

You as in “Quinn”? Or you as in “Apple”? Either way, please provide more context for your statement.

But, regardless, whatever.txt, which is obviously not code, belongs in Versions/A/Resources/. It’s really that simple. I recommend that you avoid trying to get ‘clever’ here. As I mentioned above, a significant amount of my time here on the forums is spent trying to help Mac developers who’ve ignored the advice in Placing Content in a Bundle and are now regretting it.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Is it Possible to Have Stray Content in a macOS Framework?
 
 
Q