AnD4D's Forum Posts

  • Oh, by the way. I picked up Ultimate Ads as well (finally) and it's running very well. It's really nice having the ability to do reward ads, which aren't available in the original Scirra version.

  • Yeah, I made a quick change to the code and noticed that glitch right after I posted it. It was a copy/paste from the above. It's now removed, but unfortunately the error still occurs.

    Now, I have separated the "cocoon-plugin-inapps-ios-appstore" and the "cocoon-plugin-inapps-android-googleplay" code into separate sections within the xml, so each plugin is only called when played on a certain device, but you may very well be correct in saying that could be the error. I'll give it a go and see if it resolves anything.

  • Still having trouble with this. Again, this is now working fine on Android, but iOS does nothing when the same code is triggered. I push the button, and nothing happens.

    I've completely restructured the code and put it all in one place so it's easier for people to understand.

    Can anyone see what I'm doing wrong? Seeing as there are almost 100 people who got it working, can anyone share a screenshot of their app's code, which works perfectly on iOS?

    That'd be really appreciated!

  • Thanks for your reply.

    Glad to hear your product's doing so well. I imagine it's something I'm doing wrong, but can't see it exactly. I'll do my best to answer your questions.

    1. Does your issue appear both on iOS and Android?

    I was originally using the official Scirra IAP plugin which was working perfectly for Android, but was broken for iOS (It crashed the app when called). When I implemented your plugin in the same manner, the Android version worked, but seemed to "forget" whether or not the IAP was purchased. I like to get Android working before I move over to iOS seeing as it's such a chore to do.

    2. Have you tested on any other smartphone?

    I've tested on 4 smartphones. All have the same issue, apart from one which has not upgraded to the new build, and so it is working perfectly as it's using the old plugin.

    3. How did you refund the product (process and platform)?

    I refunded the IAP using Google Play's Order Management section, so Android.

    4. Was it a Google test product or a regular product and if so what type of product was it?

    The app is set to closed alpha, and I have some test accounts that attempt the purchase. It's non-consumable.

    5. Do you have your Google Wallet setup completed?

    Yes.

    The image above demonstrates the manner in which I'm implementing your plugin, but I acknowledge it's not exactly showing much of my code. I'm happy to send the capx over to you, but would hate to be even more of a pain.

    This is the first time I'll be releasing an app for mobiles that includes IAP, so I expected a few stumbling blocks, but the fact that this is more challenging than releasing a game for the Wii U is very surprising. I'm determined to ensure that I can use PhoneGap to do all versions at once, which is actually working quite well for me after I separated each line as the following:

    <platform name="android">
    <plugin name="cocoon-plugin-inapps-android-googleplay" />
    </platform>
    <platform name="ios">
    <plugin name="cocoon-plugin-inapps-ios-appstore" />
    </platform>
    [/code:ug3tajk0]
    
    I've obviously cut out other app related code, such as the icons and additional plugins.
    
    The IAP In my app, is designed to set a boolean to 0 (no ads) or 1 (show ads). It's set to see if the IAP is purchased, and if it is, the boolean is set to 0. It's quite simple, so I can't see why this plugin is working differently to the official plugin. As I said, when I added in the "Restore Purchases" events and actions, it caused additional problems.
    
    The official AdMob plugin is causing a strange resizing issue with my devices, and the Interstitial ads aren't working at all with iOS, so as soon as I hear back from Scirra, I'll hopefully be picking up your ad plugin as well.
    
    Hope I'm not too all over the place.
  • At first I was really enjoying implementing this plugin, but things just don't appear to be working out for me.

    I've been chatting to the developer about it via email, but felt I was taking up too much time, so figured I'd open it up to the forum.

    I was originally using the default IAP that comes with Construct 2, and while I was getting perfect results with Android, the app was crashing with iOS. So I saw this plugin was said to work everywhere and with PhoneGap, which I use. I made all the changes and uploaded the app to the Android Play Store.

    I was able to purchase the IAP, but noted that after I refunded the purchase, the player was still able to access the content even though the no longer owned the IAP.

    The game defaults to the IAP not being purchased, then runs a quick check to see if they own it. If they own it, the content is unlocked, otherwise, it isn't.

    The developer recommended that I make use of the "Restore Purchases" action and event, but that's caused an unusual effect that (for some reason) no longer checks whether or not the purchase has been made, so the game's IAP doesn't appear to be purchased. However, upon touching the button to make the purchase, the game suddenly refreshes and unlocks the content.

    I'm reverting back to my code prior to using the "Restore Purchases" events, but I wonder if anyone could have a look at my events and let me know what I'm doing wrong.

  • Yep, I'm getting the same error message. This is insane.

  • When creating an app, on IOS, because I'm using AdMob, I find I need to insert a bit of code that reads:

    <platform name="ios">
       <config-file parent="NSCalendarsUsageDescription" platform="ios" target="*-Info.plist">
           <string>Advertisement would like to create a calendar event.</string>
       </config-file>
       <config-file parent="NSPhotoLibraryUsageDescription" platform="ios" target="*-Info.plist">
           <string>Advertisement would like to store a photo.</string>
       </config-file>
       <config-file parent="NSBluetoothPeripheralUsageDescription" platform="ios" target="*-Info.plist">
           <string>Advertisement would like to use bluetooth.</string>
       </config-file>
    </platform>[/code:3l9q0lb2]
    
    However, after adding this code, PhoneGap will now ONLY create an IOS version of the app, no longer generating Android or Windows Phone.
    
    Anybody know how to maintain the generic aspect of PhoneGap so I don't need 2 different versions?
    
    Also, why isn't this added in during the export process from @Scirra? Why do we need to edit so much code? Surely if we're creating an IOS game and we include AdMob, the mandatory code should be added for us?
    
    I've spent almost as much time jumping through hoops and figuring out the manual coding as I have creating the game.
  • My game opens perfectly fine, and runs well, but I note that rather than filling the screen, there's a black space at the bottom. Now I'm using Scale Outer, so this should work fine. I've also used letterbox and received the same result. I'm not understanding.

    Now! If I ever switch out of the game, then switch back over to it, the game pops to full screen mode, and the small black box at the bottom disappears.

    I've created another mobile app at the same time, and that one isn't showing the same problem. The only difference between the 2 is that one has ads and the other doesn't.

    Could it be that the app is preparing the space for the advert but not resizing the screen?

  • Aww, was hoping this would make it in for the stable build. Oh well. I imagine with the new architecture it's a lot easier to update C3 than C2.

    Think I need to do a bit more research into C3's mobile exporter.

  • Just as an update, I think I finally got this cracked...

    I repositioned one of the plugins (cc.fovea.cordova.purchase) and got a new error code, telling me that the plugin "com.mcm.plugins.androidinappbilling" doesn't exist.

    I looked into it a bit more and read a few notes that purchase and inappbilling seemed to do the same thing... so I went ahead and removed it.

    I then updated the initial code to:

    <plugin name="cc.fovea.cordova.purchase" > <param name="BILLING_KEY" value="YOUR KEY GOES HERE"/> </plugin>[/code:23t3yhxk]
    
    I uploaded it to Google and it all worked. Tested it out, and it looks like the code's working fine.
    
    So @Ashley - I don't know if this might help you at all, and I honestly don't know if deleting that line of code will have any knock on effects elsewhere.
    
    In any case, hope I help someone out there
  • I've been trying to get IAP working on Construct 2 and PhoneGap for about 3 weeks now, and it doesn't seem like anything I do gets me anyway.

    I heard that IAP works fine with a Construct 3 export, so I was hoping that someone could do me a favour.

    Could someone with Construct 3 make a brand new capx (or one already in use, doesn't matter), add the iap object into it, then export via Cordova and upload here a bit of text from the exported config.xml and hopefully the config.json?

    I know it's a big ask, and I have no idea if it'll help me at all. All I know is Construct 2 in combination with PhoneGap is currently broken, and there doesn't appear to be anyone who can or will fix it. Either that, or I'm missing something obvious.

    The error code I get is: "Error - One of your plugins requires a parameter: BILLING_KEY"

    and here are the plugins I'm using in my configs.

    <plugin name="cc.fovea.cordova.purchase" />
    	<plugin name="com.mcm.plugins.androidinappbilling" />
    	<plugin name="cordova-custom-config" />
    	<plugin name="cordova-plugin-ad-admob" />
    	<plugin name="cordova-plugin-file" />
    	<plugin name="cordova-plugin-inappbrowser" />
    	<plugin name="cordova-plugin-statusbar" />
    	<plugin name="cordova-plugin-whitelist" />
    	<plugin name="cordova-plugin-wkwebview-engine" />[/code:bb3kfxlu]
    
    [code:bb3kfxlu]"plugins": [
    		{ "id": "cc.fovea.cordova.purchase", "version": null },
    		{ "id": "com.mcm.plugins.androidinappbilling", "version": null },
    		{ "id": "cordova-custom-config", "version": null },
    		{ "id": "cordova-plugin-ad-admob", "version": null },
    		{ "id": "cordova-plugin-file", "version": null },
    		{ "id": "cordova-plugin-inappbrowser", "version": null },
    		{ "id": "cordova-plugin-statusbar", "version": null },
    		{ "id": "cordova-plugin-whitelist", "version": null },
    		{ "id": "cordova-plugin-wkwebview-engine", "version": null }[/code:bb3kfxlu]
    
    Somewhere I appear to be missing a variable " <variable name="BILLING_KEY" value="YOUR_BILLING_KEY" />" which may very well slot into the purchase plugin at the top.
    
    Like I said, a copy/paste of that code would be superb help. Hopefully...
  • Nepeo Will this be updated for Construct 2? I've not yet made the leap to Construct 3.

  • Nepeo - Thanks for your post. I did, however, change this version number during my export for PhoneGap and it never worked.

    I ended up opening the file up in Android Studio, and while it showed 1.0.0.1, the version code remained 10000. However, that is shown in your table. Therefore, should I have used 1.0.1.0?

    I didn't see that documented anywhere, and did search all over this site and a few others. Is the quote you posted from a manual or tutorial?

    Is this likely to be added to the export for simplicity? As you said, to avoid that small confusion?

    My current build is 0.1.0.1 because I consider it in alpha, but my version code is 10001.

    Thanks again for your reply.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • NN81 Jesus, why are you stalking me around the forum? You don't know what you're talking about and Ashley asked me to post this bug. The point of Construct is no coding. ATM, you need to do coding. Go find another project, please.

  • Not meaning to be rude, but so far I've spent 2 days explaining something to you and had to go over the same stuff way too many times before you understood. Ashley has said that if we have to go into code to get stuff to work, there's something not right.