• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • 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.

iOS Creating a simple iOS Extension (GenericTest) doesn't work

sman

Member
With GMS2 2.1.5, I follow the iOS and Android: Creating A Simple Extension tutorial.

- I create a new extension named "GenericTest"
- I click on iOS in "Extra Platforms"
- In "Class Name" I put "GenericTest"
- I click on "Add Source" and select a directory where are GenericTest.h and GenericTest.mm
- In the window "Extension: GenericTest" I click on the icon next to "Files" -> Add Placeholder -> Add Generic Placeholder
- I double click on GenericTest.ext, click on the icon next to "Functions:" -> Add Function
- Name: AddTwoNumbers, External Name: AddTwoNumbers, Return Type: double, argument0: double, argument1: double
- In my gml code, I write "var test_addition = AddTwoNumbers(2,2);"
- I launch and test_addition get the value 0 and in the log I read "Unable to find extension class for GenericTest"

What did I do wrong?
 

sman

Member
As I believe I did everything explained in the tutorial, I filed a bug report, but YoYo answered me: "We don't offer general coding/gamedev support on this bug-reporting service".
They could at least verify that we still can create iOS extensions before saying I just ask for coding help! They are sure it's not a bug, without testing :(
 

sman

Member
Oh! I discovered something very mysterious!! :eek:
When I change the class name (in GMS2 and in the .h and .mm files) from "GenericTest" to the class name of an extension that is working in another project, it works!!!
And any other name doesn't work...
 
Q

quinndexter

Guest
I'm having trouble with it for Android, getting this error in logcat:

Extension Class not found: com.company.game. attempting to call ReturnAsync

Same for the other three demo functions.
 
Last edited by a moderator:
Top