Skip to content
This repository has been archived by the owner on Jul 4, 2022. It is now read-only.

Updates for Cordova >=8.0.0 (cordova 9 or 10 too) #9

Closed
darkguy2008 opened this issue Dec 25, 2020 · 1 comment
Closed

Updates for Cordova >=8.0.0 (cordova 9 or 10 too) #9

darkguy2008 opened this issue Dec 25, 2020 · 1 comment

Comments

@darkguy2008
Copy link

darkguy2008 commented Dec 25, 2020

Hello!

I'm trying to use this with Cordova 10, but it seems there's an issue (see crosswalk-project/cordova-plugin-crosswalk-webview#247 ), where it says:

Using "requireCordovaModule" to load non-cordova module "fs" is not supported. Instead, add this module to your dependencies and use regular "require" to load it.

The solution is to go into node_modules and replace all ocurrences of context.requireCordovaModule and ctx.requireCordovaModule to require:

node_modules\cordova-plugin-tapdaq\hooks\pod_install.js
5      var path = context.requireCordovaModule('path');  

node_modules\cordova-plugin-tapdaq\hooks\updateMultidexManifest.js
2      var fs = ctx.requireCordovaModule('fs'),                          
3          path = ctx.requireCordovaModule('path'),                      
4          xml = ctx.requireCordovaModule('cordova-common').xmlHelpers;  

node_modules\cordova-plugin-tapdaq-admob\hooks\pod_install.js
5      var path = context.requireCordovaModule('path');                  

plugins\cordova-plugin-tapdaq\hooks\pod_install.js
5      var path = context.requireCordovaModule('path');                  

plugins\cordova-plugin-tapdaq\hooks\updateMultidexManifest.js
2      var fs = ctx.requireCordovaModule('fs'),                          
3          path = ctx.requireCordovaModule('path'),                      
4          xml = ctx.requireCordovaModule('cordova-common').xmlHelpers;  

plugins\cordova-plugin-tapdaq-admob\hooks\pod_install.js
5      var path = context.requireCordovaModule('path');                  

Also, go to plugins/cordova-plugin-tapdaq/hooks/updateMultidexManifest.js and comment all the contents inside the function in there. Then, enable MultiDexApplication by adding this into your config.xml under <platform name="android">:

  <edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
            <application android:name="android.support.multidex.MultiDexApplication" />
            <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-0000000000000000~0000000000" />
        </edit-config>

This makes the app compile. Hope this is useful, Merry Christmas! :D

@darkguy2008 darkguy2008 changed the title Using "requireCordovaModule" to load non-cordova module "fs" is not supported. Instead, add this module to your dependencies and use regular "require" to load it. Updates for Cordova >=8.0.0 (cordova 9 or 10 too) Dec 25, 2020
@rdominic
Copy link

rdominic commented Jul 4, 2022

Apologies we couldn't help here. Unfortunately Tapdaq is being deprecated and its services turned off.
All public SDK repo's will be archived shortly and changed to private later this year.

For an alternative mediation platform we recommend IronSource.

Closing this ticket.

@rdominic rdominic closed this as completed Jul 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants