• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Mac OSX [SOLVED] Steam not able to initialize on macOS

FredFredrickson

Artist, designer, & developer
GMC Elder
I wanted to push a small bug fix out for Fatty Rabbit Hole on Steam, where I have versions of the game for Windows, macOS, and Ubuntu.

Just a little backstory: as some of you are aware, a lot has changed for macOS exports since the last time I've compiled this game, with the introduction of macOS Catalina. After having issues getting things to work by compiling from my primary Windows machine to my Mac Mini, I just decided to export the game using the GameMaker Studio 2 macOS IDE - which works much better.

Anyway, the issue I'm having now is that the Steam API will not work. The game launches fine, but the Steam overlay never appears. When I test the game by launching it straight from GameMaker, I can see in the console that the Steam API never initializes - it just fails over and over.

My code for starting up the Steam API isn't anything fancy; it's almost exactly the same code as the manual suggests. It worked in previous builds just fine.

I'm assuming there's something small that I've missed in the process of making sure everything is compatible with Catalina... but I'm open to any suggestions. Does anyone have any ideas why this is happening? Any possible fixes?

Running macOS Catalina 10.15.1, GameMaker Studio 2 IDE v.2.2.4.474, and runtime 2.2.4.374.
 

FredFredrickson

Artist, designer, & developer
GMC Elder
After scouring the internet all afternoon, I was able to find a fix for this, in case anyone else needs it: https://steamcommunity.com/groups/steamworks/discussions/0/1607148447823723441/

Once your Steam-enabled project is in Xcode, make sure to do the following things:
  • Under Build Settings, set Enable Hardened Runtime to "yes"
  • Under Signing & Capabilities, check the box for Disable Library Validation
  • Under Signing & Capabilities, check the box for Allow DYLD Environment Variables (this is the part I was missing)
  • Under Build Phases, Copy Files, make sure Code Sign On Copy is unchecked for libsteam_api.dylib
The last three items are the most important for Steam games - as I understand it, all apps that you intend to distribute need to be "hardened" to work with Catalina. Hope this saves someone else some time! :cool:
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
When you notarized the app, I'm assuming you added hardened runtime support, but did you also codesign independently the Steam API dylib? From what I understand all external DYLibs need to be codesigned before being notarised. Also, the topic title says "Solved?

EDIT: You posted at the same time I did! Lol! Okay, thanks for the info! I couldn't get my own Steam game to work, so this information is invaluable to me, and also something I can use to update the docs with once I've confirmed it.
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Just to update this... The process described by @FredFredrickson works perfectly! I have uploaded my notarized app to Steam and it downloads and runs without issues on Catalina. Thanks for sharing this Fred!!!
 
G

GM029

Guest
Thanks to this thread I FINALLY got the Steam API working with the Mac version of my build!
 
Top