GDevelop cordova project to iOS doesn't work

Hi,

I dont get this to work. I want to build my project for iOS. Below is the project that DOES work. But WITHOUT ads, in-app purchases and orientation. (device sensor)

Voltbuilder :

More in comments because of 1 media limit.

Config :

With this the build will work, but the ads doesnt work in the app. :
plugin

When i change it to this,
gdevelopd

I get this error :


But " gdevelop-cordova-admob-plus" is in my original cordova project. And needs to be in the project to have the ads to work. I changed it to “cordova-plugin-admobpro” to check if that will work. And then suddenly the project worked to build. But " gdevelop-cordova-admob-plus" is the one i need.

So in short, what can i change to have ads, in-app purchases and orientation work in my project?

(In-app purchases doesnt work. But is that because its in debug mode, and can’t connect to the store information?

Thanks in advance!

Log from failed build :

Have you looked in the repo for the plugin to see if it’s a known issue?

I can’t see that you are doing anything wrong, but we’re not expert on third party plugins. You might also ask the maintainer.

If i remove the plugin “gdevelop-cordova-admob-plus” another plugin gets an error, like for example “cordova-plugin-whitelist”. So i dont suspect the plugin itself is faulty. Because “admob-plus-cordova” plugin, also doesn’t work.

Looking at your config.xml, I notice you have two widget statements:

<widget id="camdio.milo.microgame" version="1.5.2" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>Milo&apos;s Microgame World</name>
    <widget ios-CFBundleVersion="2" version="1.5.2" />

Could that be the problem?

The cfbundle was added in later, when I already had the plug-in error. So no connection to the plug-in error.

But does this interfere with each other? Because this solved the black screen. How can I write that better?

Do these plugins also have to be declared in the voltbuilder.Jason?

widget is a wrapper for the config.xml data. Having two widget statements creates two wrappers and undefined behaviour. Try this instead:

<widget id="camdio.milo.microgame" version="1.5.2" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" ios-CFBundleVersion="2">
    <name>Milo&apos;s Microgame World</name>

Plugins should not be defined in voltbuilder.json.

Hi,

I changed some things. And now the gdevelop-cordova-admob plugin downloads better then it did before. For example with pod install –verbose i always got errors. But now i get this error :

2022-07-13 19:03:14,901 - [!] CocoaPods could not find compatible versions for pod “GoogleUserMessagingPlatform”:
In snapshot (Podfile.lock):
GoogleUserMessagingPlatform (= 2.0.0, ~> 2.0.0)

But here it says it depends on 1.1 :
In Podfile:
Google-Mobile-Ads-SDK (~> 7.69) was resolved to 7.69.0, which depends on
GoogleUserMessagingPlatform (~> 1.1)

How can i change this? I am stuck for a few weeks now.

Thanks in advance!

I’m wondering why you’re running pod install directly? Can you share your config.xml and a snippet of the log containing the error you’re seeing when you try to build?

I don’t know, it isnt in the config. I sended you the link of the log.

Config :

<?xml version='1.0' encoding='utf-8'?>
<widget id="camdio.milo.microgame" version="1.5.2" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" ios-CFBundleVersion="2">
    <name>Milos Microgame World</name>
    <content src="index.html" />
    <plugin name="cordova-plugin-whitelist" version="1.3.5" />
    <plugin name="cordova-plugin-screen-orientation" version="3.0.2" />
    <access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <platform name="android">
        <allow-intent href="market:*" />

        <icon src="www/android-icon-36.png" density="ldpi" />
<icon src="www/android-icon-48.png" density="mdpi" />
<icon src="www/android-icon-72.png" density="hdpi" />
<icon src="www/android-icon-96.png" density="xhdpi" />
<icon src="www/android-icon-144.png" density="xxhdpi" />
<icon src="www/android-icon-192.png" density="xxxhdpi" />

    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />

<custom-config-file parent="UIStatusBarHidden" platform="ios" target="*-Info.plist">
    <true/>
</custom-config-file>
<custom-config-file parent="UIViewControllerBasedStatusBarAppearance" platform="ios" target="*-Info.plist">
    <false/>
</custom-config-file>
        <preference name="SwiftVersion" value="5.3" />
      <preference name="WKWebViewOnly" value="false" />

    <feature name="CDVWKWebViewEngine">
        <param name="ios-package" value="CDVWKWebViewEngine" />
    </feature>

    <preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />

        <icon src="www/ios-icon-180.png" width="180" height="180" />
<icon src="www/ios-icon-60.png" width="60" height="60" />
<icon src="www/ios-icon-120.png" width="120" height="120" />
<icon src="www/ios-icon-76.png" width="76" height="76" />
<icon src="www/ios-icon-152.png" width="152" height="152" />
<icon src="www/ios-icon-40.png" width="40" height="40" />
<icon src="www/ios-icon-80.png" width="80" height="80" />
<icon src="www/ios-icon-57.png" width="57" height="57" />
<icon src="www/ios-icon-114.png" width="114" height="114" />
<icon src="www/ios-icon-72.png" width="72" height="72" />
<icon src="www/ios-icon-144.png" width="144" height="144" />
<icon src="www/ios-icon-167.png" width="167" height="167" />
<icon src="www/ios-icon-29.png" width="29" height="29" />
<icon src="www/ios-icon-58.png" width="58" height="58" />
<icon src="www/ios-icon-87.png" width="87" height="87" />
<icon src="www/ios-icon-50.png" width="50" height="50" />
<icon src="www/ios-icon-20.png" width="20" height="20" />
<icon src="www/ios-icon-100.png" width="100" height="100" />
<icon src="www/ios-icon-167.png" width="167" height="167" />
<icon src="www/ios-icon-1024.png" width="1024" height="1024" />

    </platform>

    <preference name="AndroidXEnabled" value="true" />

    <preference name="BackgroundColor" value="0xff000000"/>

    <!-- Android Fullscreen -->
    <preference name="Fullscreen" value="true" />

    <!-- Cordova/Phonegap version -->
    <preference name="phonegap-version" value="cli-9.0.0" />

    <plugin name="cordova-plugin-vibration" spec="3.1.1">
</plugin><plugin name="cordova-plugin-purchase" spec="10.6.1">
</plugin><plugin name="cordova-plugin-consent" spec="2.3.2">
</plugin><plugin name="cordova-plugin-ionic-webview" spec="5.0.0">
</plugin><plugin name="cordova-plugin-ios-hidestatusbar" spec="1.0.0">
</plugin><plugin name="cordova-plugin-device-motion" spec="2.0.1">
</plugin><plugin name="gdevelop-cordova-admob-plus" spec="0.43.0">
<variable name="APP_ID_ANDROID" value="ca-app-pub-6900523460109821~9678872878" />
<variable name="APP_ID_IOS" value="ca-app-pub-6900523460109821~8525713894" />
</plugin>
</widget>

You’re using version 10.6.1 of cordova-plugin-purchase. Does using the current version (11.0.0) help?

Nope then i get the same message.

gdevelop-cordova-admob-plus seems to be an out of date, unmaintained version of admob-plus-cordova - is it possible for you to use this plugin instead?

When i change it to admob-plus-Cordova there are no errors in the build process. But in the final game, the ads won’t work.

At least it builds now - that’s progress. Looks like VoltBuilder is doing its job.

Have you hooked up a remote debugger to see if there are any messages on the console?

No haven’t tried that yet, will do that.