• 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.

Mac OSX Do IAP work on Macos?

C

Cappa Games

Guest
I'm having some problems with the export.

  1. When I try to build my app I get an issue saying I already bought this app on another computer. I haven't been able to even upload a binary, so I don't know why this is happening. I get this problem for YYC"
    System.Exception: ssh command 'open -a (file) failed.
    LSOpenURLsWithRole() failed for the application (file) with error -10810."
    at ..(String , Boolean )
    at Igor.MacBuilder.PackageYYC(String _dir)
    at Igor.MacBuilder.Package()Igor complete.
    I get this problem for VM "
    IsMacConnected
    InstallApplicationOvenOnMac
    pscp (file)/.install_app_oven.sh'
    System.NotSupportedException: The given path's format is not supported.
    at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)
    at System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access, String fullPath, Boolean checkForDuplicates, Boolean needFullPath)
    at System.IO.FileInfo.Init(String fileName, Boolean checkHost)
    at System.IO.FileInfo..ctor(String fileName)
    at ..(String , String , Boolean )
    at ..(String , StringBuilder , Boolean )
    at ..(String , String , String )
    at Igor.MacBuilder.Package()Igor complete.
    Note: I had xcode 9.0 installed and realized yoyo games said not to, so I downgraded to 8.3.3.

  2. I managed to upload a build somehow by a fluke and I got this error "The product archive is invalid. The value of the LSApplicationCategoryType key in the Info.plist is Games, which is not a UTI for a valid category.
  3. The other error I got " App sandbox not enabled. The following executables must include the "com.apple.security.app-sandbox" entitlement with a boolean value of true in the entilements property list.

I hope to get some help with this. Been working ALL DAY trying to get iOS and Mac exports to work. Thankfully I got iOS working, but the Mac left me no choice but to ask for help.
 
C

Cappa Games

Guest
Well...I pulled off a miracle and by passed these errors...here's what I did.

  1. Exported to YYC. Even though it errors and xcode doesn't boot, it opens up the folder with files included. I clicked on one of the 4 folders and found the Xcode project and opened it.
  2. When you open it there are a lot of yellow caution markers on the left hand side. One of them will say the category type is invalid. Click on that. A window will pop up. I simply changed application category from games to something else and then back to games and that solved that problem.
  3. This next part I'm unsure if it did anything. I disabled automatically manage signing (On the same page) and then scrolled down and input them manually.
  4. For app sandbox not enabled, there was an option asking me to enable it under the capabilities tab. You also have to make sure you enable IAP here. (My first build got rejected)
  5. Then I clicked on the menu. Product > Archive. And that brings up the upload screen. I clicked upload to app store and no problems!
Glad I figured out a way, but GMS2 clearly needs some sort of solution to this problem.
 
Last edited by a moderator:
C

Cappa Games

Guest
So, my game got rejected because IAP aren't working. Considering I have to enable app sandbox in xcode and then below that, turn on IAP, I feel like something is off with this export. Anyone have success getting this to work?

Note: I have the same IAP code working on Android and iOS, so dunno why it's not working.
 

rwkay

GameMaker Staff
GameMaker Dev.
did you test the IAP before you submitted???

We have not had an IAP project on Mac for some time so there may be issues - please file a bug if you find issues

Russell
 
C

Cappa Games

Guest
did you test the IAP before you submitted???

We have not had an IAP project on Mac for some time so there may be issues - please file a bug if you find issues

Russell
I tried testing it, but I'm not even sure how to do that. There's no documentation here on how to test IAP for MAC and what is here is for GMS1. (I couldn't find similar documentation for GMS2) What I ended up doing is exporting to mac via YYC (I don't think you can use vm because you need to edit xcode), of course I get the error mentioned in my original comment, which seems to possibly be because my mac asks me to sign in when the app loads during exporting because it says "this app was downloaded on another computer". If I don't sign in or sign into my regular itunes, it tells me the app is damaged. If I sign in with my tester account, it will boot up the app.

So now that xcode is open, I have to take these steps:
  1. Change Name...there's something really screwed up with this. It won't put the name you put in GM2 options, but what you save the project as. So If I name the project "game version 3", thats what shows up in xcode and the game. My game keeps getting rejected for this, unless I fix it in xcode everytime.
  2. I have to change the category to something else and then back to what I want to avoid errors.
  3. In the capabilities tab I need to enable sandboxing and then I have to turn on IAP.
  4. Archive game and then export a development-signed application.
  5. Open app and it immediately asks me to sign in. I'l get errors unless I sign into my tester account.
  6. App starts, click on IAP, I get store is not available. I use pretty much the exact IAP code from the Yoyo Games example. It seems "if iap_status() == iap_status_available" isn't being triggered. I did some tricks from apple to check if my app is sandboxed inside of activity monitor and it said it was. So I dunno if I'm missing a step or if IAP is broken.
 

clee2005

Member
I'm having the same issue with our MacOS builds. I can get the build to work with some XCode tweaking (capabilities tab and setting sandbox, allow outgoing network and IAP to ON), but the IAPs always come back with iap_status() <> iap_status_available.

The same IAPs were working perfectly in previous builds. Not exactly sure where they got broken. I'm using Xcode 8.3.1 and GMS 1.4.1772

I just filed this bug :http://bugs.yoyogames.com/view.php?id=28229

I'm also not sure how you would test MacOS IAPs. Seems like you can only build a Store version and put it into the store before you can verify if it's working since there is no TestFlight as iOS has. @rwkay ? Any suggestion on how to test IAPs... perhaps I can find a work around, but as it is now I would have to continuously build and submit to the store and test on my users.

Thanks,
Chris
 
Last edited:

clee2005

Member
I just found this on how to test IAPs on MacOS :

Test your application in the sandbox environment.
  • macOS developers must complete the following steps:

    • Build your application in Xcode.

    • Run your application.

      You must launch your application from the Finder rather than from Xcode the first time in order to obtain a receipt. Click on your application in the Finder to launch it. macOS displays a "Sign in to download from the App Store." dialog. Enter your test user account and password as requested. The sandbox provides you with a new receipt upon successful authentication.

      Note: Launch your application from the Finder whenever you need a new receipt.

From this doc : https://developer.apple.com/library/content/technotes/tn2259/_index.html
 

clee2005

Member
Just in case this is helpful to anyone else. I managed to get the MacOS IAPs working again by going back to 1.4.1763. Not ideal, but at least a work around until the bug is fixed in the current build, and maybe 2.x
 
C

Cappa Games

Guest
did you test the IAP before you submitted???

We have not had an IAP project on Mac for some time so there may be issues - please file a bug if you find issues

Russell
Has this been fixed yet? It's been nearly 6 months.
 

clee2005

Member
Yes please log a new bug! They didn't fix it. I haven't got around to testing the new release yet, but I tried an EA that they gave me and it didn't work there. For me it builds successfully, but when I go to submit it to the Mac Store I get 2 errors. One about sandboxing and another about the category not being set properly - which is set, and no amount of changing it makes a difference.
 
W

WorkingSolutions

Guest
I have created a test harness project and provided a detailed document in the bug report, hopefully that will lead to a resolution soon....
 
Top