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 after preparing for iOS: TypeError: v1.indexOf is not a function #71

Closed johnborges closed 8 years ago

johnborges commented 8 years ago

I'm getting an error after preparing the project for iOS.

Error: TypeError: v1.indexOf is not a function at compare (/CordovaProject/plugins/cordova-universal-links-plugin/node_modules/node-version-compare/index.js:3:20) at activateAssociativeDomains (/CordovaProject/plugins/cordova-universal-links-plugin/hooks/lib/ios/xcodePreferences.js:69:13) at Object.enableAssociativeDomainsCapability (/CordovaProject/plugins/cordova-universal-links-plugin/hooks/lib/ios/xcodePreferences.js:36:5) at activateUniversalLinksInIos (/CordovaProject/plugins/cordova-universal-links-plugin/hooks/afterPrepareHook.js:79:25) at /CordovaProject/plugins/cordova-universal-links-plugin/hooks/afterPrepareHook.js:50:11 at Array.forEach (native) at run (/CordovaProject

It looks like everything gets moved to the iOS project properly but I've found that I need to manually enable the "Associated Domain" toggle in my projects capabilities.

My setup: cordova@6.2.0 cordova-ios@4.1.0

nikDemyankov commented 8 years ago

Weird... Try the following:

  1. Remove plugin and iOS platform:

    cordova plugin remove cordova-universal-links-plugin
    cordova platform remove ios
  2. Add iOS platform and plugin:

    cordova platform add ios
    cordova plugin add cordova-universal-links-plugin
  3. Go to YOUR_PROJECT_ROOT/plugins/cordova-universal-links-plugin/hooks/lib/ios/ and open xcodePreferences.js. In it comment out lines 67-81.
  4. Build again:

    cordova build ios
johnborges commented 8 years ago

Worked. I got rid of lines 67-76.

martinlingstuyl commented 6 years ago

I ran into this as well, added a pull request to fix this: https://github.com/nordnet/cordova-universal-links-plugin/pull/154