cordova-plugin-googlemaps icon indicating copy to clipboard operation
cordova-plugin-googlemaps copied to clipboard

Cordova iOS 7.0.1 'cordova/CDVCommandDelegateImpl.h' file not found

Open narenderreddych opened this issue 1 year ago • 33 comments

I'm submitting a ... (check one with "x")

  • [ x] question
  • [x ] any problem or bug report

OS: (check one with "x")

  • [ ] Android
  • [x ] iOS
  • [ ] Browser

cordova information: (run $> cordova plugin list) cordova-plugin-googlemaps

'cordova/CDVCommandDelegateImpl.h' file not found 

Its working as expected Cordova iOS version 6.2.0 I have upgraded the macOS 14 | Sonoma xcode 15 Node|npm Git Cordova iOS 7.0.1 latest version facing issue -- tried with sample application integrating only one maps plugin. Getting Build issues "cordova/CDVCommandDelegateImpl.h file not found".

If you use @ionic-native/google-maps, please tell the package.json (only @ionic-native/core and @ionic-native/google-maps are fine mostly)

@ionic-native/core : 
@ionic-native/google-maps : 

Current behavior:

Expected behavior:

Screen capture or video record:

Related code, data or error log (please format your code or data):

Please share your project files on Github or others(Bitbucket, Gitlabs...etc).
If you don't want to share your project files, please create a demo project, then share it.

Screen captures, and/or native logs(such as Logcat, xcode logs) are appreciate.

Giving much information, you are waiting time is less.
Thank you for your cooperation.

Support this plugin activity

I appreicate if you give me a beer :beer: from here macOS 14 Sonoma

narenderreddych avatar Dec 07 '23 12:12 narenderreddych

Same error, did you manage to solve it, I get error when installing the plugin:

apple-xcode version check failed (/Users/toni/desarrollo/app/etsiam/cordova/platforms/ios/cordova/apple_xcode_version), continuing anyways. apple-ios version check failed (/Users/toni/desarrollo/app/etsiam/cordova/platforms/ios/cordova/apple_ios_version), continuing anyways.

tmwebs avatar Dec 13 '23 12:12 tmwebs

I could not resolved the issue. I get error when installing the plugin:

apple-xcode version check failed (/Users/toni/desarrollo/app/etsiam/cordova/platforms/ios/cordova/apple_xcode_version), continuing anyways. apple-ios version check failed (/Users/toni/desarrollo/app/etsiam/cordova/platforms/ios/cordova/apple_ios_version), continuing anyways.

Later i created a new project and install only one plugin. plugin installed successfully. but while doing build getting error. This is affecting from Cordova iOS 7.0.0+

Cordova iOS 6.3.0 working as expected.

narenderreddych avatar Dec 18 '23 08:12 narenderreddych

The problem is that the current version of this plugin uses the CDVCommandDelegateImpl class which has been changed from Public to Private in cordova-ios@7 so is no longer available for the plugin to use.

I've fixed this problem with this commit on my fork of this plugin.

If you want to use my fork: cordova plugin rm cordova-plugin-googlemaps && cordova plugin add github:dpa99c/cordova-plugin-googlemaps.git

dpa99c avatar Dec 18 '23 11:12 dpa99c

Thanks for your answers. I followed the steps, deleted cordova-plugin-googlemaps and installed github:dpa99c/cordova-plugin-googlemaps.git, and the error I get is when building: Building for 'iOS-simulator', but linking in object file (/Users/XXX/Desarrollo/APP/XXX/cordova/platforms/ios/XXXX/Plugins/com.googlemaps.ios/GoogleMapsBase.framework/GoogleMapsBase) built for 'iOS'

tmwebs avatar Dec 18 '23 13:12 tmwebs

Try my test project to rule out issues in your existing project:

git clone https://github.com/dpa99c/cordova-plugin-googlemaps-test
cd cordova-plugin-googlemaps-test
cordova plugin add github:dpa99c/cordova-plugin-googlemaps
cordova platform add ios@7
cordova build ios

If that works try to remove/re-add the platform in your own project: cordova platform rm ios --nosave && cordova platform add ios --nosave

Here's the console output from my test project build: console.log

dpa99c avatar Dec 18 '23 13:12 dpa99c

I have followed all the steps and it still does not build, could it be because of the emulator? I attach my log file: output3.log

tmwebs avatar Dec 19 '23 06:12 tmwebs

@tmwebs you need to use the Rosetta simulators. In XCode, you need to tick Product -> Destination -> Destination Architectures -> Show Rosetta Destinations

Then select a simulator suffixed by (Rosetta, xx.0)


The fix provided by @dpa99c works perfectly, thanks a lot! I'd love to remove my fork of this project and use yours but I see I included a few bugfixes here and there (don't remember why or if they're needed though ...)

shajz avatar Jan 05 '24 11:01 shajz

Thank you so much for the dpa99c fork!!! It seems to fix the issue here. Still getting the apple-xcode/apple-ios "version check failed" messages listed above. Anyone know how to solve or if this will be an issue going forward? (maybe on submit)

pworthing avatar Jan 05 '24 16:01 pworthing

thanks @shajz, so I have been able to run it in the simulator, but I still have a problem, it opens the application, but the map is not drawn.

my config.xml:

Simulator Screenshot - iPhone 15 Pro - 2024-01-08 at 07 24 05

tmwebs avatar Jan 08 '24 06:01 tmwebs

@tmwebs I would double check that your API Keys are installed correctly (or authorized in Google Maps console). Just my previous experience with the map not showing. Hopefully that fixes your issue.

taxman007 avatar Jan 17 '24 03:01 taxman007

Try my test project to rule out issues in your existing project:

git clone https://github.com/dpa99c/cordova-plugin-googlemaps-test
cd cordova-plugin-googlemaps-test
cordova plugin add github:dpa99c/cordova-plugin-googlemaps
cordova platform add ios@7
cordova build ios

If that works try to remove/re-add the platform in your own project: cordova platform rm ios --nosave && cordova platform add ios --nosave

Here's the console output from my test project build: console.log

First off. Huge thanks for the changes to this plugin. Solved a headache for me.

Just want to mention one thing for those who run into a problem with Android Studio, when building an Android version of your app, you will need to add the following to the plugin file platforms/android/cordova-plugin-googlemaps/....custom.gradle just above "def PLAY_SERVICES_VERSION"

dependencies {    
      implementation 'com.google.android.libraries.maps:maps:3.1.0-beta'
      implementation 'com.android.support:multidex:1.0.3'
    }

taxman007 avatar Feb 03 '24 22:02 taxman007

Thanks @taxman007, now the map works for me, but this has generated a problem in my project, when I am in a view and it opens another page, when I go backwards, either using a back button or the android backbutton, I go back to a blank view, everything has been deleted. I use framework7. No problem on iOS.

https://github.com/mapsplugin/cordova-plugin-googlemaps/assets/12540076/37ff2e77-18f9-4e4d-aa61-5ec25d8e3dcc

tmwebs avatar Feb 08 '24 10:02 tmwebs

Thanks @taxman007, now the map works for me, but this has generated a problem in my project, when I am in a view and it opens another page, when I go backwards, either using a back button or the android backbutton, I go back to a blank view, everything has been deleted. I use framework7. No problem on iOS.

Grabacion.de.pantalla.2024-02-08.a.las.11.05.52.mov

looks like a problem with your page routing. I would check that. I like to use navigatebyUrl when navigating through pages.

taxman007 avatar Mar 19 '24 01:03 taxman007

I use the Framework7 wrapper, and it works if I remove the cordova-plugin-googlemaps plugin and fails if I install it. my route file is:

import HomePage from '../pages/home.f7';
import AboutPage from '../pages/about.f7';
import FormPage from '../pages/form.f7';
import CatalogPage from '../pages/catalog.f7';
import ProductPage from '../pages/product.f7';
import SettingsPage from '../pages/settings.f7';

import DynamicRoutePage from '../pages/dynamic-route.f7';
import RequestAndLoad from '../pages/request-and-load.f7';
import NotFoundPage from '../pages/404.f7';

var routes = [
  {
    path: '/',
    component: HomePage,
  },
  {
    path: '/about/',
    component: AboutPage,
  },
  {
    path: '/form/',
    component: FormPage,
  },
  {
    path: '/catalog/',
    component: CatalogPage,
  },
  {
    path: '/product/:id/',
    component: ProductPage,
  },
  {
    path: '/settings/',
    component: SettingsPage,
  },

  {
    path: '/dynamic-route/blog/:blogId/post/:postId/',
    component: DynamicRoutePage,
  },
  {
    path: '/request-and-load/user/:userId/',
    async: function ({ router, to, resolve }) {
      // App instance
      var app = router.app;

      // Show Preloader
      app.preloader.show();

      // User ID from request
      var userId = to.params.userId;

      // Simulate Ajax Request
      setTimeout(function () {
        // We got user data from request
        var user = {
          firstName: 'Vladimir',
          lastName: 'Kharlampidi',
          about: 'Hello, i am creator of Framework7! Hope you like it!',
          links: [
            {
              title: 'Framework7 Website',
              url: 'http://framework7.io',
            },
            {
              title: 'Framework7 Forum',
              url: 'http://forum.framework7.io',
            },
          ]
        };
        // Hide Preloader
        app.preloader.hide();

        // Resolve route to load page
        resolve(
          {
            component: RequestAndLoad,
          },
          {
            props: {
              user: user,
            }
          }
        );
      }, 1000);
    },
  },
  {
    path: '(.*)',
    component: NotFoundPage,
  },
];

export default routes;

tmwebs avatar Mar 19 '24 06:03 tmwebs

@dpa99c

The problem is that the current version of this plugin uses the CDVCommandDelegateImpl class which has been changed from Public to Private in cordova-ios@7 so is no longer available for the plugin to use.

I've fixed this problem with this commit on my fork of this plugin.

If you want to use my fork: cordova plugin rm cordova-plugin-googlemaps && cordova plugin add github:dpa99c/cordova-plugin-googlemaps.git

Hi, thank you very much for the fix. This fixes iOS, but produces build errors on Android, because you use the master-branch of cordova-plugin-googlemaps which contains not the latest fixes. The multiple_maps-branch contains the latest changes on android and produces no build errors (but you have to include a small AGP fix: https://github.com/mapsplugin/cordova-plugin-googlemaps/compare/multiple_maps...GitToTheHub:cordova-plugin-googlemaps:multiple_maps-agp-assert-fix)

GitToTheHub avatar Jun 09 '24 16:06 GitToTheHub

Hi, thank you very much for the fix. This fixes iOS, but produces build errors on Android, because you use the master-branch of cordova-plugin-googlemaps which contains not the latest fixes. The multiple_maps-branch contains the latest changes on android and produces no build errors (but you have to include a small AGP fix: multiple_maps...GitToTheHub:cordova-plugin-googlemaps:multiple_maps-agp-assert-fix)

Thanks for the contribution, I have installed the multiple_mpas branch and I have modified the files you said, but I still have the same problem that I describe above with the Framework7 paths in Android, it does not do the navigation well, when I open a page, when I go backwards it remains blank.

tmwebs avatar Jun 10 '24 06:06 tmwebs

Hi @tmwebs, I‘m not familiar with Framework7. When you only add the googlemaps-plugin and do not use it anywhere in the project, does then the error occur? Maybe you could inspect your app with Google Chrome and see if a Javascript error occurs, see https://cordova.apache.org/docs/en/11.x/guide/next/#chrome-remote-debugging

GitToTheHub avatar Jun 10 '24 07:06 GitToTheHub

I have tested it and it doesn't show any error in the console, I don't understand it, it just happens when installing the plugin, I am not using it yet.

https://github.com/mapsplugin/cordova-plugin-googlemaps/assets/12540076/d222c80f-47ff-4808-a569-e0f4dca49b4c

tmwebs avatar Jun 10 '24 08:06 tmwebs

Could you make a blank framework7 app with just googlemaps-plugin installed and test it?

GitToTheHub avatar Jun 10 '24 09:06 GitToTheHub

Yes, that's just what I did in the comment above, it only has the googlemaps plugin.

https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/2923#issuecomment-1933744735

tmwebs avatar Jun 10 '24 10:06 tmwebs

Could you test my fork https://github.com/GitToTheHub/cordova-plugin-googlemaps/tree/multiple_maps-fix

This is based on the multiple_maps-branch and is a merge of https://github.com/GitToTheHub/cordova-plugin-googlemaps/pull/1 and https://github.com/GitToTheHub/cordova-plugin-googlemaps/pull/3

GitToTheHub avatar Jun 10 '24 10:06 GitToTheHub

Thank you. I have tried and it still executes the bug, it has to be an incompatibility of the plugin with framework7.

tmwebs avatar Jun 10 '24 11:06 tmwebs

You could debug the app wth Android Studio and see if something occurs in LogCat.


Von: TMWEBS CLOUD @.> Gesendet: Monday, June 10, 2024 1:47:49 PM An: mapsplugin/cordova-plugin-googlemaps @.> Cc: Manuel Beck @.>; Mention @.> Betreff: Re: [mapsplugin/cordova-plugin-googlemaps] Cordova iOS 7.0.1 'cordova/CDVCommandDelegateImpl.h' file not found (Issue #2923)

Thank you. I have tried and it still executes the bug, it has to be an incompatibility of the plugin with framework7.

— Reply to this email directly, view it on GitHubhttps://github.com/mapsplugin/cordova-plugin-googlemaps/issues/2923#issuecomment-2158129954, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADIWBXMFHNANU5EBYVWXANDZGWG6LAVCNFSM6AAAAABAK7FYZ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJYGEZDSOJVGQ. You are receiving this because you were mentioned.Message ID: @.***>

GitToTheHub avatar Jun 10 '24 12:06 GitToTheHub

Yes, thanks, I do it that way, but I can't see it, I'm not an expert on this.

tmwebs avatar Jun 11 '24 05:06 tmwebs

If you want, you can make a blank Framework7 App share it Cordova ready. Then i can take a look.


Von: TMWEBS CLOUD @.> Gesendet: Tuesday, June 11, 2024 7:12:17 AM An: mapsplugin/cordova-plugin-googlemaps @.> Cc: Manuel Beck @.>; Mention @.> Betreff: Re: [mapsplugin/cordova-plugin-googlemaps] Cordova iOS 7.0.1 'cordova/CDVCommandDelegateImpl.h' file not found (Issue #2923)

Yes, thanks, I do it that way, but I can't see it, I'm not an expert on this.

— Reply to this email directly, view it on GitHubhttps://github.com/mapsplugin/cordova-plugin-googlemaps/issues/2923#issuecomment-2159807156, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADIWBXIKE7DZIHCRKJDYEX3ZG2BLDAVCNFSM6AAAAABAK7FYZ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJZHAYDOMJVGY. You are receiving this because you were mentioned.Message ID: @.***>

GitToTheHub avatar Jun 11 '24 06:06 GitToTheHub

Thank you very much, I have created an empty Framework7 project for Android and iOS.

git clone https://[email protected]/tmwebs-cloud/app-maps.git

tmwebs avatar Jun 11 '24 06:06 tmwebs

Hi thanks for your source, but it says Current working directory is not a Cordova-based project. when i do cordova build android on your project.

GitToTheHub avatar Jun 11 '24 07:06 GitToTheHub

from the root directory you must install the dependencies

npm install

and also from the root directory:

npm run build-cordova-android

npm run build-cordova-ios

to install the plugin if you have to go to the cordova directory and do it from there

cd cordova
cordova plugin add ....

tmwebs avatar Jun 11 '24 07:06 tmwebs

Ok I will try it


Von: TMWEBS CLOUD @.> Gesendet: Tuesday, June 11, 2024 9:45:51 AM An: mapsplugin/cordova-plugin-googlemaps @.> Cc: Manuel Beck @.>; Mention @.> Betreff: Re: [mapsplugin/cordova-plugin-googlemaps] Cordova iOS 7.0.1 'cordova/CDVCommandDelegateImpl.h' file not found (Issue #2923)

from the root directory you must install the dependencies

npm install

and also from the root directory:

npm run build-cordova-android

npm run build-cordova-ios

to install the plugin if you have to go to the cordova directory and do it from there

cd cordova cordova plugin add ....

— Reply to this email directly, view it on GitHubhttps://github.com/mapsplugin/cordova-plugin-googlemaps/issues/2923#issuecomment-2160024300, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADIWBXKDMO4OF5LKOW2N2FTZG2TK5AVCNFSM6AAAAABAK7FYZ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRQGAZDIMZQGA. You are receiving this because you were mentioned.Message ID: @.***>

GitToTheHub avatar Jun 11 '24 07:06 GitToTheHub

Hi, i saw the same issue as you. I could reveal the blank page with the Chrome Developer Tools, by removing display: none !important; from the CSS class: .framework7-root .page-previous after doing the navigation back. After that the page appears again and surprisingly the issue does not occur anymore. Something is conflicting in the Javascript of Framework7 and the GoogleMaps-Plugin. When you google for "framework7 googlemaps", you can find other solutions. Some propose to use leafletjs as an alternative solution, or you can use the GoogleMaps Javascript Library. You can also ask the question on the Framework7-Forum.

GitToTheHub avatar Jun 12 '24 07:06 GitToTheHub