I have already an iOS app in production, but I have change a little the purchase part. I don't remember or found if it's normal that I can't test a purchase in testfly or in debug mode/release mode.
The id purchase is detected and the product is display. My purchase test work on Android when I clic on the product, I see pop up to test a purchase. But on iOS when I clic on product I have nothing. In debug the purchase is call but no pop up to validate purchase to test, and no more information about errors.
sandbox is activated
sandboxTesting=true;
On my device setting-> itunes Store and app Store-> I have my app id add in sandbox
In app purchase is add on xcode signing and capabilities
Other observation I remember that before I had pop up to add user id and password to connect, I now I don't know why, I don't have the apple connect pop up.
The only things I did, is to try to upgrade flutter, and downgrade ( because some bug) to return to initiale version who is in production. I even try to return to the initial flutter release ( who expected to work) and I have same problem...
I try to create a new flutter projet to test purchase example from flutter package, and use my current bundle id to display my product. It's display but I have same problem : no connection pop up, no purchase pop up. nothing... but purchase is display, found, and all processus (Xcode, appstore connect, testfly .. is valid.
So I'm little afraid to publish without testing.
Before use time machine to backup all my mac before all this bug, I would have your opinion about this
Thank you
Related
So I have a paid App already for sale on the app store. I'm using the same project and creating a new target for a free/lite version. For the users that install the free version, I will have a buy button to allow them to buy the app. I would assume when they hit the buy button, I would prompt for their password and then the new app ID would be recognized allowing for the paid version? Is this how to implement a free and paid version? So far I just have the buy button in the free target, and the paid target. Am I doing this right so far? How do I proceed from here? Like programming my button for in app purchase for full version? This is certainly not a clear issue. Thank you!
In the past I made one target thats free to download. In the app you have a button that starts the in app purchase process (you don't do anything with name and password apple takes care of tht when you make the appropriate calls). Once the user successfully purchases the app, I set a boolean value in NSUserDefaults like 'isPurchased'.
In your code, anywhere where you would allow the user to either use the pro upgrade or free trial just check the value of the bool 'isPurchased' and either display the extra content or not.
**Edit
Try following this tutorial. It shows you how to set up in app purchases and how to start the process using a button.
In App Tutorial
I have created a newsstand app and have everything working. The only issues I have now are:
When I click 'subscribe' and the dialogue box pops up to confirm the in app purchase it says
Confirm Subscription
Do you want subscribe to Unknown App for free?
[Environment: Sandbox]
Why does it say Unknown App? Everything else works (receipt validation, completing the transaction & co.)
Also, will the [Environment: Sandbox] go away automatically once I upload it to the app store and download it for real? Is there something in my code that I am missing that sends the in app purchase request to the sandbox? Or is it just because i am using a test device that has the app compiled onto it from XCode.
If your app is not in app store, it shows you the [Environment: Sandbox]. It will automatically go away once you uploaded app and your app is in app store.
For "Unknown App":
You need to add text in inApp purchase section in iTunes connect. If you haven't done that it will show you "Unknown App" on message which comes on iOS pop-up.When you activate in-app purchase by filling all information in inApp purchase section, pop-up will not show you "Unknown App", rather the pop-up will mention your app name.
Hope this will help you.
If your app is not in app store, it shows you the [Environment: Sandbox]. it will automatically will go away once you uploaded and your app is in app store.
If your binary has been rejected by Apple, the IAP products submitted with it should also show up as rejected. When you try and purchase a rejected IAP within the app, the confirmation screen will show the aforementioned "Do you want to buy one Unknown App...".
To correct this you should be able to make a small change to each IAP product in iTunes Connect. Then simply change it back, then the rejected flag should go away (and be replaced by waiting for review. For example, I added an 's' to the Display Name for the English language of each product. Then went right back in and removed the 's'.
This may not be acceptable to Apple if the reason for your rejection centers around your use of In-App Purchases.
I suggest to check your itunesconnect account.
Goto your Specific App "NewStandApp" .-> Manage InAppPurchases. Now check Reference Name you have Added with your ProductID.
Product_Id your are referring in project/app (sandbox environment) might be connected with app name "Unknown app"
I created a new app and uploaded the binary to iTunes Connect, then tested IAP using the test user account, both on the simulator and on the device. Both worked.
I submitted the final app and it is currently live on the App Store. However, after deleting the development version from my device and downloading my app from the App Store to test IAP, the app immediately receives an "Invalid Product ID:" error.
Once again, the development version worked using the test user account, but live on the store it does not work and returns invalid product ID. Any ideas what this might be? If anyone wants to test this (in case it's just me) the app is called "ContaX" and is free with ads - you don't need to actually buy the upgrade, just see if it crashes after tapping the remove ads option.
I advise you to wait for 24 hours after your app is approved.
Sometimes it takes more time for the in app purchases to be available in the released application.
I am also suffering with this issue and my app has rejected two time due to this issue. I went to Apple Developer Forum to get the solution. The problem is might be with Review team's device or environment.
Here is the link of full thread: https://devforums.apple.com/thread/233371
I think it will work for you as well.
Double-check the bundle ID you've submitted the app under and the product IDs you're sending to the app. They have to match.
You may have accidentally submitted an app with a different bundle ID.
After fighting this problem for a while I realized I was using the "Apple ID" to get the In App Purchases rather than the "Product ID". So, make sure you're using the "Product ID" and NOT the product's "Apple ID"!
I'd like to share our experience. One of our apps did not have any purchase since release. It was over a month. We have tested in app purchase during development phase in sandbox mode, everything was ok.
When we deleted the development app from our device and installed the app from the app store, we got Invalid product id during purchase.
We double checked everything and tried many things. What we think done the trick is toggle "Cleared for Sale" in the iTunes connect.
We have 3 auto renewing subscriptions. In IAP page, We uncheck Cleared for Sale. then save, then again recheck Cleared for Sale, saved again on each product. remove app from the phone and download again from App Store.
Nothing seems to happen. After 30 minutes suddenly one auto renewing subscription started working. 2 other subscriptions still didn't work. After 5 hours all 3 subscriptions started working magically.
We are seeing something similar. On a new tvOS app with 8 auto-renew subscription IAPs, for the first 30 hours or so after release, none of the IAPs were available. Then one became available and now we are at 40 hours since release with still only 1 of 8 IAPs available.
I have an ad-hoc deployment of my iOS game, which includes in-app purchase. It is correctly set up with a purchasable item on itunes, and I have test users on itunes. I am able to successfully test it with my own iPod, and with a friend's iPod -- I can choose the item to purchase, get the price info correctly from the Apple server, choose to buy, enter the Apple ID and password for one of the test users, an the purchase completes successfully.
Another friend also installed the game on his iPhone and was starting to look at in-app purchase, but he followed an incorrect procedure, an now we can't get in-app purchase to work on his iPhone at all.
Specifically, he correctly signed himself out of the Store via the Settings application, then ran the game and chose the item to purchase. It correctly retrieved the price information. However, when the standard UI popped up and where he was supposed to click "Use an Existing Apple ID" he chose "Create a New Apple ID" by mistake. This brought him out of the game (game was sent to the background) and over to the web page to fill in the details for a new user. He realized that was wrong and returned to the game. But when he then tried to repeat he process, after retrieving the price info (again successfully), when he went to initiate the purchase, it errors out and never shows the standard UI where he can choose Existing Apple ID or Create New. So it's like his phone was left in a funny state. He tried rebooting the phone, reinstalling the app. Same problem. Then I recommended that he log in to the Store via the Settings app using his regular account, download a couple free apps, and then log out of the Store via the Settings app and try again. My thought was that this full process would somehow "clear out" whatever bad state his phone was in. But no dice. Same problem.
We can't figure out what state his device is in such that it fails when going to the purchase step of this sandbox in-app purchase process. I am still able to successfully complete the process on more than one other devices, so I don't think it's a problem with the state of the purchasable item or test users on itunes. It seems to be something specific to his device. I also had him using iPhone Config. Utility to watch the Console log as he went through this process. Very little was seen -- just an error code coming back after trying to initiate the purchase. (Nothing about PIPELINING errors and other web-service type errors that I've seen before when in-app purchase wasn't set up correctly on the sandbox.)
Any ideas on what state his phone could be in with respect to (sandbox) in-app purchase, and how we can clear it out?
Reset your network settings (Settings -> General -> Reset -> Network Settings)
Turn off your iPhone and turn it on again.
Wait for 15 min (This is the time iOS caches AppStore credentials)
Try running the app again.
I've created my iTunes Connect in-app test user and implemented all my in-app purchase code. I clicked on the home button -> settings -> appstore -> signout button. I launch my app through xcode. When it goes to perform a purchase transaction it continues to bring up my real itunes connect user info prompting me for the password. Even though it shows me as signed out in the settings appstore screen it never prompts me to enter my test user's email address when I'm testing in-app purchases.
Anyone have any ideas what's going on?
Might try rebooting your device. If you go into the AppStore.app, Featured Tab, and scroll all the way to the bottom where it should show your login name, are you still signed in?
Make sure you did not install your development version over distribution version.
My case:
I’ve downloaded my application from Apple AppStore – distribution version. Later, started debug session over installed application and got the same situation as described the question author. No sandbox environment for in-app purchase.
Solution:
Just uninstall the application and start debug/test your application again – xcode will install development version to your device.
Now there is a new way to log in and log out test users. Under
Settings -> iTunes & App Store
You can manage your current sandbox user. If you log out the sandbox user there you will be asked to give the email address for your user when you try buying inside your app.