I have been trying to grab the In-App purchases for around 2 days now, with no success at all.
Let me begin by saying what I have on iTunesConnect:
- An app added with bundle ID: com.recklessnewmedia.com.dizzyheights
- In-App purchases created with ‘Product ID’ of: jumpHigher, lowGravity, proGame and widePlatforms
- I have added these In-App purchases to the app under the ‘App Summary’ page
In my code I have an array of products that I am trying to pull. I have tried a few different formats for the ID here, including the In-App Product ID on it’s own, suffixed with the bundle ID, and suffixed with the bundle ID minus the app name. Below is the code:
[code] – Load products
local listOfProducts =
{
“com.recklessnewmedia.dizzyheights.jumpHigher”,
“com.recklessnewmedia.dizzyheights.lowGravity”,
“com.recklessnewmedia.dizzyheights.proGame”,
“com.recklessnewmedia.dizzyheights.widePlatforms”
}
y = 100
function productCallback( event )
print(“showing valid products”, #event.products)
for i=1, #event.products do
item = display.newText( event.products[i].title, (screenW*0.5), y)
y = y+50
localGroup:insert(item)
print(event.products[i].title)
print(event.products[i].description)
print(event.products[i].price)
print(event.products[i].productIdentifier)
end
print(“showing invalidProducts”, #event.invalidProducts)
for i=1, #event.invalidProducts do
print(event.invalidProducts[i])
end
io.flush() – remove for production
end
store.loadProducts( listOfProducts, productCallback )[/code]
Like I said, I have also tried:
-- Load products
local listOfProducts =
{
"com.recklessnewmedia.jumpHigher",
"com.recklessnewmedia.lowGravity",
"com.recklessnewmedia.proGame",
"com.recklessnewmedia.widePlatforms"
}
And:
-- Load products
local listOfProducts =
{
"jumpHigher",
"lowGravity",
"proGame",
"widePlatforms"
}
In all cases XCode Console reports:
Oct 19 09:59:18 unknown UIKitApplication:DizzyHeights[0xd11][13191] <notice>: showing invalidProducts 4<br>Oct 19 09:59:18 unknown UIKitApplication:DizzyHeights[0xd11][13191] <notice>: jumpHigher<br>Oct 19 09:59:18 unknown UIKitApplication:DizzyHeights[0xd11][13191] <notice>: widePlatforms<br>Oct 19 09:59:18 unknown UIKitApplication:DizzyHeights[0xd11][13191] <notice>: proGame<br>Oct 19 09:59:18 unknown UIKitApplication:DizzyHeights[0xd11][13191] <notice>: lowGravity
Any help is massively appreciated. I’m at that “about to throw monitor through window” stage with this at the moment.
Thanks [import]uid: 61422 topic_id: 16608 reply_id: 316608[/import]