Platforminfo not working for iOS

0 favourites
  • 11 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Hi,

    using platforminfo - Is on iOS condition, but it's not working.

    Have tried a simulator on Xcode and a real iPad and iPhone.

    Works fine for Android (using Bluestacks emulator).

    This is my code - any iOS device sets "platform" to "OtherPlatform"

    Am I doing something wrong or is this a bug?

    As I'm only targeting Android and iOS for now, I can set it to "iOS" if it's not Android as a workaround. But will need some other way to determine this if/when I target other platforms (I need to know whether it's iOS or not in order to show "Restore Purchases" which is only needed on iOS).

  • Hi, I'll check with me now.

    But you don't worry about the restore purchases button, you can safely leave it in your android app, it won't hurt your app and google doesn't scold you for it.

  • I checked on a real device I have it showing "Other" too.

    I can't say anything if it was before because I separate builds for different platforms.

    By the way in my archive for Xcode in the folder "pods" were not all the files had to make "pod install".

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hey - thanks for reproducing and good to know I could leave the button in Android builds.

    Also, on the subject of restore purchases, do you know what the mobileIAP's restore purchases action actually does? I assumed it would be sufficient to simply check whether the product was owned. Discussed in another thread here.

    Could you explain what you mean by this:

    By the way in my archive for Xcode in the folder "pods" were not all the files had to make "pod install".

    I see a pods problem after exporting as Xcode (easily fixed - see point 2. in that post.). But I noticed that if I export as Cordova first (needed to solve another issue described in my third post in that same thread), I don't that pods issue.

  • Could you explain what you mean by this:

    > By the way in my archive for Xcode in the folder "pods" were not all the files had to make "pod install".

    I see a pods problem after exporting as Xcode (easily fixed - see point 2. in that post.). But I noticed that if I export as Cordova first (needed to solve another issue described in my third post in that same thread), I don't that pods issue.

    You create an Archive for Cordova when exporting and I create an Archive for Xcode, and I have similar problems which I solve with this method.

  • Also, on the subject of restore purchases, do you know what the mobileIAP's restore purchases action actually does? I assumed it would be sufficient to simply check whether the product was owned. Discussed in another thread here.

    In android as soon as the connection to the shopping service is made, the user is automatically restored the non consumable purchases, for example the user bought ad disabling and after reinstalling the game as soon as he enters the game store this purchase will be restored, that's why google does not require this restore button.

    In iPhones this button should restore non consumable account purchases after reinstalling the game.

  • In iPhones this button should restore non consumable account purchases after reinstalling the game.

    But what does the restore purchase action actually do? When a purchase is made, On Product Owned triggers so I know to unlock features or whatever. But it's not clear if anything triggers when Restore Purchase is made. Currently I'm just checking Product Owned when the restore purchase button is clicked and not using Restore Purchase. I'm fairly close to submitting to TestFlight where IAPs can be tested, so I'll know for sure whether my method works or if I do need to call Restore Purchases.

  • It turns out to be fraud, you have made a button to restore the purchase but put another action on it.

    When publishing goods in App store you attach a screenshot with the button to restore purchases and the moderator necessarily clicks on it, and if he does not see the necessary action in the console, he will reject your application.

    You don't have to reinvent the wheel. Just put a restore purchases action on the button and if you have one-time purchases apple will restore them.

  • It turns out to be fraud, you have made a button to restore the purchase but put another action on it.

    When publishing goods in App store you attach a screenshot with the button to restore purchases and the moderator necessarily clicks on it, and if he does not see the necessary action in the console, he will reject your application.

    You don't have to reinvent the wheel. Just put a restore purchases action on the button and if you have one-time purchases apple will restore them.

    Makes sense - thank you - will add that and hopefully submit later today.

  • Am I doing something wrong or is this a bug?

    It's a mistake in your events. The "Else" means "is not on Android". So your logic will only ever show "Android" or "OtherPlatform".

  • > Am I doing something wrong or is this a bug?

    It's a mistake in your events. The "Else" means "is not on Android". So your logic will only ever show "Android" or "OtherPlatform".

    Thank you - can't believe I was so dumb. Can confirm it's working now - both in the Xcode simulator and on a real iPhone.

    Now just need to figure out how to test IAPs in TestFlight...

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)