0
0blitz
Guest
Hello,
I've recently completed my android build of my game and has been released as of yesterday with everything working fine but I'm having trouble with the IAP on IOS. It works perfectly fine with Android but im confused as to why It does not work on IOS
Itunes Connect:
1) I created my 2 products on the itunes connect
Non consumable: "ios_inkescape_removeads2"
Consumable "ios_inkescape_hints2_5"
*wierd names because I've been changing the names to test
2) I created sandbox tester account and download my app through testflight to try to test in IAP
3) Bundle ID for my project is the same on my project and itunes connect (SKU is too if that matters)
4) In - App is enabled on my app on the IOS Dev center
Code Part (GMS):
In my scr_IapInit script: (where I initialize my products)
I initialize this code at the start of my room
For my remove ads button:
When I click on it; it activates this code
After the above code is aquired In my Asynchronous IAP Event activates my scr_IapConsume:
After uploading my game to IOS connect; I put my new version into testflight and download it on my IOS device to test the IAP.
The problem is when i tap on my button the game will ask me to log into my test account (If i'm not already on an apple account). But then nothing. The dialog box that appears asking if you want to buy the item for the set amount price does not appear. It appears I am connected to the store but the prompt/dialog box does not appear. Any help would be appreciated thanks!
I've recently completed my android build of my game and has been released as of yesterday with everything working fine but I'm having trouble with the IAP on IOS. It works perfectly fine with Android but im confused as to why It does not work on IOS
Itunes Connect:
1) I created my 2 products on the itunes connect
Non consumable: "ios_inkescape_removeads2"
Consumable "ios_inkescape_hints2_5"
*wierd names because I've been changing the names to test
2) I created sandbox tester account and download my app through testflight to try to test in IAP
3) Bundle ID for my project is the same on my project and itunes connect (SKU is too if that matters)
4) In - App is enabled on my app on the IOS Dev center
Code Part (GMS):
In my scr_IapInit script: (where I initialize my products)
I initialize this code at the start of my room
Code:
if (os_type == os_ios)
{
global.iap_pur1 = "ios_inkescape_removeads2"
global.iap_pur2 = "ios_inkescape_hints2_5"
}
else
{
global.iap_pur1 = "inkescape_removeads"
global.iap_pur2 = "inkescape_hints_5"
}
var purchaseList, purch1, purch2;
purchaseList = ds_list_create();
purch1 = ds_map_create();
purch2 = ds_map_create();
ds_map_add(purch2, "id", global.iap_pur2);
ds_map_add(purch2, "title", "5 Hints");
ds_map_add(purch2, "description", "Gain 5 Hints");
ds_map_add(purch2, "price", "$0.99");
ds_map_add(purch1, "id", global.iap_pur1);
ds_map_add(purch1, "title", "Remove Ads");
ds_map_add(purch1, "description", "Remove Ads");
ds_map_add(purch1, "price", "$1.99");
ds_list_add(purchaseList, purch1, purch2);
iap_activate(purchaseList);
ds_map_destroy(purch1);
ds_map_destroy(purch2);
ds_list_destroy(purchaseList);
// now to load credits
ini_open("data")
global.credits = ini_read_real("data", "credits", 0)
ini_close()
When I click on it; it activates this code
Code:
iap_acquire(global.iap_pur1, "")
Code:
// when iap event is triggered with purchase
if iap_status() == iap_status_available
{
var purchase_map = ds_map_create();
var purchase_index = ds_map_find_value(iap_data, "index");
iap_purchase_details(purchase_index, purchase_map);
if ds_map_find_value(purchase_map, "status") == iap_purchased
{
if ds_map_find_value(purchase_map, "product") == global.iap_pur2
{
if (instance_exists(obj_superController)){obj_superController.hintAmount += 5;}
show_message("5 Hints gained!");
global.canSave = true;
iap_consume(global.iap_pur2)
}
}
ini_open("data")
ini_write_real("data", "credits", global.credits)
ini_close()
ds_map_destroy(purchase_map);
}
if iap_status() == iap_status_available
{
var purchase_map = ds_map_create();
var purchase_index = ds_map_find_value(iap_data, "index");
iap_purchase_details(purchase_index, purchase_map);
if ds_map_find_value(purchase_map, "status") == iap_purchased
{
if ds_map_find_value(purchase_map, "product") == global.iap_pur1
{
show_message("Thanks for the purchase! Ads Removed and Unlimited Energy gained");
obj_superController.ads = 1;
obj_superController.energy = 8;
global.canSave = true;
room_goto(rm_levelSelect);
}
}
ds_map_destroy(purchase_map);
}
The problem is when i tap on my button the game will ask me to log into my test account (If i'm not already on an apple account). But then nothing. The dialog box that appears asking if you want to buy the item for the set amount price does not appear. It appears I am connected to the store but the prompt/dialog box does not appear. Any help would be appreciated thanks!