1. Hello Guest! It's with a heavy heart that we must announce the removal of the Legacy GMC Archive. If you wish to save anything from it, now's the time! Please see this topic for more information.
    Dismiss Notice

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

Discussion in 'GameMaker Studio 2 Community Tech Support' started by FredFredrickson, Nov 20, 2019.

  1. FredFredrickson

    FredFredrickson Member GMC Elder

    Joined:
    Jun 21, 2016
    Posts:
    120
    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.
     
  2. FredFredrickson

    FredFredrickson Member GMC Elder

    Joined:
    Jun 21, 2016
    Posts:
    120
    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:
     
    Samuel Venable and Nocturne like this.
  3. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Joined:
    Apr 13, 2016
    Posts:
    7,044
    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.
     
    Samuel Venable likes this.
  4. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Joined:
    Apr 13, 2016
    Posts:
    7,044
    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!!!
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice