iOS In-app purchase nightmare - ios

We are developing an App with Ionic and cordova-plugin-inapppurchase. We've been struggling more than a week as we get the following error when we try to restore a purchase:
RMStore: unknown product id com.company.appname.myID
{"errorMessage":"Unknown product identifier","errorCode":100}
productId = 'com.company.appname.myID';

This post is old, but I was able to fix this problem for myself tonight. Using Ionic v1 with the cordova-plugin-inapppurchase, my solution was to change com.company.appname.myID to just myID (the product id of the in app purchase).
I also had a few other problems causing the same exact error message. The main one was needing to inAppPurchase.getProducts(productIds) before attempting inAppPurchase.buy(productId). Also, make sure you're testing on a real device, with a test account created on iTunes connect, and logged out of any other apple ids on your device (I signed out through the iTunes Store app).
Good luck future readers!

Related

Unity IAP not working in Apple Testflight

Having issues for the past days trying to make the IAP work on TestFlight for my 1st game app.
IAP works fine in Unity Editor (fake store) and also on Google Play (internal test track).
I don't receive any product prices from the apple store and the buy buttons have no effect (no callbacks on ProcessPurchase or OnPurchaseFailed since I show popup windows for both scenarios).
Below is the status of my app and IAP :
From other similar threads everything should be ok and working as TestFlight doesn't require the IAPs to be submitted nor it requires for sandbox users to be manually created.
Any hints on what to further test or how could I check logs/warnings/errors are much appreciated, thanks.
Tools used : Unity 2019.3.0 (IAP 2.0.6) and XCode 11.3.1
Update 1: OnInitializeFailed() is called with NoProductsAvailable err
The reason why the initialization failed with NoProductsAvailable was because I didn't have an active agreement for paid apps, although it is testflight and there are no real money involved, you still need to have this setup.
Here is how it should look like :
Once this was solved the IAPs worked fine.

Check subscription status in iOS app Ionic 2

I am currently developing an in-app purchasing in Ionic 2 and each time the app is run I check if a user is subscribed. For Android I use restorePurchases function. For iOS I am trying to use getReceipt() function. What I get is a long Base64 receipt string.
My question is, how am I supposed to check if a subscription exists using that string?
Thank you in advance.
I am answering the implicit question of why this error could occur:
Many things can go wrong causing this error, which most of them has nothing to do with your code actually. just your setup. for this to work in a test device
You should be logged in that device using a iTunes Connect sandbox
account.
You should be logged in your Mac using sandbox account. (not sure why, but I read somewhere you have to, and I do it!)
The Bundle ID everywhere should match. that is in your iTunes Connect, your ionic app's Config.xml
should not have production version of the app on your device
hope others provide better answering explaining why this is so difficult to get to work!

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.

Can I Keep Test Ads on For My Specific device?

I have a quick question regarding test ads. I have an app in the IOS AppStore that is using Google AdMob. I received an email today saying that my account was temporarily suspended for clicking on my own ads. I had test ads enabled in development to prevent just this; however, I removed the test ads in my final release.
My question is: Can I keep test ads on for my specific device?
In my code I have:
request.testDevices = [kGADSimulatorID, "My Device ID" ]
Since the ID is specific to my device can I leave it there in an AppStore release? or Will this cause issues in the future?
I just want to make sure I don't get a permanent suspension. Thanks!
-Matt
Since the ID is specific to my device can I leave it there in an AppStore release? or Will this cause issues in the future?
Yes, you can leave your device ID in the testDevices field for release, and it is in fact required by AdMob guidelines (as you seem to have found out). Since the ID is specific to your device, it will not cause any problems.

Anyone success which In App Purchase ANE for Adobe air?

I have tried two versions of In Freshplanet
and StickSports
but both of them failed. When I try to get product info, no error throws out, just empty array returned in success handler. Is there anyone success with In App Purchase in Flash? Following are my info:
Bundle ID matchs App ID. YES.
One binary version was uploaded to Appstore and rejected later. YES.
in app purchase Product status: Ready to submit and Waiting for review(two products).
Correct product ID: I tried both full and short one: "testproduct" and "APP_BUNDDLE_ID.testproduct" but both fail.
http://distriqt.com
Very easy to set up with clear instructions. Also supports Google Play Store.
App currently in the Apple App Store using the ANE.
https://itunes.apple.com/gb/app/prime-mover/id595928344?mt=8

Resources