Deep Linking: iOS Universal Links with GameMaker
This article covers how to inject associated domain to your GameMaker game, using the built-in Code Injection field in a GameMaker iOS extension.
Why do you need the associated domain "applinks" string?
To link an associated domain to your iOS app, one of the several steps is that you need to build the string "applinks:yourFullyQualifiedDomain.com" to the app archive by adding this capability to your XCodeProject. There are many tutorials on how to do it on the internet which covers all the other steps.
What happens if this string is added manually to XCode?
If you manually insert this string into XCode, GameMaker will overwrite it every time you build your game, because it's regenerating the XCodeProject, overwriting whatever you modified.
How to do it properly in GameMaker
It's possible you use a post install script to do it. However, the GameMaker way of doing it, is by "Code Injection" during the build process. Basically GM loads in its template .xcodeproj and replaces predefined strings with your extension settings.
Here in GM manual is a list of predefined strings for iOS Code Injection:
To add the "associated domain" capability, what we're looking for is YYIosEntitlements. Add the following into any iOS extension's "Code Injection" field:
<YYIosEntitlements> <key>com.apple.developer.associated-domains</key> <array> <string>applinks:yourFullyQualifiedDomain.com</string> </array> </YYIosEntitlements>
Save and build the GameMaker project. You should see that the associated domain is written into your "Capabilities & Entitlements" section.
What to do next
You can also enable developer mode to test the universal link behavior.












