InApp Purchasing IOS - Help

Guys,

I just want to test some code for inapp purchase… can someone please tell me do I actually need to have the app approved by apple?

These are the steps I have taken

  1. Added a new AppID IOS provisioning portal (no wildcards)
  2. Added a new development provisioning profile and associated the appID
  3. logged into Itunes connect, created a new app, filled in the required details (including uploading images)
  4. Added inapp purchase items

The app is at the “prepare for Upload” stage and the inapp is “waiting for image” stage.

So does that mean i should be able to test? or do i need to upload a half done app? (which makes no sense)

Thanks

[import]uid: 67619 topic_id: 24305 reply_id: 324305[/import]

When I was testing IAP I didn’t have to upload an unfinished app to do testing.

From what I can tell, it looks like you’ve done everything that’s needed except that you have to change the status of the IAP item to “Cleared for Sale”. You’ll find that option in the “Pricing and Availablity” section. [import]uid: 70847 topic_id: 24305 reply_id: 98189[/import]

sorry… I did do that… when I was adding the inapp item… I did check that…

so does it matter if I have a provisioning profile? or a distribution ad hoc?

also how long does it take for the information to propagate through?

Thanks [import]uid: 67619 topic_id: 24305 reply_id: 98192[/import]

Hmmm, it might be that the info hasn’t propagated then…

As for how long it takes for the info to propagate, I’m not sure. I remember that I set up my IAP items a couple of days before I did any testing, and they were active when I tried.

I don’t think that AdHoc/Dev Provisioning Profiles should matter, but I’ve never used AdHoc profiles myself. I only use Development profiles for my testing.

FWIW I’ve read about other cases where the developer had to upload a binary first and then reject it before IAP testing could be done, but that wasn’t the case for me.
EDIT:
You also have to set up a special AppleID for IAP testing. Have you done that?
(ITunes Connect->Manage Users->Test User) [import]uid: 70847 topic_id: 24305 reply_id: 98195[/import]

yeah I have created the test user… but they don’t come into play until the application asks for the user name when it runs on the iphone/ipad right?

might be a waiting game :slight_smile:

[import]uid: 67619 topic_id: 24305 reply_id: 98197[/import]

Before you test the app on your device you must sign out if there already is another appleID signed in on that device, otherwise the app will never ask for your test ID. [import]uid: 70847 topic_id: 24305 reply_id: 98201[/import]

Very true… thanks for reminding me [import]uid: 67619 topic_id: 24305 reply_id: 98203[/import]

I am using the below code just to check to see if it does talk to the apple server etc…

it does

but it returns #event.products as 0… so does that mean no products have been approved?

[code]

store = require(“store”)

local ScreenText = display.newText(“Hello World!”, 100, 100, native.systemFont, 30)
ScreenText:setTextColor(255, 255, 255)

function transactionCallback( event )

ScreenText.text = event.transaction.state
store.finishTransaction( event.transaction )
end
store.init(“apple”, transactionCallback)

function loadProductsCallback( event )
print(“showing products”, #event.products)

ScreenText.text = #event.products
for i=1, #event.products do
local currentItem = event.products[i]
print(currentItem.title)
print(currentItem.description)
print(currentItem.price)
print(currentItem.productIdentifier)
end
print(“showing invalidProducts”, #event.invalidProducts)
for i=1, #event.invalidProducts do
print(event.invalidProducts[i])
end
end

arrayOfProductIdentifiers =
{
“this.is.my.product.ID”,
}
store.loadProducts( arrayOfProductIdentifiers, loadProductsCallback )

[/code] [import]uid: 67619 topic_id: 24305 reply_id: 98220[/import]

It looks like that code should work.
If the Test user you’re using is for the American app store, I would assume that the products should show up quickly.

You did mention that your IAP item has a status of “Waiting for image”. I *think* that I uploaded an image of the screen where my IAP button was visible at the same time I registered the item, but I’m not sure… [import]uid: 70847 topic_id: 24305 reply_id: 98226[/import]

yay… it finally working… I did NOT upload an image for the inapp purchasing…

When i went and had a look at the tax info this morning I realised that it was still in the pending section, it looks like something had not saved. After re-saving, it seemed to work.

Just out of curiosity though, now that I have it working under the development provisioning profile, to finalise and submit to the app store, all I have to do is,

  1. Create a distribution provisioning profile

I don’t need to muck around with anything else yeah?

Thanks

Vik [import]uid: 67619 topic_id: 24305 reply_id: 98461[/import]

That sounds correct… (+ uploading an image for the final IAP approval) [import]uid: 70847 topic_id: 24305 reply_id: 98463[/import]