The Info.plist must contain a LSApplicationCategoryType key

I've created a Safari Extension app using the MultiPlanform option.

I can successfully distribute the iOS app for beta testing with TestFlight, but when I try to do this with the macOS version, I get the following error:

The product archive is invalid. The Info.plist must contain a LSApplicationCategoryType key, whose value is the UTI for a valid category. For more details, see "Submitting your Mac apps to the App Store".

For the record, I searched for the mentioned document and couldn't find it. A link would be nice.

Regardless, when I look at the macOS (App) in the Navigator Panel, there is no Info.plist file. There is one, however, in iOS (App).

When I open Test Flight on my Mac, I see the app, but that's most likely because I have an M1 chip.

I can't find any documentation on this, so I'm asking:

Do I need to create an Info.plist file for the macOS (App), and if so, what do I need to put in there?

If I don't need this, how do I deal with this error?

Thanks in advance for any helpful advice.

Accepted Reply

You can set a category in Xcode under the macOS App target, in the General tab under the Identity section. That will add it to the built Info.plist for you.

Replies

You can set a category in Xcode under the macOS App target, in the General tab under the Identity section. That will add it to the built Info.plist for you.

@timothy.hatcher

That worked like a charm! I Googled like a madman looking for how to do this, and your answer made my day.

Thank you for taking the time to help me out.

In my case, using Xcode and looking at Target App - General and under Identity I see the App Category select box has entry 'Utilities', as I selected, but when validating the App I get error message

No App Category is set for target 'Runner'. 
Set a category by using the General tab for your target, or by adding an appropriate LSApplicationCategory value to your Info.plist.