You can replace those (as you wish) as you mentioned in your question.
CommandGroup(replacing: .newItem) { EmptyView() }
or
CommandGroup(replacing: .newItem) { }
According to the document. You can’t modify or remove the Apple menu items as expected. Which is actually, perfectly reasonable.
The Apple menu, which is always the first item on the leading side of the menu bar, includes system-defined menu items that are always available. You can’t modify or remove the Apple menu
Best
You can check the Demo project under this repository, it's working. You need to compare it with your project's build settings.
https://github.com/gurhub/surmagic/tree/master/Demo
Also, you can use the surmagic tool to create your XCFrameworks for ease.
Alternatively
If you're doing this operation often, or if you wanted to automate (CI/CD) this process you can also use the CLI tool Surmagic https://github.com/gurhub/surmagic.
Not exactly what you ask I know, but here is another alternative on the command-line, maybe you can add to your CI line even (didn't try that). It's a Command Line Tool to create XCFrameworks:
https://github.com/gurhub/surmagic
Best
Alternatively, you can try a command-line tool to create XCFrameworks, check the library line below:
https://github.com/gurhub/surmagic
With this approach, you'll create a file (Surfile) - https://github.com/gurhub/surmagic#what-is-the-surfile one time only, then you can use it multiple times / forever.
Best
You can replace those (as you wish) as you mentioned in your question.
CommandGroup(replacing: .newItem) { EmptyView() }
or
CommandGroup(replacing: .newItem) { }
According to the document. You can’t modify or remove the Apple menu items as expected. Which is actually, perfectly reasonable.
The Apple menu, which is always the first item on the leading side of the menu bar, includes system-defined menu items that are always available. You can’t modify or remove the Apple menu
Best
You can check the Demo project under this repository, it's working. You need to compare it with your project's build settings.
https://github.com/gurhub/surmagic/tree/master/Demo
Also, you can use the surmagic tool to create your XCFrameworks for ease.
Alternatively
If you're doing this operation often, or if you wanted to automate (CI/CD) this process you can also use the CLI tool Surmagic https://github.com/gurhub/surmagic.
Not exactly what you ask I know, but here is another alternative on the command-line, maybe you can add to your CI line even (didn't try that). It's a Command Line Tool to create XCFrameworks:
https://github.com/gurhub/surmagic
Best
Alternatively, you can try a command-line tool to create XCFrameworks, check the library line below:
https://github.com/gurhub/surmagic
With this approach, you'll create a file (Surfile) - https://github.com/gurhub/surmagic#what-is-the-surfile one time only, then you can use it multiple times / forever.
Best