tjvantoll / nativescript-social-share

♻️ A NativeScript plugin for using the iOS/Android social sharing widgets
MIT License
94 stars 48 forks source link

NS7 iOS14 - ERROR TypeError: Cannot read property 'getVisibleViewController' of undefined #66

Open andrewm-mitchells opened 3 years ago

andrewm-mitchells commented 3 years ago

Hello

Plugin is not working on latest NativeScript and iOS 14, looks like it's more related to NS7 than iOS 14 but I can be wrong on that.

Tech stack: MacOS 10.15.6 (19G2021)

Getting NativeScript components versions information... ✔ Component nativescript has 7.0.8 version and is up to date. ✔ Component @nativescript/core has 7.0.3 version and is up to date. ✔ Component @nativescript/ios has 7.0.0 version and is up to date. ✖ Component @nativescript/android is not installed.

App compiles with no issues but when you tap on the share icon UI won't change (show the popup with sharing options) and will console log the following error: ERROR TypeError: Cannot read property 'getVisibleViewController' of undefined

Running on iPhone XS Max, iOS 14

This is a pretty important feature for internal use and would be great to have it fixed asap.

Thank you in advance

Macarthurval commented 3 years ago

Same problem here

DanielAlcaraz commented 3 years ago

You can use this new version for Nativescript 7:

https://www.npmjs.com/package/@nativescript/social-share

stanma9107 commented 3 years ago

I try to use the new version for NativeScript 7, but the problem still exists.

markosole commented 3 years ago

@stanma9107 I can confirm that new ns 7 version works and do not forget to include var SocialShare = require("@nativescript/social-share"); instead nativescript-social-share. Also do not forget to tns remove plugin nativesript-socal-share

rmn81 commented 3 years ago

@stanma9107 I can confirm that new ns 7 version works and do not forget to include var SocialShare = require("@nativescript/social-share"); instead nativescript-social-share. Also do not forget to tns remove plugin nativesript-socal-share

little correction 'tns plugin remove nativescript-social-share'

stanma9107 commented 3 years ago

instead nativescript-social-share. Also do not forget to tns remove plugin nativesript-socal-share

little correction 'tns plugin remove nativescript-social-share'

@rmn81 Thanks for your update!