Coder Social home page Coder Social logo

nativescript-social-share's Introduction

NativeScript Social Share Plugin

A NativeScript plugin to use the native social sharing widget on Android and iOS. Currently this module supports image and text sharing.

Installation

Run the following command from the root of your project:

$ tns plugin add nativescript-social-share

This command automatically installs the necessary files, as well as stores nativescript-social-share as a dependency in your project's package.json file.

Usage

To use the social share module you must first require() it. After you require() the module you have access to its APIs.

// ------------ JavaScript ------------------
var SocialShare = require("nativescript-social-share");

// ------------- TypeScript ------------------
import * as SocialShare from "nativescript-social-share";

API

shareImage(ImageSource image, [optional] String subject)

The shareImage() method expects an ImageSource object. The code below loads an image from the app and invokes the share widget with it:

// ------------ JavaScript ------------------
var SocialShare = require("nativescript-social-share");
var imageSourceModule = require("image-source");

var image = imageSourceModule.fromFile("~/path/to/myImage.jpg");
SocialShare.shareImage(image);

// ------------- TypeScript ------------------
import * as SocialShare from "nativescript-social-share";
import { ImageSource } from "image-source";

let image = ImageSource.fromFile("~/path/to/myImage.jpg");
SocialShare.shareImage(image);

You can optionally provide a second argument to configure the subject on Android:

SocialShare.shareImage(image, "How would you like to share this image?");

shareText(String text, [optional] String subject)

The shareText() method expects a simple string:

SocialShare.shareText("I love NativeScript!");

Like shareImage(), you can optionally pass shareText() a second argument to configure the subject on Android:

SocialShare.shareText("I love NativeScript!", "How would you like to share this text?");

shareUrl(String url, String text, [optional] String subject)

The shareUrl() method excepts a url and a string.

SocialShare.shareUrl("https://www.nativescript.org/", "Home of NativeScript");

You can optionally pass shareUrl() a second argument to configure the subject on Android:

SocialShare.shareUrl("https://www.nativescript.org/", "Home of NativeScript", "How would you like to share this url?");

Tutorials

Looking for some extra help getting social sharing working in your mobile application? Check out these resources:

nativescript-social-share's People

Contributors

bbroerees avatar bradmartin avatar eddyverbruggen avatar esavantsi avatar jogboms avatar moderateepheezy avatar nathanwalker avatar nraboy avatar sis0k0 avatar tgpetrov avatar tjvantoll avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

nativescript-social-share's Issues

Crashing on iOS 11

My app shares image fine on previous versions of iOS but, running on an iOS11 device, it crashes. Is it working for you?

The crash happens in the line

var activityController = UIActivityViewController.alloc()
		.initWithActivityItemsApplicationActivities(thingsToShare, null);

Below the full function:

function share(thingsToShare, index) {
	console.log("inside share function")
	var activityController = UIActivityViewController.alloc()
		.initWithActivityItemsApplicationActivities(thingsToShare, null);
	console.log("passed activityController")
	var presentViewController = activityController.popoverPresentationController;
	console.log("passed presentViewController")
	if (presentViewController) {
		var page = frameModule.topmost().currentPage;
		if (page && page.ios.navigationItem.rightBarButtonItems &&
			page.ios.navigationItem.rightBarButtonItems.count > 0) {
			presentViewController.barButtonItem = page.ios.navigationItem.rightBarButtonItems[0];
		} else {
			presentViewController.sourceView = page.ios.view;
		}
	}

	utilsModule.ios.getter(UIApplication, UIApplication.sharedApplication)
		.keyWindow
		.rootViewController
		.presentViewControllerAnimatedCompletion(activityController, true, null);
}

Not working on Google Pixel 2

Unfortunately this plugin does not work properly on my test device.
I did use the demo app of this repository without making any changes to it.
I can confirm that everything's working fine on iOS thought.
Here's the logs and some debugging info:

ActivityManager: START u0 {act=android.intent.action.CHOOSER flg=0x10000000 cmp=android/com.android.internal.app.ChooserActivity (has extras)} from uid 10192
ActivityManager: Activity stop timeout for ActivityRecord{c09a866 u0 android/com.android.internal.app.ChooserActivity t2026}
ActivityManager: Activity reported stop, but no longer stopping: ActivityRecord{c09a866 u0 android/com.android.internal.app.ChooserActivity t2026}
ActivityManager: Launch timeout has expired, giving up wake lock!

Android-Version: 8.1.0
Phone: Google Pixel 2

There's nothing special installed on the device... This phone is being used for testing {NS} and nothing else.

However on another test device (Android 7.1.0) everything's working fine with the same build.

Video Support?

Is there any plans to support video sharing? or is this not possible?

default email

hello, is possible to open directly the email client, or, to set the destination of the mail, maybe with an object like {to:[email protected] }

using share image function error return

Hi,
I generate QR image and pass to shareImage function then return the error below. And i try get from File or from website ,also cause this error.

System.err: Error: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.XmlResourceParser android.content.pm.ProviderInfo.loadXmlMetaData(android.content.pm.PackageManager, java.lang.String)' on a null object reference
System.err: android.support.v4.content.FileProvider.parsePathStrategy(FileProvider.java:583)
System.err: android.support.v4.content.FileProvider.getPathStrategy(FileProvider.java:557)
System.err: android.support.v4.content.FileProvider.getUriForFile(FileProvider.java:399)
System.err: com.tns.Runtime.callJSMethodNative(Native Method)
System.err: com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1084)
System.err: com.tns.Runtime.callJSMethodImpl(Runtime.java:966)
System.err: com.tns.Runtime.callJSMethod(Runtime.java:953)
System.err: com.tns.Runtime.callJSMethod(Runtime.java:937)
System.err: com.tns.Runtime.callJSMethod(Runtime.java:929)
System.err: com.tns.gen.java.lang.Object_frnal_ts_helpers_l58_c38__ClickListenerImpl.onClick(Object_frnal_ts_helpers_l58_c38__ClickListenerImpl.java:12)
System.err: android.view.View.performClick(View.java:5280)
System.err: android.view.View$PerformClick.run(View.java:21239)
System.err: android.os.Handler.handleCallback(Handler.java:739)
System.err: android.os.Handler.dispatchMessage(Handler.java:95)
System.err: android.os.Looper.loop(Looper.java:224)
System.err: android.app.ActivityThread.main(ActivityThread.java:5526)
System.err: java.lang.reflect.Method.invoke(Native Method)
System.err: com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
System.err: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
System.err: File: "file:///data/data/org.nativescript.bungkus/files/app/tns_modules/nativescript-social-share/social-share.js, line: 43, column: 65

Error: Can't resolve 'tns-core-modules/ui'

Hi,
when I build my application for android it works, but when I build for ios (tns build ios --env.uglify --env.aot --env.snapshot) I get the following error:

ERROR in ../node_modules/nativescript-social-share/social-share.js
Module not found: Error: Can't resolve 'tns-core-modules/ui' in '/Users/user/Documents/app/node_modules/nativescript-social-share'
@ ../node_modules/nativescript-social-share/social-share.js 4:11-41
@ ../$$_lazy_route_resource lazy namespace object
@ ../node_modules/@angular/core/fesm5/core.js
@ ./main.ts
Executing webpack failed with exit code 2.

These are the versione in package.json:
"tns-core-modules": "6.0.1",
"nativescript-social-share": "^1.5.2"

I tried to update nativescript-social-share to last versione but it doesnt work. Unfortunatly, I cannot update core-modules to 6.2

ShareUrl not passing url value on iOS

i pass in a url value & text string that works on android, but on iOS, only the text value gets passed in. I have a log right before the shareUrl gets called, and can see it populated.

I just updated to the latest 1.5.0

Support NativeScript 4

Cannot build project using NativeScript 4 while this plugin is installed, this plugin needs to support NativeScript 4

fromUrl to get img

import { fromUrl, ImageSource } from "image-source";
import * as SocialShare from "nativescript-social-share";

const imageFile = fromUrl(image).then((res) => {
SocialShare.shareImage(res);
});
it will work!

Share text is empty for Facebook channel on Android

I want to share a text on the Facebook app but the text is empty when the app is loaded.
I tested on a physical device which has Android 5.1 installed.

  • tns-android 1.6.3
  • tns-core-modules 1.6.0
  • nativescript-social-share ^1.1.2

Not working on Facebook and Messenger

let url = 'https://www.my-domain.com/post' + postId
SocialShare.shareUrl(url, "Check it out!");

What I get on Facebook & Messenger is https://www.my-domain.com/ only. But when I share to Instagram Direct and WhatsApp, everything goes well.

Any idea? Thank you!

Failed to find module 'nativescript-social-share'

Got the error from the title above. I followed the Nativescript tutorial step by step and even took a look at the plugin readme, and I was sure I did everything right. So I opened the package.json and found "main": "social-share.js",, then copied the android file social-share.android.js and renamed it to social-share.js, now the error is gone. Based on that i believe the problem is with the framework "redirecting" to the right platform file. How can I solve that?

Thanks in advance, awesome plugin!

crash on ios

hello, thanks for this plugin, with android i have no problem, with ios it crashes, i use vanilla js, i have these errors in the console:

NativeScript caught signal 11.
Native Stack:
1   0x1060b5251 sig_handler(int)
2   0x7fff51bf5b5d _sigtramp
3   0x0
4   0x7fff51c29b85 libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_x86_64>::step()
5   0x7fff51c2de58 _Unwind_RaiseException
6   0x7fff4f9fc8bd __cxa_throw
7   0x7fff50b97c44 _objc_exception_destructor(void*)
8   0x7fff23ce1a71 _CFThrowFormattedException
9   0x7fff23ce4c86 -[__NSPlaceholderArray initWithObjects:count:].cold.3
10  0x7fff23c27f74 -[__NSPlaceholderArray initWithObjects:count:]
11  0x7fff23c3c909 -[NSArray initWithArray:range:copyItems:]
12  0x7fff50ba8c92 objc_setProperty_nonatomic_copy
13  0x7fff43315dea -[UIActivityViewController configureActivityViewControllerWithActivityItems:applicationActivities:]
14  0x7fff43315b3f -[UIActivityViewController initWithActivityItems:applicationActivities:]
15  0x106aa6a8d ffi_call_unix64
16  0x10dd8d950
JS Stack:
initWithActivityItemsApplicationActivities([native code])
at share(file: node_modules/nativescript-social-share/social-share.ios.js:7:0)
at shareUrl(file: node_modules/nativescript-social-share/social-share.ios.js:34:0)
at file: app/views/notificationDetails/notificationDetails.js:37:0
at file: node_modules/@nativescript/core/ui/gestures/gestures.ios.js:64:0
at UIApplicationMain([native code])
at run(file: node_modules/@nativescript/core/application/application.ios.js:312:0)
at file: app/app.js:97:0
at ./app.js(file:///app/bundle.js:595:34)
at __webpack_require__(file: app/webpack/bootstrap:750:0)
at checkDeferredModules(file: app/webpack/bootstrap:43:0)
at webpackJsonpCallback(file: app/webpack/bootstrap:30:0)
at anonymous(file:///app/bundle.js:2:61)
at evaluate([native code])
at moduleEvaluation
at
at asyncFunctionResume
at
at promiseReactionJob

Edit:

it crashes on shareUrl, it works on shareText

shareUrl adds text to url on ios

when i use SocialShare.shareUrl("https://www.nativescript.org/", "Home of NativeScript"); the text gets added to the url like this:

https://www.nativescript.org/ Home of NativeScript

Refusing to install

Mac-mini:Trail ########$ tns plugin add nativescript-social-share
npm WARN package.json [email protected] No README data
npm WARN install Refusing to install nativescript-social-share as a dependency of itself
Cannot read property '0' of undefined

plugin add

┌─────────┬───────────────────────────┐
│ Usage │ Synopsis │
│ General │ $ tns plugin add │
└─────────┴───────────────────────────┘

Installs the specified plugin and any packages that it depends on.

Getting this warning when I try to install nativescript-social-share. please help me to install the same perfectly.

Receive shared data

I want to make my application actually receive data shared by other applications from the social share menu. Is it possible with this plugin?

is there a way to use a text for "to" (address email)?

Hi,

I want to know if there's a way to send a text (like email address) and add it on the "to" field in the Gmail app, for example.

When I use shareUrl(emailAddress, 'some subject') and choose gmail app, it uses the 'some subject' on the right place (subject), but the emailAddress is going to the email body.
Can I fill the 'to' field?

Note that I don't want to open the default email app. I want to allow the user to choose the application.

Thanks in advance.

AndroidManifest - Merging issues

After installing the plugin I'm getting this error message:

Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : Attribute meta-data#android.support.FILE_PROVIDER_PATHS@resource value=(@xml/file_paths) from [:MultiTypeFilePicker-release:] AndroidManifest.xml:46:17-51
        is also present at [:nativescript_social_share:] AndroidManifest.xml:17:17-55 value=(@xml/provider_paths).
        Suggestion: add 'tools:replace="android:resource"' to <meta-data> element at AndroidManifest.xml to override.

Share text on Facebook

Hi, I'm trying the plugin and I noticed the shareText (haven't tried the shareImage yet) does not add the text when I select Facebook (text comes perfectly for Whatsup, Twitter, Messaging, etc). The FB simply goes blank.

Anything am I doing wrong?

share text to facebook news feed

i have the option to share text to facebook news feed, but when i choose it i just get empty field, my text is not there. why is this happening?

Feature Request shareURL Return Promise

Would it be possible (or is it already possible) to be able to determine when the user is done sharing using the ShareURL() method?

I would like for my app's share page to close once they have shared for a better user experience

Does not work with custom modal nativescript angular2

I tried opening the share dialog from Modal page [https://docs.nativescript.org/angular/ui/dialogs.html#custom-dialog] and got the below error.

Attempt to present <UIActivityViewController: 0x15be1d60> on <UINavigationController: 0x14608e80> whose view is not in the window hierarchy!

Issue with the ios platform not tested on android

Sample app crash if you share image before share text

Steps to reproduce:

Build sample app with {N} 2.0.0 (everything 2.0.0 -> CLI, runtimes, modules)
Run it and first tap "Share image" button.

Result:

W/System.err( 2824): com.tns.NativeScriptException:
W/System.err( 2824): Calling js method onClick failed
W/System.err( 2824): TypeError: Cannot read property 'getExternalFilesDir' of undefined
W/System.err( 2824): File: "/data/data/com.tjvantoll.demo/files/app/tns_modules/nativescript-social-share/social-share.js, line: 29, column: 40
W/System.err( 2824): StackTrace:
W/System.err( 2824):    Frame: function:'module.exports.shareImage', file:'/data/data/com.tjvantoll.demo/files/app/tns_modules/nativescript-social-share/social-share.js', line: 29, column: 41
W/System.err( 2824):    Frame: function:'exports.shareImage', file:'/data/data/com.tjvantoll.demo/files/app/main-page.js', line: 6, column: 14
W/System.err( 2824):    Frame: function:'Observable.notify', file:'/data/data/com.tjvantoll.demo/files/app/tns_modules/data/observable/observable.js', line: 155, column: 23
W/System.err( 2824):    Frame: function:'Observable._emit', file:'/data/data/com.tjvantoll.demo/files/app/tns_modules/data/observable/observable.js', line: 174, column: 18
W/System.err( 2824):    Frame: function:'_android.setOnClickListener.android.view.View.OnClickListener.onClick', file:'/data/data/com.tjvantoll.demo/files/app/tns_modules/ui/button/button.js', line: 27, column: 32
W/System.err( 2824):    at com.tns.Runtime.callJSMethodNative(Native Method)
W/System.err( 2824):    at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:861)
W/System.err( 2824):    at com.tns.Runtime.callJSMethodImpl(Runtime.java:726)
W/System.err( 2824):    at com.tns.Runtime.callJSMethod(Runtime.java:712)
W/System.err( 2824):    at com.tns.Runtime.callJSMethod(Runtime.java:693)
W/System.err( 2824):    at com.tns.Runtime.callJSMethod(Runtime.java:683)
W/System.err( 2824):    at com.tns.gen.android.view.View_OnClickListener_ftns_modules_ui_button_button_l21_c42__.onClick(View_OnClickListener_ftns_modules_ui_button_button_l21_c42__.java:11)
W/System.err( 2824):    at android.view.View.performClick(View.java:4780)
W/System.err( 2824):    at android.view.View$PerformClick.run(View.java:19866)
W/System.err( 2824):    at android.os.Handler.handleCallback(Handler.java:739)
W/System.err( 2824):    at android.os.Handler.dispatchMessage(Handler.java:95)
W/System.err( 2824):    at android.os.Looper.loop(Looper.java:135)
W/System.err( 2824):    at android.app.ActivityThread.main(ActivityThread.java:5254)
W/System.err( 2824):    at java.lang.reflect.Method.invoke(Native Method)
W/System.err( 2824):    at java.lang.reflect.Method.invoke(Method.java:372)
W/System.err( 2824):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
W/System.err( 2824):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

Notes:
If you first tap share text and then share image there is no crash.
Tested with Api19 and Api22 emulators (default emulators of Android Studio 2).

Emulator create commands:

%ANDROID_HOME%\tools\android create avd -n Emulator-Api19-Default -t android-19 --abi default/x86 -c 12M -f
%ANDROID_HOME%\tools\android create avd -n Emulator-Api22-Default -t android-22 --abi default/x86 -c 12M -f

Crash

Hi, Im trying with ios 9 simulator xcode 7.01 and ios 8 iphone 4s to share text to mail, and after mail displayed, it crashed, just calling socialShare.shareText("I love NativeScript!"); no I love Nativescript in the mail app too, just empty text

Is it just me ?

Edit:Share to copy text is working fine
Edit:In device now its working, simulator still crashes (weird) :)

Link With Text share on facebook

Hello,

I'm using [email protected] and whenever i try to share a link with text to facebook, the link appears but the text doesn't

here is the implementation.

socialShare.shareUrl("google.com",`I have scored ${this.best} can you beat this achievement??!!`,"High Score");

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

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

Breaks when running on iPad Pro with iOS 13.4.1

When running on iPad Pro with iOS 13.1 it works ... with iOS 13.4.1 get an error with layout contstraints -

2020-05-14 10:43:00.689259+0100 rrmobilepsl[24093:603272] [LayoutConstraints] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(
"<NSLayoutConstraint:0x6000000581e0 LPLinkView:0x7fdb617aa2f0.leading == UILayoutGuide:0x600001ab1b20'UIViewLayoutMarginsGuide'.leading (active)>",
"<NSLayoutConstraint:0x600000058050 H:[LPLinkView:0x7fdb617aa2f0]-(59)-| (active, names: '|':_UIActivityContentTitleView:0x7fdb617acc70 )>",
"<NSLayoutConstraint:0x600000059c70 H:|-(0)-[_UIActivityContentTitleView:0x7fdb617acc70] (active, names: '|':_UINavigationBarContentView:0x7fdb614c5a60 )>",
"<NSLayoutConstraint:0x600000059cc0 _UIActivityContentTitleView:0x7fdb617acc70.trailing == _UINavigationBarContentView:0x7fdb614c5a60.trailing (active)>",
"<NSLayoutConstraint:0x600000066a30 'UIView-Encapsulated-Layout-Width' _UINavigationBarContentView:0x7fdb614c5a60.width == 0 (active)>",
"<NSLayoutConstraint:0x6000000580f0 'UIView-leftMargin-guide-constraint' H:|-(16)-UILayoutGuide:0x600001ab1b20'UIViewLayoutMarginsGuide' (active, names: '|':_UIActivityContentTitleView:0x7fdb617acc70 )>"
)

Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x6000000581e0 LPLinkView:0x7fdb617aa2f0.leading == UILayoutGuide:0x600001ab1b20'UIViewLayoutMarginsGuide'.leading (active)>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
2020-05-14 10:43:06.528249+0100 rrmobilepsl[24093:603438] [ShareSheet] connection invalidated

Image Sharing Issues

import { ImageSource } from "image-source";

let image = ImageSource.fromFile("~/path/to/myImage.jpg");

[ts] Property 'fromFile' does not exist on type 'typeof ImageSource'.

Nativescript + Angular 2 "Android of null" problem

screenshot_2016-11-07-17-45-29

only including this line "SocialShare.shareImage(img);" the app crashes, can you fix this issue please?.

EDIT: i found out that this line is the one making the crash image.android.compress(android.graphics.Bitmap.CompressFormat.JPEG, 100, stream);
maybe the android instance in the image?

EDIT 2: Nevermind i know what is the problem, and isn't the plugin.

Share a file

Hello, I would like to know if I can share anything isn't an image or text? For example, May I share a ".txt" file?

Share to one or more specific (social networks)

I understand this plugin is meant to share any content to any supported app. Right?
In my application I need to share images (as it's already supported, which is cool) but on specific apps (in my particular case social networks but I believe the behavior can be easily generalized targeting the app itself, not the sharing API of each app).

Is it feasible without too much effort/time?
It would be greatly appreciated and I think I'd be a great addition to the {N} add-ons!

Sharing of several number of images.

Hello. I am developing nativescript app that supports feed like in Facebook and there could be post with 2 or more pictures.
Is it possible to share several pictures with nativescript-social-share plugin?

Image file names

I don't know if this is an issue with the plugin or some explicit iOS behaviour.

When sharing an image and selecting Save Image (which saves to photo library), the images file name is not preserved. Loading the image from library its name is a variation of IMG_1234.PNG.

If it is iOS, is there any way to force the file to be saved with the desired file name?

Otherwise how can you load an image, make changes, and then save it back to Photos (replacing the existing copy)?

app crashing when using 'Save Image' option

I have really unique case where my app with this plugin feature crashes when trying to use 'Save Image' option from possibly all iphones with OS 11+. It's working fine when other options are chosen ie. share to Slack, etc. and no issue on possibly iphones with OS 10+ (tested on iphone 5 with that version).
Just wondering if anyone has come across similar issue. I can provide more details if needed. Thanks!

iOS hard crash

Using javascript array causes a crash, a switch to NSArray should fix it

Doesn't show up when running on any iPad with iOS 13.6

Hi @tjvantoll on the current version of iOS (13.6) on any iPad, the share window doesn't appear. It pops up just the border/shadow of the window in the top left corner. I'm using the latest version of Nativescript stack with Angular.

On any other device is working perfectly fine.

Screenshot 2020-08-10 at 12 50 12

Crash on iPad/iOS tablets

The latest version of the plugin crashes when it's run on a iPad:

nativescript-social-share/src/social-share.ts:10:33: JS ERROR TypeError: undefined is not an object (evaluating 'tns_core_modules_ui__WEBPACK_IMPORTED_MODULE_1__["Frame"].topmost().currentPage')

but it does work just fine on the iPhone and any Android device (tablets and phones)

versions <1.6 dont crash but the share buttons simply does nothing on iPads/iOS tablets (but again: works on any other device group)

Share image with Text to Twitter

I am able to share text, I am able share image.
But i am not able to share both together.

How to make that possible?

Thanks in Advance

Crash on iOS with UTF-8 and special characters in URL

Hi guys, I would like to report app crash during share of URL which contain one of listed characters [č ć š đ ž].
I am sharing generated URL to web URL and app crashes only if contain one of those chars. (incl caps).

I've checked plugin files for encoding type and everything is UTF-8. Something else is problem here.
I would love to avoid converting those chars to [c c s d z].
I've tried with older and latest versions, both have same problem. iOS is 13.0.4. Android works just fine.

UPDATE: shareURL takes 2 parameters, 1. URL and 2nd is Title. Title can hold any UTF special č š ć ž.. etc. But url can not. Is there a function to decode them to something like %u2603 because this would work?

Any ideas what could be a problem?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.