Every time I run my app in Xcode it asks if I’m sure I want to allow it to run

I’m developing a Mac App in Sonoma.

Every time I run the App from Xcode using the debugger Xcode asks:

Dialogue showing 'AppName is from an unidentified developer and differs from previously opened versions.  Are you sure you want to open it?'

“AppName” is from an unidentified developer and
differs from previously opened versions. Are you sure you want
to open it?

Opening “TreeView” will allow it to access data from previously used
versions of “TreeView”.

This is quite annoying – how can I stop this?

The fix I’ve found for this is to set a development team in my Xcode project, rather than leaving it as “none”.

  • In Xcode, select your Xcode project to see the project’s property viewer.
  • On the left bar, select your project’s App target in the “Targets” section – mine’s called “TreeView”.
  • Select the “Signing & Capabilities” tab at the top – it’s the second one along.
  • For “Team” select your personal team.

I found this solution from a link about macOS Sonoma sandbox security.

As the link states, it’s not clear if there’s some other settings to allow a project without a team (eg, distributed from a git repo, say) to be run without clicking this dialogue all the time. If you’ve got a more in depth answer than mine or can clarify extra details, I’ll happily check yours instead of mine.

Leave a Comment