In-app payment still says it's in sandbox mode - ios

I built a in-app payment for one of my iPhone apps. It worked in sandbox mode.
I submitted my app to the app store and it got accepted. I even submit my in app payment. It got accepted and it's status is 'ready for sale'.
However, when I go get my app in the app store, it still says it's in sandbox?
Is there something in MKStoreKit that you have to transfer environments, or does it take some time for it to change?
I currently pulled it from the store because of it. Please help! Thanks.

Hmmm. Are you using your Test User ID or a real Apple ID?

When this happens, it's usually because you previously used the same device for testing IAP in sandbox mode. To fix, just go into "Settings", then go to "Store", then log out and back in again. That should clear that up, assuming that you are actually using the archived app that you downloaded from iTunes, rather than your dev copy.

Re-released my app today so I could get it and see if the in app payment would work. Surprisingly, it worked and it wasn't in sandbox mode! So I guess it just takes time for apple's servers to make the change.
If anyone else had this problem, don't fret like I did! Just wait and be patient. Hold for developer release and wait around 24 hours and you should be good!
Here's the real solution (edit):
Set your availability date to the future so it will be removed from the app store
Set your availability date to the day it is so it will re appear

Related

Old style in app purchase dialogue

I am testing in app purchases now. In my app I use auto-renew subscription with sandbox account. I use XCode 9.2, the device is iOS 11.2.6, swift v4. Everything is working as expected, but I always get this dialogue then I press the "subscribe" button:
I saw the video from WWDC. Here is the screenshot from WWDC 2017 - Session 305 - Advanced StoreKit.
I am not sure, maybe this is normal behaviour. Maybe this is because of my sandbox account. Is it possible to get this new dialogue?
Yep, this is completely normal!
For some reason purchases inside of a sandbox (such as using a sandbox account or on TestFlight) will still use the old UI.
It's not clear why Apple has made this decision, or perhaps they simply never bothered to change it.
Either way, it's nothing to worry about on your part :)

How do I replace an old expired iOS app with a new app that I built from the ground up?

I have what I believe to be a pretty unique situation and I can't seem to find a solution online. The problem timeline:
4 years ago I paid a developer to build/upload an app to the iOS App Store for me under my own developer account.
Over the years it became outdated and this April it was kicked out of the App Store
I took some online courses this year and rebuilt the app from the ground up.
I would like to post my rebuilt version to the App Store - completely fresh like it's a brand new app (because it basically is)
A couple more things to consider...
I used Swift vs the original Objective-C that the developer used.
I used UserDefaults instead of what appears to be iCloud. (the dev account seems to be littered with permissions for things I don't intend to use - so advice on how to get rid of all of the weird stuff I don't use would be helpful, too)
I also have a different but similar bundle identifier (it replaces "RandomRuby" with "Random-Ruby") that Apple's App ID registration system seems to not like.
The level content and game play are the same - but I have no idea how to figure out what level the previous users were on. (which I'm ok with if it's ethical to make people start over).
It had In-App purchases (they could purchase consumable "Rubies" to use for hints and there was an "Ad Free" upgrade option. The new app doesn't use ads - it just has consumable "Rubies" for monetization). I have no plan to add ads back in - so I imagine a complete reset would be ok here, too? Again - is that ethical?
With all of this context - my question is...
How do I upload a completely-rebuilt-from-scratch app with the exact same name from the exact same company as an expired app through the iOS Developer system? Is this even possible? I'm having a hard time figuring out where to start. I can't even get past creating an App ID.
To update an existing app in your Apple Developer account you only need to use the same BUNDLE ID (e.g. com.apple.keynote) in your Xcode project and a higher version/build number. Everything else is not relevant.
Your previous iOS APP is bounded with the Apple Developer account when it was submitted. And the APP name is unique, just like anyone else may not create another app named 'Facebook'.
So, if the Apple Developer account was not yours, you are in trouble. You need to ask the previous programmer to transfer the APP to you.
If the Apple Developer account was merely expired, and you can prove that the account belongs to you, I guess you can contact Apple Support for help.

I need to check the itunes store to see if a user has bought a subscription in the past version of my app

I'm rolling out a new version of an iPad app, and you could buy subscriptions on the old version. However, the new app has different subscriptions than the old one did, but I still need to know if they used to have a subscription, so I can apply it to the new app.
So, how can I check the iTunes store to see if they bought a certain product in the past when they load the app? From what I can tell it should be possible to do because it is the same app and connected to the same app ID in the iTunes store.
I'm trying to get some sample code to put in here but I have literally no idea where to even start.
You can use the SKPaymentQueue's -restoreCompletedTransactions to restore everything apart from non-recurring subscriptions. Your observer should get then receive every relevant transaction since the beginning of time, each with a state of SKPaymentTransactionStateRestored.
Apple requires you to support transaction restoration so hopefully your old version's code should have this built in somewhere, behind a 'restore' button or similar.

IAP fails after release, but no in development stage

Here is the history of my app.
In v1.0 I didn't have IAP.
In v2.0 I had IAP code, and it worked while I was developing. When v2.0 was released, I checked and run a non-testing device (an iPhone under my itunesconnect user name, but does not have provision file installed, so I take it as a non-relevant device) and I got error message, which of course was set up by myself. The error is for situation that the app could not connect to Apple or could not find IAP for the app. The error shows up quickly right after clicking buy IAP. This is as expected since no product ID is available. It doesn't need wait payment queue at all.
Then I checked itunesconnect and found the IAP probably not linked to the app, so I updated to v2.1 and added the IAP to my app in itunesconnect (no real code change, at least no IAP-related code changed), and IAP works fine finally in development stage in my testing iPad. Now v2.1 came out, but I still have the same problem as v2.0, that means IAP encounters error, most likely no IAP product ID found. At the time I'm typing, v2.1 has been released for 2 hours, and I still have quick error --- the product ID problem, most likely.
[edit]
BTW, there was a glitch between v2.0 and v2.1. When I noticed the IAP was not linked to my app, I did something too quick so that I cannot remember exactly. Basically the IAP was hung over there, I could modify it or submit it. After talking to Apple, I was told I need reject my binary of v2.1 and resubmit v2.1 along with the IAP. I don't know if this is related, but anyway I can buy IAP in development stage with my sandbox testing iPad.
[edit]
Any idea? Thanks.
BTW, the app is set to English default, but with Chinese/Spanish localization.
[edit]
One more thing, don't know if it's related. All v1.0, v2.0, and v2.1 versions are deployed to iOS 6 or later. When I was developing v2.1, I was trying to back to iOS 5 (via adopting so deprecated methods or constants). My app could run on iOS 5, but IAP wouldn't work iOS 5. Since IAP doesn't work, there's no point for me to go compatible with iOS 5, so I removed all deprecated methods and constants and went back to original v2.0 version and resubmitted with linked IAP to become v2.1.
For those who cares, here is my app. You're welcome to try. long press first page would get you to options page where you can try buy IAP --- no worry, there is supposed to be a confirmation dialog where you can cancel, even if my IAP works.
https://itunes.apple.com/us/app/icalc24!/id566916783?mt=8
[edit]
One more edit:
OH yeah, it works now. I don't which step of the following make it work:
1, I delete my app and restart my iPhone again (and again, yes) and re-download
2, it's 4 hours now after v2.1 is approved.

nil localizedTitle in SKProduct

I'm implementing an in-app store and am successfully getting SKProducts from the app store. The price information and description in the SKProducts are fine, but all my localizedTitles are nil. In iTunes Connect, the reference name is set, and I added an English language and set the Display Name and Description. Any idea why localizedTitles is coming back as nil?
Same issue here, check https://devforums.apple.com/message/681255 - you are not alone. It's something at the Apple side.
Roll back your version number in Xcode.
For example, in my situation, I had MARKETING_VERSION=1.23 in Xcode. I had submitted this on App Store Connect as version 1.23. Apple then rejected version 1.23 in review. After this rejection, SKProductsRequest continued to serve a list of SKProducts, but each product's .localizedTitle and .localizedDescription were set to nil.
In Xcode, I changed my version number (i.e. MARKETING_VERSION) back to 1.22. After this, the .localizedTitle and .localizedDescription were served correctly again.
Temporarily changing the version number is a workaround for testing and development prior to resubmitting your app for review.
This is surely a bug on Apple's side. I have submitted a bug report here, but it seems like I can't get a public link to the report.
Apple seem to have broken this at some point between the 20th of June and the 21st for both iOS and Mac app stores (both live and sandbox). Unfortunately if you are trusting in a valid response your app will crash.
For anyone with a live app if you don't require a persistant internet connection a short term work around for some users can be to enable airport mode on iOS, not sure if "turn off your internet connection" is much help to anyone experiencing this on the Mac app store.

Resources