PeterStaev / nativescript-purchase

:moneybag: A NativeScript plugin for making in-app purchases!
Apache License 2.0
83 stars 28 forks source link

getProducts() returns an empty array #90

Closed alexisconsuegra closed 4 years ago

alexisconsuegra commented 4 years ago

Hi Peter, I have two questions since I am also getting empty product array.

Are the products in the tutorial still good? purchase.init([ "org.nativescript.purchasesample.product1", "org.nativescript.purchasesample.product2" ]);

Since Play Ground will not be a good tool to test. Will Native Script Side Kit be used to build and deploy to a device? I am using it for a while but never with the purchase plugin before

PeterStaev commented 4 years ago

Hey @alexisconsuegra , I'm not using SideKick so can't say for sure. You have to try for yourself and post back the results 😉
If Sidekick uses the the native libs to compile the project it should be ok. But if it uses the playground type build with the QR code then it wont work. Also note that you will need to make the adjustments to the XCode project for iOS as described in my part 2 tutorial

alexisconsuegra commented 4 years ago

Thanks Peter, I don't use XCode. So It is safe to say I would not be able to use the plugin?

PeterStaev commented 4 years ago

I'm not sure about Sidekick but the CLI behind the scenes uses XCode. So I can't say for sure if you will be able to or not use the plugin.

alexisconsuegra commented 4 years ago

Sidekick uses Xcode to build for sure. I am using the cloud build feature since I don't have a Mac. I don't see a way to configure the flag Automatically manage signing. I will ask the community for any one using the plugin this way. Just to have one less variable. Regarding the products. Are those in the tutorial still "good". Just to test getProducts().

PeterStaev commented 4 years ago

Not sure if it will work with cloud build as there are manualy steps to configure the project correctly. Also not sure what do you mean by "good" - those products you have to set up for your app in your Apple developer account following the tutorial.

alexisconsuegra commented 4 years ago

I understan I must create the products in the Apple Developer Account and I did created my owns, but i don't see in your tutorial how those products are linked to the account. So I wonder if any one could use org.nativescript.purchasesample.product1", "org.nativescript.purchasesample.product2 since they were created once correctly. I am trying to have less variable to troubleshoot.

PeterStaev commented 4 years ago

Last time i checked products weren't tied to a specific app. But again try it yourself and if Apple allows you enter those IDs then they should be fine :smile:

PeterStaev commented 4 years ago

No further response so closing this one for now. In case you still have problems, please provide more details.