Every time I run my app in Xcode it asks if I'm sure I want to allow it to run
Asked Answered
M

1

11

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?

Milner answered 10/11, 2023 at 0:47 Comment(0)
M
15

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.

Milner answered 10/11, 2023 at 0:47 Comment(3)
Also make sure that "Signing Certificate" is set to Development, not Sign to Run Locally.Ferdy
Isn't this really nice of Apple to help us out when we're working on open source projects and just want to run locally? Another tactic to nag us into paid developer accounts. No way to get rid of the warning. First time run using a domain, no warning. Every time after that, nag, nag, nag.Obviate
the first reply was necessary for me to solve this issue. thanks @FerdyAlcot

© 2022 - 2024 — McMap. All rights reserved.