Xcode 12 iOS 14 .storekit restore purchase testing - testing

How do I test restoring a purchase with the new .storekit in Xcode 12? When I call SKPaymentQueue.default().restoreCompletedTransactions(), it goes straight to paymentQueueRestoreCompletedTransactionsFinished(_ queue: SKPaymentQueue) with 0 transaction.
There is not a single mention of "restore" in this 25 minutes WWDC video, nor this documentation article also from Apple, nor in any of the handful tutorials on the Internet. What's even more puzzling to me is I can cannot find any complains/questions regarding this?!
I feel like I have gone mad. It would be great if someone can shed some lights. Thanks in advance!

Just to confirm for people who find this via search: There is no way to unit test restoring purchases via the new Xcode 12 StoreKit Test tools (SKTestSession and related).
The best you can do (again, as of early 2021) is to test this stuff the old fashioned way:
Make a sandbox purchase
Delete the app off your test device
Reinstall the app
Use your app's restore purchases button
Manually confirm the purchase was restored
Fingers crossed for WWDC this year...

Related

2 Important Testflight Advice Questions

Hope you're well. Two quick guidance questions from the community. And I really value your advice. We're a fintech company and hoping to do an external tester effort of a few thousand folks in testflight. That said, had two questions:
I recall it's not possible to test actual transactions in testflight (commerce, banking, otherwise). Is that the case or am I mis-remembering?
Irrespective of the above, one of the concerns is the transition from testflight to live app store. If I recall correctly, there's no way to port X number of people in your external tester effort to the live app and save their info, correct? You basically have to start fresh with those folks (i.e. have them go to the app store, download the released/consumer version, then set up all new accounts where it'd be hard to port to their new accounts their testflight account data)?
Warmest thanks for the feedback! Hope the appreciation comes across.
Evan

Crashlytics/Fabric - Will my app crash after deleting Account / project?

I'm planning on deleting my crashlytics account.
But before I do that, how do I know the previously released versions of my ios app which talks to crashlytics will continue to work (aside from the crash reporting)?
It shouldn't crash because the account was deleted right? I'm trying to find any documentations that will tell me it won't crash, but I'm not seeing any.
Thanks
Great questions, we recently shipped a docs that will help you to understand what will happen "After March 31, 2020". Her is the link to the docs. If you still have questions, please reach out us AT 'support#fabric.io'

Are your TestFlight beta apps not being pushed out automatically?

I don't know if this began commensurate with the release of iOS 9 or Xcode 7.1, but for the past week or so, my app updates (which I am beta testing through TestFlight) that I upload to iTunesConnect are not being automatically pushed out to my test team. Anyone seen this as well?
Update 1: I don't know if it is coincidental, but when (and only when) I go to iTunesConnect, select the app I am testing, then select the TestFlight tab, does the update get pushed...huh?
Just wanted to chime in and say that this is also occurring with some of my applications. We had one application test build not go out for 2 days because we didn't try to login to iTunes Connect.
Not entirely sure what is going on at Apples end, but it's definitely a weird bug...
The Apple servers have been slow the past couple days effecting many different areas such as submitting apps, etc.

iTunes Connect doesn't ask for updated screenshots?

I've updated my iPhone app to support the iPhone 5 screen..
I've done this before for another app and I was forced to upload new screenshots taken with the iPhone 5.
This time however, iTunes Connect just displays the status as "waiting for review" and isn't mentioning anything about the screenshots..
I'm slightly worried something has gone wrong? App works great on iPhone 5 and simulator though.
It turns out Apple can block apps during the review process that have something wrong with metadata. If they decide your metadata is wrong they'll just change your app's status to "Metadata Rejected".
Here's the quote from the rules for this status:
Appears when specific metadata items aside from your binary have not
passed review. To resolve the issue, edit the metadata in iTunes
Connect and your existing binary is then reused for the review
process. You receive a communication from App Review in the Resolution
Center regarding the reason for the metadata rejection.
When things change to the AppStore (Apple adds a device) they might require you to get new screenshots. But if nothing changed in their system, it's normal that they don't ask.
Don't worry!
They copy over the screenshots from your last version of the app (or is your Retina4 screenshot section in itunesconnect empty?). So if you donĀ“t want to update them, it should be okay like this.
Chances are your app has not hit review (and now as of the 21st) and won't be reviewed until after the 29th. Once your app hits review, it will become rejected for the missing screenshots. If you want to save yourself some time and pain, update the screenshots while Apple is on their downtime for the Christmas holiday. You'll thank yourself later.
My app got accepted yesterday, no word about the screenshots.
App works fine on iPhone 5, mailed Apple to complain this probably is a bug (iTUnes Connect does not recognize localized Default.png, which is what is checked to verify it is iPhone 5 optimized I believe.)

Logging into Game Kit Sandbox Problems

I am trying to use Game Kit for leader boards and achievements. I am trying to login using the code in the Apple documents. It works fine apart from it isn't logging into the sandbox. It pops up the pannel asking if I want to "Use Existing Account", "Create New Account" or "Cancel". Now I've seen in tutorials before, under the "Sign in to Game Center" title it says " * * * Sandbox * * * ", however mine does not.
I have set it up in iTunes Connect, I have created a Provisioning Profile and everything has the same bundle identifier (including in the xcode Project). I have even added gameKit BOOL YES into the info.plist. It's driving me slightly spare so any suggestions would be greatly appreciated. I am also using Cocos2D though I can't see how this would be affecting me logging in sandbox mode.
If anybody has anything they can sugest or has experienced this problem, please let me know.
Thanks again everybody.
Baza
Its because your jailbroken. It likely has to do with AppSync, there was a problem a few months ago where everyone was getting put into the sandbox for any game center app. After several attempts at fixing it with no success, they probably went ape s*** and disabled all kinds of sandbox stuff. After several hours of digging, I have not found a way to get into the sandbox. Partially because the Google results are littered with links trying to DISABLE the sandbox.
I fixed this problem a long time ago but I thought I'd tie up the loose end.
It was basically from my own ignorance. When testing a Game Center App you need to create a Apple ID via iTunes Connect -> Manage Users and then create a test user.
Simple solution and came from me skimming the docs and not reading them properly. Lesson learnt. :-D