On my iPhone/iPad game app, when users touch on buy/purchase button, a dialog of in-app purchase is popping up and the whole game loop is stuck. I would like the game loop still updating while in-app purchase is processing.
Please someone point me to solution, thank you
You could move your game loop to another thread until main thread is interrupted.
Related
I've searched SO and the web and Apple's docs on in-app purchasing, and have not found an answer to this question. If I somehow missed the answer, my apologies.
I'm writing an iOS game that will have a single non-consumable in-app purchase to unlock the full game. The purchase and restore buttons are on a separate (settings) screen from the game screen. When the user makes a successful purchase, I set a flag in UserDefaults. Once that has happened, the purchase and restore buttons are unnecessary.
Is it ok to hide the purchase and restore buttons after a successful purchase so that they don't clutter up the settings screen? Or is that a violation of Apple's guidelines, or maybe just frowned upon?
It seems to me that there shouldn't be a problem with that. As long as my UserDefaults flag is true, I know that the purchase was made and the game should be unlocked, so there's no need for either the purchase or the restore button. And if, after making the purchase, the user deletes the app and reinstalls, my UserDefaults flag will be false so I will show the buttons and the user can hit the restore button in order to get the full game back.
Am I missing something?
I am debugging code for achievements in my sprite kit game. When you gain an achievement it goes immediately to 100% achieved - they are one off achievements where you have done a specific thing. The game has NOT been released on the app store.
While doing so I have (somehow) accidentally reported to Game Centre that all my achievements have been completed. To continue debugging I need to reset the achievements to the un-achieved status.
Is there a way to do this?
I know there is resetAchievements(completionHandler: ((Error?) -> Void)? but that just resets percentages of partially completed achievements.
I have 10 achievements at the moment so if there’s no possibility to reset completed achievements then I’ll need to make 10 more, which is tedious, and test them using increments in percentages instead
My app has been rejected by Apple for 4 times due to the message they sent:
"Your app is using Game Center Leaderboards and Achievements but you have not submitted the them for review."
My app uses Game Centre for Multiplayer mode, however, it does not have any leaderboards or achievements feature, game centre is simply enabled for multiplayer.
Please see the following screenshot for detail.
As you can see, under my app there is no leaderboards or achievements is selected. The only selected game centre option is "Multiplayer compatibility".
In apple's reject email says if I don't use leaderboards or achievements I can turn off game centre, however, as the game need Game Centre for multiplayer, I believe I cannot turn it off.
Under app's "Game Centre" tab in iTunnesConnect, I do have created some leaderboards and achievements, but those are for future updates which is not yet ready in this release. I didnt link those items with my app's submission as the above screenshot indicated.
The following is a screenshot shows the unfinished items I created for leaderboard and achievements. Once again, they are still under development and I didn't link any of them with the current app's submission.
And if you have a closer look I cannot actually delete every leaderboards as the 1st leaderboard item's delete button is disabled.
As it is getting very close to the app's launch date, it is getting critical. Please advice how can I fix this issue "your app is using Game Center Leaderboards and Achievements but you have not submitted the them for review."
Thank you very much!
The following is the full response from Apple:
2.3 - Apps that do not perform as advertised by the developer will be rejected
Thank you for your resubmission and for addressing the previous 2.2 issue. However the 2.3 issue is still presented in your app since the Game Center remains enabled for your app but no Game Center features were submitted.
If you intended to implement Game Center features in your app, please revise your app to include these features. Alternatively, you may wish to disable Game Center for your app and remove all Game Center references from your Application Description, What’s New info and screenshots.
2.3 Details
We still found that your app is using Game Center Leaderboards and Achievements but you have not submitted the them for review.
Next Steps
Please submit the Leaderboards and Achievements for review.
Login to iTunes Connect
Click on “My Apps”
Select your app
Click on “Game Center”
Complete the Leaderboards and Achievements set up
Select “Done”
Once you’ve completed all changes, click the “Submit for Review” button at the top of the App Details page.
Alternatively, if you do not wish to include Leaderboards and Achievements:
- Click the “Disabled/Enabled” button under “Game Center”
- Revise your Application Description, What’s New info, previews and/or screenshots to remove any content that refers to the Game Center feature(s).
ok, after contact with Apple, they have now passed my app's submission. No changes required. Game centre can be used without adding leaderboard or achievement if you are using multiplay compatibility.
My app attempts to log the player in when it finishes loading, like good little apps should (so says Apple). But if the player chooses to cancel the initial log-in, I wanted the app to re-attempt to authenticate the player if the player taps the leaderboard button in the game. (otherwise, of course, the button couldn't do anything if the player is not authenticated)
Unfortunately, after some research I discovered that Apple does not seem to allow an app try again to re-authenticate the player after the player cancels the first time, until the player exits and re-enters the game. (If the player cancels three or so times, Apple goes aggro and disables Game Center from the app on that device entirely. Even logging into Game Center from the stand alone app won't help after that point.)
Is there any way around this so that my app can attempt the authentication both when the app loads, and any time the player taps leaderboard button while not logged in? Or do I just have to have my leaderboard button display a message when not authenticated saying that Apple's being dumb and overprotective and not letting my app respond the way it should? (Perhaps not quite in those words...)
I've used an alternative approach that might solve your requirement. When they tap on the leaderboard, check the Game Center connection state.
If it is not GCPConnectionStateEnabledFully then throw up an alert like this "Error connecting to Game Center. Please make sure you are signed into Game Center and check your internet connection". Then inevitably they will leave your app to check and when they return the Login prompt will appear a few seconds after they return to the app.
Testing note: When you are testing these scenarios you might cancel the login prompt 3 times. If you do that it will stop prompting you altogether and you need to reset all settings in the Settings app. I remember this being really frustrating.
One of the iOS games that I really like (Fieldrunners 2) allows user to continue his/her game even after the app is killed mid-level (during game play). When the user launches the app again, it asks whether the user wants to continue the in-progress level.
How are they doing this? WHat is the easiest and smartest way (cocos2d and ios) to reload an in-progress game? It seems to me that there are so many states that need to be saved. Is it as tedious as I think it is?
EDIT:
When I say killed, I double clicked the home button and then I pressed and held on the app's icon and click the x icon.