Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Andrea_P_1
New Contributor I
109 Views

GoogleMaps iOS build

Hello,

i have a problem using cordova-plugin-googlemaps plugin.

A few days ago all was working correctly and i could build my app without any problem. Now the build is failing and i don't understand why.

The error log is this one.

Tags (2)
0 Kudos
9 Replies
PaulF_IntelCorp
Employee
109 Views

Please do not past build logs into the forum, attach them as files. Long posts are extremely difficult to work with, which means we cannot help you. I've edited your post and attached the log as a file.

When you say the build worked, did it work as a build for iOS or a build for Android? Did you change any build settings on the Project tab between now and then (esp. CLI version)? Did you update any plugins between now and then? What did you change or update since then?

Andrea_P_1
New Contributor I
109 Views

Sorry for the log..

No i didn't change anything in the build tabl. But except this i don't undestand the errors. It seems that something fail durin build on your servers:

Interface Builder Cocoa Touch Tool[55820:8026044] 14:42:11.975 ERROR: 49: Couldn't connect to system sound server

Try to search on google for similar issues. It seems a problem on xcode build

PaulF_IntelCorp
Employee
109 Views

I'm going to ask one of our build system experts to take a closer look.

Andrea_P_1
New Contributor I
109 Views

Well,

I suspect that if you use a cordova version >4 that plugin doesn't work. But the are some other strange issues:

if i use the plugin name when i add it IntelXDK downloads plugin.google.maps while if i use the git URL it downloads cordova-plugin-googlemaps. The latest one compile perfectly but even if it is compiled it isn't find in the plugin list so it doesn't work. 

And this is strange because it is added correctly in the project. I see it. The plugin asks me for parameters but it isn't added to the APK. And als on iOS i have the same problem. On iOS there is also a different problem. When the plugin is downloaded on windows the symbolic link doesn't work but this is a minor problem because i can fix the file.

Now the main problem is that the project even if has the plugin in its list doesn't install it in the APK:

This is my cordova-plugin.js snippet:

module.exports.metadata = 
// TOP OF METADATA
{
    "cordova-plugin-crosswalk-webview": "1.6.1",
    "cordova-plugin-cdt-xwalk18": "1.0.0",
    "cordova-plugin-apx-webview": "1.0.0",
    "cordova-plugin-app-analyzer": "1.0.0",
    "cordova-plugin-app-analyzer-new": "1.0.0",
    "cordova-plugin-statusbar": "2.1.3",
    "cordova-plugin-device": "1.1.2",
    "cordova-plugin-compat": "1.0.0",
    "cordova-plugin-camera": "2.2.0",
    "cordova-plugin-geolocation": "2.2.0",
    "cordova-plugin-network-information": "1.2.1",
    "cordova-plugin-datepicker": "0.9.2",
    "ionic-plugin-keyboard": "2.2.1",
    "cordova-plugin-app-version": "0.1.8",
    "cordova-plugin-app-event": "1.2.0",
    "de.appplant.cordova.plugin.local-notification": "0.8.4",
    "cordova-plugin-facebook4": "1.7.1",
    "com.googlemaps.ios": "2.0.1",
    "cordova-plugin-whitelist": "1.2.2",
    "com.intel.xdk.ppfa": "1.0"
}

And this is my plugin list

:plugins.jpg
 

 

As you see the latest one is the plugin i need. And of course when i use my previous code i receive an error:

TypeError: Cannot read property 'maps' of undefined(…)

And my "plugin" object doesn't contains maps plugin

PaulF_IntelCorp
Employee
109 Views

Note the author says you should not use the git repo > https://github.com/mapsplugin/cordova-plugin-googlemaps#quick-install < because it may not be stable or complete, which is true of any plugin. The "master branch" of a git repo is not guaranteed to be a stable release. Use the NPM repo to add the plugin, as shown below:

Screen Shot 2016-09-22 at 11.15.29 AM.png

Screen Shot 2016-09-22 at 11.18.24 AM.png

I added the plugin to a blank template and was able to see the plugin in the Simulate tab (it probably won't work there, but you can test for its presence):

Screen Shot 2016-09-22 at 11.20.50 AM.png

And I built a debug module using the Debug tab (where I also tested for it's presence and there is definitely code there). I did not attempt to actually make the plugin work. See the images below:

Screen Shot 2016-09-22 at 11.35.48 AM.png

 

Andrea_P_1
New Contributor I
109 Views

And you can see that plug-in is plugin-google-maps that is uncompilable unless you use a Cordova version < 4.0. And however you can see the plugin in your list while is missing in mine.. even if I can see it in the xdk plugin list.
PaulF_IntelCorp
Employee
109 Views

From > https://github.com/mapsplugin/cordova-plugin-googlemaps/blob/master/plugin.xml <

    <engines>
      <engine name="cordova-android" version=">=5.1.0" />
      <engine name="cordova-ios" version=">=3.0.0" />
    </engines>

From > https://software.intel.com/en-us/xdk/faqs/cordova#cordova-version <

Our Cordova CLI 5.1.1 build system is "pinned" to:

  • cordova-android@4.1.1 (as of March 23, 2016)
  • cordova-ios@3.8.0
  • cordova-windows@4.0.0

Our Cordova CLI 5.4.1 build system is "pinned" to:

  • cordova-android@5.0.0
  • cordova-ios@4.0.1
  • cordova-windows@4.3.1

Our Cordova CLI 6.2.0 build system is "pinned" to:

  • cordova-android@5.1.1
  • cordova-ios@4.1.1
  • cordova-windows@4.3.2

Which means that you must use our CLI 6.2.0 build system to build for Android. And, according to this note > https://github.com/mapsplugin/cordova-plugin-googlemaps#information < you must use our Cordova CLI 5.1.1 build system for iOS, until they release their 1.4 version of the plugin.

I did an Android build (which is what happens when you use the Debug tab) and it built successfully. I did not try an iOS build. I used the NPM release (1.3.9) not the github master branch, although the info note > https://github.com/mapsplugin/cordova-plugin-googlemaps#information < says you can use the master branch but there are still bugs. So if you do use the master branch of their github repo you could use just our CLI 6.2.0 build system for both Android and iOS builds. I would recommend NOT using the iOS WKWebView, because that is probably where the bugs are.

Don't get hung up on the plugin ID, it's just an identifier that comes from the plugin.xml file.

In the 1.3.9 version that I used it is plugin.google.maps > https://github.com/mapsplugin/cordova-plugin-googlemaps/blob/1.3.9/plugin.xml <

<?xml version='1.0' encoding='utf-8'?>
<plugin id="plugin.google.maps" version="1.3.9" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
    <name>phonegap-googlemaps-plugin</name>

And in the master branch (which will become 1.4.0) it is renamed to cordova-plugin-googlemaps > https://github.com/mapsplugin/cordova-plugin-googlemaps/blob/master/plugin.xml <

<?xml version='1.0' encoding='utf-8'?>
<plugin id="cordova-plugin-googlemaps" version="1.3.9" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
    <name>phonegap-googlemaps-plugin</name>

These are the same plugins, just different versions. The ID change is being done to conform to the new Cordova ID standard for plugins, it doesn't have any more meaning than that; the plugin versions are the more important indicators.

Notice that they should have changed the version in the plugin.xml to indicate it is a 1.4.0 beta, for example, to something like 1.4.0-beta or... That definitely confused things. But luckily, they have added a note in the README.md file.

Andrea_P_1
New Contributor I
109 Views

yes but the npm plugin cannot be compiled for iOS. You can try yourself. That's why i'm using the master branch.

PaulF_IntelCorp
Employee
109 Views

Andrea -- please re-read this post > https://software.intel.com/en-us/forums/intel-xdk/topic/696326#comment-1885438 < and see the image below in which I took the NPM version of the plugin and successfully added it and built it in a project, where I set the CLI version to 5.1.1 (as noted in the README for the plugin and in my prior post). In the image below I show a built and running app on an iOS 10 device where I am using remote Safari Web Inspector to access to console in that app:

Screen Shot 2016-09-23 at 11.31.56 AM.png

Reply