Game Maker Facebook Integration - How to fix iOS issue

Written by Adrian Killens.

After a bit effort I've finally managed to get facebook integration working with iOS using Game Maker. Didn't find any solutions online whilst working this out so thought I'd write a quick blog on how I fixed the issue.

To start with I followed this tutorial on how to set things up on the FB side:
https://docs.yoyogames.com/source/dadiospice/002_reference/social%20gaming/facebook/index.html

Then this one on how to do a simple share:
https://docs.yoyogames.com/source/dadiospice/002_reference/social%20gaming/facebook/facebook_dialog.html

This resulted in an Android app that worked perfectly and an iOS app that crashed every time I clicked my newly implemented share button and Xcode was giving the following error:

fbauth2 is missing from your info.plist under lsapplicationqueriesschemes and is required for ios 9

So here's how I managed to fix it:

1. Open this file in notepad (directory may vary depending on which version etc.. of GM you're using):

C:\Users\Billy\AppData\Roaming\GameMaker-Studio-Early-Access\Interpreted\iOS\TemplateProject\${YYXCodeProjName}\Supporting Files\${YYXCodeProjName}-Info.plist

2. Add the following xml just below <dict>:

<key>LSApplicationQueriesSchemes</key>		
	<array>
		<string>fbshareextension</string>
		<string>fbapi</string>
		<string>fbauth2</string>
	</array>

3. Save the file and close the file, then re-deploy.

Note: You'll have to make this change again if you re-install Game Maker.