Is game suppose to prompt user to "Login to iTunes Store" every time game opens?

AJaymzAJaymz Member, PRO Posts: 164

While testing on an adhoc with new version 0.12.10 for Mac, if I'm not logged into iTunes account, as soon as the game loads it prompts me to login to iTunes Store. If I hit cancel and then play the game it won't pop up until I try to buy an IAP. If I close the game and then open it back up to continue it asks to login again! No matter what scene I left game. I only have IAP on game levels along with the Request Data function only in game levels. None of that stuff is on my title scene at the beginning but it will prompt to login there anyways. Will it be like this on published games? Some people will not want to login at anytime at all and it might be annoying to be asked to login everytime game is open at anytime.

«1

Comments

  • POMPOM Member Posts: 2,599
    edited November 2014

    Same problem here..

    Entering my game in ad-hoc is immediately asking for "Login to iTunes Store".

    locking the iPhone, unlock it, and pop up shows again, hitting cancel, locking the iPhone, unlock it, pops up again.

    ill tag @BlackCloakGS

    Roy.

  • stevejstevej Member, PRO, Chef Emeritus Posts: 435

    @krane2626@hotmail.com said:
    While testing on an adhoc with new version 0.12.10 for Mac, if I'm not logged into iTunes account, as soon as the game loads it prompts me to login to iTunes Store. If I hit cancel and then play the game it won't pop up until I try to buy an IAP. If I close the game and then open it back up to continue it asks to login again! No matter what scene I left game. I only have IAP on game levels along with the Request Data function only in game levels. None of that stuff is on my title scene at the beginning but it will prompt to login there anyways. Will it be like this on published games? Some people will not want to login at anytime at all and it might be annoying to be asked to login everytime game is open at anytime.

    It should only ask to log in on start up if
    1) The player has a pending purchase that hasn't been fulfilled, or
    2) The player has bought a consumable item and the Consume Item behavior hasn't been run for it.

  • POMPOM Member Posts: 2,599

    Ok, but when prompt to login, I log in (with my password) and nothing is happening..
    Locking the iPhone, unlocking, and still pop up again, when is this loop ends?

    Roy.

  • AJaymzAJaymz Member, PRO Posts: 164

    I think I know what happened. I closed out my game directly after purchasing an IAP. So somehow it's stuck in "purchase" mode, so it seems that it's trying to login to complete purchase, even though logging in won't do anything. Only way I can think to fix it is to change IAP name with apple or use different test account. May be something different happening but that's the only thing I can think of.

  • POMPOM Member Posts: 2,599
    edited November 2014

    @stevej
    Is the table "PurchaseTable" being saved automatically after Callback is 1?
    I did not find any info about whether we need to save it manually, or its being saved automatically, or not touch it at all..
    Cause if something like @krane2626%40hotmail.com mentioned is happening when the value is get stuck on "purchase" mode, somehow, maybe an incoming call stopped the process or something, then thats causes an issue..
    Any insight on this?

    Roy.

  • gingagaminggingagaming FREELANCE GS DEV Member Posts: 1,685

    @krane2626@hotmail.com said:
    I think I know what happened. I closed out my game directly after purchasing an IAP. So somehow it's stuck in "purchase" mode, so it seems that it's trying to login to complete purchase, even though logging in won't do anything. Only way I can think to fix it is to change IAP name with apple or use different test account. May be something different happening but that's the only thing I can think of.

    Go to your settings and clear the cache. This will erase the data and when you boot it back up, it will just give you the purchase again (I assume) Whilst this will solve your issue today (hopefully) this isnt good for players as this simply wont do this. They will just uninstall the game.

    Let me know if this solved your problem

  • AJaymzAJaymz Member, PRO Posts: 164

    The only cache that I know how to clear is for Safari. I cleared cookies and history but it didn't work. I made a different product ID for the IAP and that didn't work either. Weird thing is, it works fine on my iPhone5s and iPhone4, but not the iPad. Sure hope this doesn't happen to a player.

  • POMPOM Member Posts: 2,599
    edited November 2014

    @krane2626%40hotmail.com
    Just trying to track down the issues were having (for me its on iPhone 4S by the way).

    Do you suspect on a consumable item? or non consumable?
    Did you had an "every" timer? or an "after" timer in your rules to reset it?

    (EDIT: my game had an "after" timer,
    Here is an example from the GS guide - this is not my code
    please ignore the save table rule in this image)

    roy.

  • AJaymzAJaymz Member, PRO Posts: 164

    roy, your timer needs to be "after" .03 seconds. You have "every". Could be part of your problem.

  • AJaymzAJaymz Member, PRO Posts: 164

    mine is happening on a consumable IAP.

    Oh, and I see that you're saving the "Stored Values" table without writing anything to it first. You probably should write to that table directly after the Game.Coins attribute.

  • POMPOM Member Posts: 2,599
    edited November 2014

    No no, sorry , that image is from the manual:
    https://help.gamesalad.com/hc/en-us/articles/202036553-7-4-Using-the-New-In-App-Purchase-IAP-behaviors-in-GameSalad

    My timer was actually "after" (with run to completion)

    Roy.

  • colandercolander Member Posts: 1,610

    @POM it should be For 0.03 seconds. Do you normally have a Change Table Value action before the Save Table action because that won't do anything other than save your table which hasn't been changed and therefore doesn't need saving.

  • AJaymzAJaymz Member, PRO Posts: 164

    Colander, I thought it should be After .03 so the information will definitely be written before saving. Does For .03 work the same way?

  • POMPOM Member Posts: 2,599
    edited November 2014

    @colander
    My game had an "after" timer, the above is an example from the GS guide and not my code please ignore the save table rule in that image.
    Why would you say it needs to be "For" ? I mean the manual says it should be "every", my logic says it should be "after", so can you explain why use "For"?

    Cheers
    Roy.

  • POMPOM Member Posts: 2,599
    edited November 2014

    Managed to reproduce the issue,
    Hit the purchase button, then when pressing the "Buy" button in the iTunes popup, and immediately after that double-Click the home button, and remove the game from the multitask list, this appear to make something that causes the pop up to constantly be shown the next time you open the game.

    IMPORTANT: I did not managed to reproduce on a "light" game i have (with the same IAP logic), maybe because things are happening faster with the less assets and rules, but on a CPU and RAM heavy game (like twin swords for example) this is easily reproduced.

    Im gonna try to figure out how to overcome this issue.

    Roy.

  • colandercolander Member Posts: 1,610

    Using After leaves the timer running even though it has done it's job by using For it will only run for the time you set and 0.03 is one code cycle. I found this out from @The_Gamesalad_Guru he could explain this better. He also has an IAP video tutorial if you haven't seen it

  • POMPOM Member Posts: 2,599

    Ok now I'm really confused..

    Roy.

  • AJaymzAJaymz Member, PRO Posts: 164
    edited November 2014

    @colander‌ yeah I've seen Guru's video. He even uses After timer in it. I figured For .03 would fire at the beginning of 0 seconds where it would have a chance to save the table before writing to it.

  • colandercolander Member Posts: 1,610

    @‌POM It really depends where you use your timers if it is in a Store Scene a player won't be there long and it will probably only be one or two timers which will stop when you change scene. The idea being the timer ensures the Save Table action runs and save the table. It only needs to do it once in a code cycle and having a timer continue to run doesn't do anything other than give the processor another job to do. Using For means the timer will only run for that period of time save the table and then stop.

    @AJaymz yes I saw that too maybe he just missed it or thought it didn't matter on a Store menu which it doesn't. On a game scene if it doesn't need to keep running then For is a better choice especially if you have a lot of them.

  • colandercolander Member Posts: 1,610
    edited November 2014

    I think they are going to be talking about code cycles tomorrow at the monthly meetup. If you want to know more or ask questions about it you can attend online ask GameSalad directly.

  • POMPOM Member Posts: 2,599

    @colander said:
    Using After leaves the timer running even though it has done it's job by using For it will only run for the time you set and 0.03 is one code cycle. I found this out from The_Gamesalad_Guru he could explain this better.

    Can you post the resource for this insight?

    Roy.

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited November 2014

    I said that in relation to specific rule sets. In this condition with IAP on a seperate scene it doesn't matter as the only time you go to that scene is to buy something. How you condition a timer depends on the logic conditions that encompasses it as a whole. If I recall I said that in as a responce to a particular logic tree someone posted.

    Also one code cycle generally takes .03 seconds so the idea above is to allow the code to execute (write to the table) before you execute a save the table. A code cycle is the time it takes to scan all the active code.

  • stevejstevej Member, PRO, Chef Emeritus Posts: 435

    @POM said:
    stevej
    Is the table "PurchaseTable" being saved automatically after Callback is 1?
    I did not find any info about whether we need to save it manually, or its being saved automatically, or not touch it at all..
    Cause if something like krane2626%40hotmail.com mentioned is happening when the value is get stuck on "purchase" mode, somehow, maybe an incoming call stopped the process or something, then thats causes an issue..
    Any insight on this?

    Roy.

    The purchase table is not saved unless you do so in your game. It depends on your game, but in general I would suggest not doing so, the data may have changed on the store side, and it's bad to show one price, for instance, and then have it change when updated from the store.

    As far as an item getting stuck in purchasing mode, the only time we've seen that happen if if you make a purchase and then remove the item from the purchase table. If you can come up with a repeatable example of purchases getting stuck, please file a bug report so we can fix it.

  • POMPOM Member Posts: 2,599
    edited November 2014

    When I get it to stuck on "purchased" mode, (by making a purchase and immediately close the game) then, it gives the following warning if I open the game and try to make another purchase.

    :\
    Roy.

  • clee2005clee2005 http://Donkeysoft.caMember, PRO Posts: 194
    edited November 2014

    @stevej said:
    As far as an item getting stuck in purchasing mode, the only time we've seen that happen if if you make a purchase and then remove the item from the purchase table. If you can come up with a repeatable example of purchases getting stuck, please file a bug report so we can fix it.

    @stevej‌ I reported http://bugs.gamesalad.com/show_bug.cgi?id=402 and found that in my implementation I can consistently get what is being described in this thread to happen. Reading this thread it's clear that people are confused about how to make the IAP purchases work ... AFTER .03, FOR, EVERY? Would help to have a solid tested example of code.

    I think the biggest issue is in the testing... seems that once you hose the process, the prompts keep occurring, which confuses the whole thing. Would be nice if there was some way within GS to reset the flags for this process so testing can begin "fresh".

  • Agent ArgyleAgent Argyle Member, PRO Posts: 188

    Did the workaround Roy posted work for you guys?

  • rvantilborgrvantilborg Member, PRO Posts: 185

    no it didn't, i already deleted all my purchases… still itunes pops up

  • Agent ArgyleAgent Argyle Member, PRO Posts: 188

    For me, in the end, all that worked was to log out of iTunes and restart my phone.

Sign In or Register to comment.