Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Trying to set settings in custom XCode template  (Read 717 times)

0 Members and 1 Guest are viewing this topic.

johnnywz00

  • Newbie
  • *
  • Posts: 24
    • View Profile
    • Email
Trying to set settings in custom XCode template
« on: February 11, 2025, 06:29:00 pm »
I have copied the CLT template for XCode, and successfully added some of my own build settings by inserting some additional XML in the .plist file. However, I am being foiled with the `Enable Hardened Runtime` setting. In spite of including
```
(<plist>)
(<dict>)
        <key>Project</key>
       <dict>
          <key>SharedSettings</key>
          <dict>
             <key>ENABLE_HARDENED_RUNTIME</key>
         <string>NO</string>
          </dict>
       </dict>
```
the new SFML project will always start with hardened runtime enabled, and I have to turn it off manually. I suspect that some inherited behavior from the SFML template is causing this (because when I don't use the SFML template, hardened runtime isn't on), but on inspecting the files I can't see anywhere that it's specified. Does anyone know why this setting doesn't take effect, although the others that I've tried do?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11145
    • View Profile
    • development blog
    • Email
Re: Trying to set settings in custom XCode template
« Reply #1 on: February 14, 2025, 08:53:11 am »
If you enable it in the XCode settings, does it not get added to the plist?

https://developer.apple.com/documentation/security/hardened-runtime
Official FAQ: https://www.sfml-dev.org/faq/
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

johnnywz00

  • Newbie
  • *
  • Posts: 24
    • View Profile
    • Email
Re: Trying to set settings in custom XCode template
« Reply #2 on: February 14, 2025, 05:55:33 pm »
I'm afraid I don't know what you're getting at... I'm aiming to be able to start new projects with Hardened Runtime off/disenabled (because it won't allow the SFML libraries), without having to turn it off manually each time. But my statement that non-SFML-template new projects started with Hardened Runtime off was based upon an older version of XCode, and is no longer correct. A basic XCode project, without SFML template, does start with Hardened Runtime enabled. So I suppose it has nothing to do with the SFML template.
Still, I am puzzled as to why the code I posted *doesn't* turn it off, since I'm specifying it in custom settings. As mentioned, other custom settings listed the same way do indeed take effect in my customized SFML template.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11145
    • View Profile
    • development blog
    • Email
Re: Trying to set settings in custom XCode template
« Reply #3 on: February 14, 2025, 08:47:00 pm »
I meant, if you turned it off manually and saved the project, maybe you could see if the syntax is supposedly different to what you've used.
Official FAQ: https://www.sfml-dev.org/faq/
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

johnnywz00

  • Newbie
  • *
  • Posts: 24
    • View Profile
    • Email
Re: Trying to set settings in custom XCode template
« Reply #4 on: February 16, 2025, 03:43:59 pm »
I'm not aware that altering settings within a created project writes to a .plist anywhere. If it does I'd be happy to know. The only .plist I know to tamper with is the one(s) that go along with the SFML templates, and as mentioned, couldn't find anything about hardened runtime in those. I'm pretty certain that ENABLE_HARDENED_RUNTIME is the correct value as that's what XCode displays when you hover over the setting...

 

anything