nordnet / cordova-universal-links-plugin

[DEPRECATED] - Cordova plugin to support Universal/Deep Links for iOS/Android.
https://github.com/nordnet/cordova-universal-links-plugin/issues/160
MIT License
349 stars 529 forks source link

Error in iosBeforePrepareHook #77

Closed mike-nelson closed 7 years ago

mike-nelson commented 8 years ago

I tried to add this plugin and build cordova and it throws an error in the hook script.

undefined is not a function at getOldProjectName in iosBeforePrepareHook,js:65:27

My project name is "Speaking Email" and it has not changed.

lunchbag commented 8 years ago

Looks like your environment doesn't yet support Array.prototype.find. Here's a workaround in iosBeforePrepareHook.js:

  var projectFile = null;

  files.forEach(function(fileName) {
    if (path.extname(fileName) === '.xcodeproj') {
      projectFile = fileName
    };
  });
nikDemyankov commented 8 years ago

@lunchbag is probably correct. @mike-nelson you can either update your version of the node, or use the code snippet from above.

sandwichfeet commented 8 years ago

@nikDemyankov Just confirming I get the same error using node 6.4.3 and 6.5.0. lunchbag's fix does work correct it though

mike-nelson commented 8 years ago

Thanks. Can this polyfill be committed to the project?

Cheers Mike

Mike Nelson // CEO (and Developer) beweb // P 09 3077042 // M 027 4403757 Listen to email safely while driving with www.speaking.email

On 2/09/2016, at 4:47 AM, sandwichfeet notifications@github.com wrote:

@nikDemyankov Just confirming I get the same error using node 6.4.3 and 6.5.0. lunchbag's fix does work correct it though

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

nikDemyankov commented 8 years ago

Will do

nikDemyankov commented 7 years ago

Fixed in v.1.2.1.