# How to use SDL2 on MacOS with Xcode

**URL:** <https://discourse.libsdl.org/t/how-to-use-sdl2-on-macos-with-xcode/39078>\
**Category:** SDL Development\
**Created:** [October 1, 2022, 11:07pm UTC](https://discourse.libsdl.org/t/how-to-use-sdl2-on-macos-with-xcode/39078 "2022-10-01T23:07:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![eri0o](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/eri0o/32/4277_2.png) [@eri0o](https://discourse.libsdl.org/u/eri0o)\
**Post date:** [October 1, 2022, 11:07pm UTC](https://discourse.libsdl.org/t/how-to-use-sdl2-on-macos-with-xcode/39078/1 "2022-10-01T23:07:41Z")

</div>

I am trying to make sense of the sdl2 macos readme in the source code, but I could not help but notice the sdl2 release includes a dmg file. There’s no mention of it in the readme. Is there any simpler way of using it so I can setup my game Xcode project to use sdl2? Thanks

---

<div class="post-metadata">

**Author:** ![sjr](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/sjr/32/5749_2.png) [@sjr](https://discourse.libsdl.org/u/sjr)\
**Post date:** [October 2, 2022, 3:08am UTC](https://discourse.libsdl.org/t/how-to-use-sdl2-on-macos-with-xcode/39078/2 "2022-10-02T03:08:00Z")

</div>

The readme was very out of date, last time I checked.

[These are the steps I use](https://discourse.libsdl.org/t/can-someone-recommend-a-great-tutorial-to-setup-sdl2-in-apple-xcode/34320/2)  
Addendum: you may also need to add `$(PROJECT_DIR)` to `Framework Search Path` in the Build Settings, depending on what version of Xcode you have.

---

<div class="post-metadata">

**Author:** ![eri0o](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/eri0o/32/4277_2.png) [@eri0o](https://discourse.libsdl.org/u/eri0o)\
**Post date:** [October 2, 2022, 9:12am UTC](https://discourse.libsdl.org/t/how-to-use-sdl2-on-macos-with-xcode/39078/3 "2022-10-02T09:12:00Z")

</div>

Thanks, that’s a much clearer step by step. Will update this when I get it working!

---

<div class="post-metadata">

**Author:** ![eri0o](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/eri0o/32/4277_2.png) [@eri0o](https://discourse.libsdl.org/u/eri0o)\
**Post date:** [October 9, 2022, 12:49pm UTC](https://discourse.libsdl.org/t/how-to-use-sdl2-on-macos-with-xcode/39078/4 "2022-10-09T12:49:57Z")

</div>

@sjr , hey, just to report that all worked out! Thank you for your detailed instructions!
