Creating a Macbook Pro Touchbar .dylib extension

luisog30

Member
Hello,

I have a 2016 MacBook Pro with TouchBar model and I'm developing a game for Windows and Mac using GameMaker Studio 2, which, as all of us know, allows you to add extensions created with another programs. When using Mac OS X, GameMaker needs an extension of type .dylib, which includes the functions you call in GameMaker when you add the extension to your project.

I would like to add some TouchBar functions in Mac version of my videogames, and I already know how to develop apps with Touchbar using Xcode, but the problem is that I have no idea of what I have to do to create a .dylib library so as to use Touchbar functions through GameMaker (I don't even know if something like that is possible). Is there someone who knows how to do this?
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
If you are already familiar with building apps for Mac, check out the official extension example. It's pretty simple stuff - you declare the DLL functions accordingly, then set up the extension so that GameMaker knows how to find them.
 

luisog30

Member
If you are already familiar with building apps for Mac, check out the official extension example. It's pretty simple stuff - you declare the DLL functions accordingly, then set up the extension so that GameMaker knows how to find them.
I know, but the problem is that this example is written in c++, while all examples I've seen in the internet about touchbar are written in Swift or Objective C using Xcode :/
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
I know, but the problem is that this example is written in c++, while all examples I've seen in the internet about touchbar are written in Swift or Objective C using Xcode :/
Cannot verify at this exact moment, but I think XCode came with a dylib template for obj-c. Likely would only need to figure out how to set function visibility (if it's not made accessible by default).
 
P

PabloSheva

Guest
I bought a MacBook to start Programming, but I have a problem. How to choose between Swift and Objective C? First is more perspective, but not such independent like second. But Objective C was using for several years, so I don't know what to do.
 
Top