macOS on M1 always asks for permissions to access files

Every time application is run, macOS on M1 asks for permissions when creating a new FileInputStream. Example code:

    auto file = File::getSpecialLocation (File::SpecialLocationType::userDocumentsDirectory).getChildFile ("test.wav");
    
    if (file.existsAsFile())
        FileInputStream stream (file);

It does not happen on my Intel machine with the same system, JUCE (6.1.4 master) and application (release). Am I missing something that must be set additionally?

Edit: seems related to this issue:

OK, so it seems that for M1 Mac “Development Team ID” must be entered in Projucer and “Team” selected in “Signing & Capabilities” in Xcode. Without this one must grant permissions over and over.

6 Likes