tufanv Expert Licensed User Longtime User May 14, 2018 #1 Hello, I want to display the localized price in my app. I use : Code: Copy mystore.Initialize("MyStore") mystore.RequestProductsInformation(Array("product1")) Code: Copy Sub mystore_InformationAvailable (Success As Boolean, Products As List) Log(Products) If Success Then For Each pr As ProductInformation In Products btnsubscribe.Text="Subscribe for " & pr.LocalizedPrice & " / Month" Next End If End Sub this code gives an error : B4i line: 1274 For Each pr As ProductInformation In Products expected expression this if valid for both hosted and local , I cant compile it. what am i missing here ? Last edited: May 14, 2018
Hello, I want to display the localized price in my app. I use : Code: Copy mystore.Initialize("MyStore") mystore.RequestProductsInformation(Array("product1")) Code: Copy Sub mystore_InformationAvailable (Success As Boolean, Products As List) Log(Products) If Success Then For Each pr As ProductInformation In Products btnsubscribe.Text="Subscribe for " & pr.LocalizedPrice & " / Month" Next End If End Sub this code gives an error : B4i line: 1274 For Each pr As ProductInformation In Products expected expression this if valid for both hosted and local , I cant compile it. what am i missing here ?
Erel B4X founder Staff member Licensed User Longtime User May 14, 2018 #2 Maybe a name conflict with another module? Is there a global variable named pr? Upvote 0
tufanv Expert Licensed User Longtime User May 14, 2018 #3 Erel said: Maybe a name conflict with another module? Is there a global variable named pr? Click to expand... I tried to change the pr to something else , no luck. There is no other pr decleated. other utils are dateutils,b4xloadingindicator,kvs Upvote 0
Erel said: Maybe a name conflict with another module? Is there a global variable named pr? Click to expand... I tried to change the pr to something else , no luck. There is no other pr decleated. other utils are dateutils,b4xloadingindicator,kvs
tufanv Expert Licensed User Longtime User May 14, 2018 #4 it is pretty interesting , when i compile without product information and I buy the item with sandbox , For a minute or two I can compile with this code and get the product price but after that it is impossible again. It is very confusing. Upvote 0
it is pretty interesting , when i compile without product information and I buy the item with sandbox , For a minute or two I can compile with this code and get the product price but after that it is impossible again. It is very confusing.
Computersmith64 Well-Known Member Licensed User Longtime User May 14, 2018 #5 What is the output of your Log(Products) statement? - Colin. Upvote 0
Erel B4X founder Staff member Licensed User Longtime User May 15, 2018 #6 You can send me the project and I'll check it. Upvote 0
tufanv Expert Licensed User Longtime User May 15, 2018 #7 Computersmith64 said: What is the output of your Log(Products) statement? - Colin. Click to expand... if i delete the error giving lines i can compile and products are : "<SKProduct: 0x1c401b7a0>" Upvote 0
Computersmith64 said: What is the output of your Log(Products) statement? - Colin. Click to expand... if i delete the error giving lines i can compile and products are : "<SKProduct: 0x1c401b7a0>"
tufanv Expert Licensed User Longtime User May 15, 2018 #8 Erel said: You can send me the project and I'll check it. Click to expand... sent. thank you. Upvote 0
Erel B4X founder Staff member Licensed User Longtime User May 15, 2018 #9 Can you post the full compilation window error? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User May 15, 2018 #10 No need. I see it now. Upvote 0
Erel B4X founder Staff member Licensed User Longtime User May 15, 2018 #11 It's is a problem in iStore library. It will be fixed in the version included in B4i v5.0. Workaround is to add this code to the module: Code: Copy #if OBJC #import <StoreKit/StoreKit.h> #End If Upvote 0
It's is a problem in iStore library. It will be fixed in the version included in B4i v5.0. Workaround is to add this code to the module: Code: Copy #if OBJC #import <StoreKit/StoreKit.h> #End If
tufanv Expert Licensed User Longtime User May 15, 2018 #12 Thank you very much Erel. It works now. Erel said: It's is a problem in iStore library. It will be fixed in the version included in B4i v5.0. Workaround is to add this code to the module: Code: Copy #if OBJC #import <StoreKit/StoreKit.h> #End If Click to expand... Upvote 0
Thank you very much Erel. It works now. Erel said: It's is a problem in iStore library. It will be fixed in the version included in B4i v5.0. Workaround is to add this code to the module: Code: Copy #if OBJC #import <StoreKit/StoreKit.h> #End If Click to expand...