tjvantoll / nativescript-social-share

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

image not sharing IOS custom modal in nativescript-angular in nativescript-social-share #39

Open divyachandana opened 5 years ago

divyachandana commented 5 years ago

i'm trying to share image in custom modal in (IOS) nativescript-angular. i'm dont see any errors but i could not able to share image. using this version of

"nativescript-social-share": "^1.5.1"

@tjvantoll

tjvantoll commented 5 years ago

@divyachandana Sorry you hit issues here. Can you create a Playground example that shows this behavior in action? This should be a pretty decent starting point.

Skintillion commented 5 years ago

If you close the modal before the share command it works.

page.closeModal();
SocialShare.shareImage(image,"How would you like to share this image?");
rhurup commented 5 years ago

I have almost the same issue on core Nativescript, just on shareUrl().

new connection to <private> config 0x280c102a0
Task <9ECEA23A-8147-4D0B-9465-DE726088F65F>.<9> now using Connection 11
nw_endpoint_flow_protocol_connected [C11.1 IPv4#a26ac6b3:443 ready channel-flow (satisfied)] Output protocol connected
Task <9ECEA23A-8147-4D0B-9465-DE726088F65F>.<9> sent request, body N
Task <9ECEA23A-8147-4D0B-9465-DE726088F65F>.<9> received response, status 200 content K
Task <9ECEA23A-8147-4D0B-9465-DE726088F65F>.<9> done using Connection 11
Task <9ECEA23A-8147-4D0B-9465-DE726088F65F>.<9> response ended
<UIActivityViewController: 0x10b80c600> initialized
*** JavaScript call stack:
(
0   initWithActivityItemsApplicationActivities@[native code]
1   share@file:///app/tns_modules/nativescript-social-share/social-share.js:6:52
2   shareUrl@file:///app/tns_modules/nativescript-social-share/social-share.js:30:10
3   shareImage@file:///app/specie_images/showimages-page.js:153:25
4   recognize@file:///app/tns_modules/tns-core-modules/ui/gestures/gestures.js:58:26
5   UIApplicationMain@[native code]
6   start@file:///app/tns_modules/tns-core-modules/application/application.js:275:26
7   run@file:///app/tns_modules/tns-core-modules/application/application.js:303:10
8   anonymous@file:///app/app.js:45:16
9   evaluate@[native code]
10  moduleEvaluation@:1:11
11  promiseReactionJob@:1:11
)
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]'
*** First throw call stack:
(0x190fd9ea4 0x1901a9a50 0x190f51384 0x190eca404 0x190ec1fb4 0x1901bd6f0 0x1be2750c0 0x104a2c044 0x104a28c8c 0x104a28750 0x103ef1740 0x104a2780c 0x104a26bd0 0x104a26bd0 0x104a26bd0 0x104a26bd0 0x104a1f870 0x1048158d8 0x1047e1940 0x103f50de0 0x103f50974 0x103f50fd0 0x104a29578 0x104a2c1b4 0x1bddcd0d0 0x1bddd56ec 0x1bddd2f70 0x1bddd2458 0x1bddc5760 0x1bddc52cc 0x1bddc509c 0x1be1f0cb4 0x1be1cffcc 0x1be29ee38 0x1be2a1830 0x1be2a1b90 0x1be29a320 0x190f6a0e0 0x190f6a060 0x190f69944 0x190f64810 0x190f640e0 0x1931dd584 0x1be1b4c00 0x104a2c044 0x104a28c8c 0x104a28750 0x103ef1740 0x104a2780c 0x104a26bd0 0x104a26bd0 0x104a26bd0 0x104a1f870 0x1048158d8 0x1047e1940 0x1049b4c6c 0x103f04414 0x104044f7c 0x104a276e8 0x104a26bd0 0x104a26bd0 0x104a1f870 0x1048158d8 0x1047e1940 0x1049b4dbc 0x10403c38c 0x103efba80<\M-b\M^@\M-&>

Even with a

    page.closeModal();
    SocialShare.shareUrl(shareImageUrl, "Please share our app! :)");