Code Monkey home page Code Monkey logo

cordova-plugin-openwith's People

Contributors

benjaminponcet avatar davdiv avatar devtobo avatar harelm avatar j3k0 avatar niklasmerz avatar penguinhardt 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  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cordova-plugin-openwith's Issues

PDF/XML not working

I have been trying to configure the plugin with public.content in the IOS_UNIFORM_TYPE_IDENTIFIER variable, but it doesn't work. But public.image works. Why???

JSON serialization of intent returns null

I have a Ionic app with this plugin that I am testing on an Android emulator. The plugin is initialized successfully but the handle function is never called. I added some logs and it seems that both intent.getClipData and intent.getExtras return null, which means that the toJSONObject returns null therefore intent is never processed.

I am testing this on an Android emulator 7.1.1 and I am opening a simple image from my Downloads folder. Here are some logs (I added the intent.toString()), let me know what else can I do to help with the troubleshooting:

D openwith: [native] onNewIntent() android.intent.action.VIEW
D openwith: [native] Intent { act=android.intent.action.VIEW dat=content://com.android.providers.downloads.documents/document/28 typ=image/jpeg flg=0x13000003 cmp=io.ionic.starter/.MainActivity }
D openwith: [native] processPendingIntents()

Data Base64 Error

Hi j3k0, Your plugin is awesome. it is working perfect until the point it reads the data of a image jpeg file. I rendered it to image src with prefixing standard jpeg file text. It is perfectly displaying in the page. now the problem starts from here, When I try to read the same image src back into javascript, it is quitting. Do I have to do something extra? thnq

Share from Camera app does not open app

If I share an image from the Camera app the social share dialog appears, but the the app does not open after clicking "Post".

Shares from the gallery app work perfectly and the app is opened after clicking "Post".

Does this happen to other users of this plugin, too?

App Icon not displayed in SentTo list - on IOS

@j3k0 @NiklasMerz @hoboman313 @davdiv @penguinhardt

I am using this plugin for sharing images with my app. It's working fine with Android devices.
But in IOS devices it shows me error first, for ShareViewController.h' file not found during ios build
then i added path in plugin.xml for ShareViewController.h' file then it resolved issue

now it's initialized but Icon not displayed in SentTo list
untitled

can you please help me to resolve this issue ?

iOS app is not started

Hi, First i want to thank you for the plugin. On ios, when I share an Image to my app, and the app is not running, it will not start the app. The intent is then received when I start the app manually. If the app IS already running and I share, the app does not come to the foreground and the intent is received when I switch to the app.

Any idea what is wrong?
Jan

IOS - problem configuring App Group

Hi!

Plugin works great in Android, thanks a lot 👍

I do struggle with IOS though, when in XCode (9.2) configuring the App Group.

I get the exact same message as shown in the screenshot here:

I have configured the App Group in IOS Developer pages, adding it to the App ID, and updating the provisioning profile. And doing the same for the "ShareExt" target.

Anyone else run into this situation?!

Cheers
-jo

file path in ios

when i want to upload a photo in ios from share as i can see i don't have the photo file path. The only think i have that look like path is extension://index=0 but it does not work while i am trying to upload photo.

What is the UTI for sharing pages using Safari?

The goal of my app is to be able to open Safari (on iOS) -> navigate to a web page -> click on the Share icon -> have my app show up in the list of apps to share to -> accept and handle the data

I've tried many different Uniform Type Identifiers, and none of them cause my app to show up in the list of apps to share to, even after clicking "More." However, public.image works just fine for sharing images from the Photos app on my (simulated) device, but nada when it comes to safari, even raw images loaded in safari.

So far I've tried:

  • public.text
  • public.url
  • public.document (that works for the Photos app)
  • public.item

But nothing is causing it to show up. Any help would be appreciated.

ios share doesn't work after testflight

After installing the plugin, everything works perfect with sharing data in ios while running the app in my phone (choose a photo for share, and then open a specific view on my app for upload form). But when i uploaded the app using testFlight the when i am using sharing to upload photos on my app, it opens the app bun doesn't have the same behaviour as running from xcode.

any idea what is going wrong?

Share geolocation

While I use the plugin with [wildcard]/[wildcard] as mimetype it will shown up in all share menus in android. By the time I‌ share location from google map there is an empty object in intent. I‌ tried with "action.SEND" and "action.VIEW", also multiple mimetypes, but no difference in result.
Is it possible to handle geolocation with this plugin?

Open UTI other than simple public.image

Hi, I tried to use other public.item UTI with this plugin but it doesn't seem to work. Is it my exclusive problem or what?

I really need to open xml and json files but it doesn't accept any file other than images, I tried with public.item, public.data and public.content but nothing. I tried to dive into the plugin but (and I'm a completely agnostic in this ) it seems that images are the default UTI..

Is it possibile to change the plugin in order to let it accept every UTI?

`cordova run android` failed with error: 'unkonwn element <uses-permission> found'

Hi there,

  • system: macOS 10.13.5
  • cordova: v8.0.0
  • android-studio: v3.0.1

Fresh cordova app, installed with only cordova-plugin-openwith by the command line:
cordova plugin add cc.fovea.cordova.openwith --variable ANDROID_MIME_TYPE="*/*"
When cordova run android, the following error is thrown:

/Projects/my-cordova/platforms/android/app/build/intermediates/manifests/full/debug/AndroidManifest.xml:49: error: unknown element <uses-permission> found.
Failed to execute aapt
com.android.ide.common.process.ProcessException: Failed to execute aapt
at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:796)
at com.android.build.gradle.tasks.ProcessAndroidResources.invokeAaptForSplit(ProcessAndroidResources.java:551)
at com.android.build.gradle.tasks.ProcessAndroidResources.doFullTaskAction(ProcessAndroidResources.java:285)
at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:109)
at sun.reflect.GeneratedMethodAccessor412.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.java:173)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:121)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:111)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:63)
at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)

After poking around, I removed the following lines from platfoms/android/android.json:

       {
         "xml": "<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\" />",
         "count": 1
       },`

and moved the line in the file 'platforms/android/app/src/main/AndroidManifest.xml'

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

from within the <application> to directly above the <application> tag, so now the file becomes:

<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="10000" android:versionName="1.0.0" package="io.cordova.hellocordova" xmlns:android="http://schemas.android.com/apk/res/android"\>
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application android:hardwareAccelerated="true" android:icon="@mipmap/icon" android:label="@string/app_name" android:supportsRtl="true">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/activity_name" android:launchMode="singleTask" android:name="MainActivity" android:theme="@android:style/Theme.DeviceDefault.NoActionBar" android:windowSoftInputMode="adjustResize">
<intent-filter android:label="@string/launcher_name">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<data android:mimeType="/" />
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="26" />
</manifest>

Then, cordova run android succeeded again, and I can see the cordova app in the 'share to' panel.

Now I'm totally new to android and cordova, please correct me if this is a false issue.
Thanks.

Add typings

It would save a lot of trial and error if this plug-in would have typescript definitions shipped with it.

Cannot build ios

When I try to build ios: ionic cordova build ios

I get this error

The following build commands failed:
	CompileC /Users/user905941/Library/Developer/Xcode/DerivedData/Nicehash-avhemrwudlhajearzlilnbektwem/Build/Intermediates.noindex/Nicehash.build/Debug-iphonesimulator/Nicehash.build/Objects-normal/x86_64/OpenWithPlugin.o Nicehash/Plugins/cc.fovea.cordova.openwith/OpenWithPlugin.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/user905941/Projects/Nicehash/NicehashApp/NicehashApp/platforms/ios/cordova/build-debug.xcconfig,-workspace,Nicehash.xcworkspace,-scheme,Nicehash,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone X,build,CONFIGURATION_BUILD_DIR=/Users/user905941/Projects/Nicehash/NicehashApp/NicehashApp/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/user905941/Projects/Nicehash/NicehashApp/NicehashApp/platforms/ios/build/sharedpch
An error occurred while running subprocess cordova.

Any ideas how to fix it?

Sharing images in iOS 12

Hi,

Have you guys managed to make this work for images in iOS 12 (text and url's are working at least inside the simulator)? It does work for me on lower iOS versions.

Thanks :)

Adding this pulg-in causes cordova-fetch to fail

I'm not sure I fully understand why, but it seems that adding this plug-in causes my CI to fail.
Any idea why would this happen?
The error I'm getting is:
npm : Failed to fetch platform cordova-android@^7.1.4
Error can be seen here:
https://ci.appveyor.com/project/IsraelHikingHost/site/builds/21815028/job/nc9be11w88vn61fj
After the next check-in I did to remove this plugin the CI started working again.
Your help would be super appreciated as I have no clue why would this happen...
I also tried asking here:
apache/cordova-cli#357

Nothing to share?

I've followed the installation instructions, installed the plugin, setup App Groups, enabled the entitlements, added them to my provisioning profiles, built my app. I've added a handler to my app and see the output in the Xcode console when initialised like this:

[OpenWithPlugin.m][onReset]
[OpenWithPlugin.m][setVerbosity] 0
openwith: init()
[OpenWithPlugin.m][setLogger] OpenWithPlugin252748709
[OpenWithPlugin.m][setHandler] OpenWithPlugin252748710
[OpenWithPlugin.m][init]
[OpenWithPlugin.m][checkForFileToShare]
[OpenWithPlugin.m][checkForFileToShare] Nothing to share
openwith: addHandler()
openwith: initSuccess()
openwith init success!

When opening the Photos app and selecting a photo to share, I see my app in the share with menu. Tapping it opens my app but the console just says:

[OpenWithPlugin.m][onResume]
[OpenWithPlugin.m][checkForFileToShare]
[OpenWithPlugin.m][checkForFileToShare] Nothing to share
PBItemCollectionServicer connection disconnected.

My handler has the console.log output from the demo project so should display the details of any intent received but seems it's not fired at all. I have exhausted all of the help/documentation provided... any ideas what I can do to debug this?

textContent is not got from ShareViewController

Hi, I have implemented this plugin for iOS.
When using it on emulator with data of message and image, the console shows below message.

[OpenWithPlugin.m][checkForFileToShare] Data content is invalid

In my understanding, sending dict.text is removed from ShareViewController at v.1.2.0.
But, receiving dict.text is checked for type of string on OpenWithPlugin.
Is it better to be sending dict.text ?

Please let me know a solution.
Thanks

follow the instruction but when i open share panel on ios my app doesn't show

maybe i missed something like 8

repeat the previous five steps for the ShareExtension target.
You might also have to select a Team for both the App and Share Extension targets, make sure to select the same.

Build, XCode might complain about a few things to setup that it will fix for you (creation entitlements files, etc).

image

image

Plugin will not open shares csv files, only images

Hey,

I got everything up and running so far with images. If I want to share an image, my app pops up in the open with dialog. The problem is that I need to open csv files with my app, not images, so I changed the file types accordingly to the following:

        "ANDROID_MIME_TYPE": "text/csv"
        "IOS_UNIFORM_TYPE_IDENTIFIER": "public.comma-separated-values-text"

But on both, ios and android, the app will not be displayed in the dialog when I try to open a csv file. However it still remains visible in the open image dialog.
I tried removing the plugin and adding it again, removing the plugin and the platforms, readding both but nothing seems to be working. Has anyone accomplished to open a file other than an image?

Multiple mime types

I have the following use case which I need to solve:
I would like to open a gpx file. seems easy, but the following is what needs to be added to the manifest:

  <intent-filter>
	<action android:name="android.intent.action.VIEW"/>
	<category android:name="android.intent.category.DEFAULT"/>
	<category android:name="android.intent.category.BROWSABLE"/>
	<data android:mimeType="text/xml"/>
	<data android:mimeType="text/plain"/>
	<data android:mimeType="application/gpx"/>
	<data android:mimeType="application/gpx+xml"/>
	<data android:mimeType="application/octet-stream"/>
	<data android:mimeType="application/xml"/>
	<data android:host="*" android:scheme="http"/>
	<data android:host="*" android:scheme="https"/>
	<data android:host="*" android:scheme="content"/>
  </intent-filter>
  <intent-filter>
	<action android:name="android.intent.action.VIEW"/>
	<category android:name="android.intent.category.DEFAULT"/>
	<category android:name="android.intent.category.BROWSABLE"/>
	<data android:mimeType="*/*"/>
	<data android:host="*" android:pathPattern=".*\.gpx" android:scheme="file"/>
	<data android:host="*" android:pathPattern=".*\..*\.gpx" android:scheme="file"/>
	<data android:host="*" android:pathPattern=".*\..*\..*\.gpx" android:scheme="file"/>
	<data android:host="*" android:pathPattern=".*\..*\..*\..*\.gpx" android:scheme="file"/>
  </intent-filter>

How can I achieve this using this plugin?

unknown element <uses-permission>

While attempting to build with this plugin:

.meteor/local/cordova-build/platforms/android/build/intermediates/manifests/full/debug/AndroidManifest.xml:113:
AAPT: error: unknown element found.

Patching of Xcode Project File does not work

Hi,

after installing the Plugin, i got no additional Target in XCode (for the ShareExtension).
The Hooks seem to run, but the Target is not added into the projec.pbxproj File.

Adding target "cc.fovea.cordova.openwith/ShareExtension" to XCode project
  - Folder containing your iOS project: /Users/jensfischer/angularProjects/xxxx/platforms/ios/
    Parsing existing project at location: /Users/jensfischer/angularProjects/xxxx/platforms/ios/xxxxx.xcodeproj/project.pbxproj...
    ShareExtension group already exists.
Added ShareExtension to XCode project

(Replaced the projects's name with xxxx for this issue)

Any ideas what could cause this?

Issue with IOS

I had used this plugin with IOS.

It will made my app visible when we share a image from gallery, but after that it will just open the my app home screen and do nothing.

Please reply. Its very Urgent!!!!

Handler not firing on ios, nothing to share

I've tried the plugin in my app with custom UTI but it didn't work, then i tried the basic example with image and that didn't work too, i get this info:

2019-04-16 11:27:43.164983+0200 HelloCordova[99297:490675] Apache Cordova native platform version 5.0.0 is starting.
2019-04-16 11:27:43.165305+0200 HelloCordova[99297:490675] Multi-tasking -> Device: YES, App: YES
2019-04-16 11:27:43.168790+0200 HelloCordova[99297:490675]

Started backup to iCloud! Please be careful.
Your application might be rejected by Apple if you store too much data.
For more information please read "iOS Data Storage Guidelines" at:
https://developer.apple.com/icloud/documentation/data-storage/
To disable web storage backup to iCloud, set the BackupWebStorage preference to "local" in the Cordova config.xml file
2019-04-16 11:27:43.193166+0200 HelloCordova[99297:490675] Using UIWebView
2019-04-16 11:27:43.194041+0200 HelloCordova[99297:490675] [CDVTimer][console] 0.029922ms
2019-04-16 11:27:43.194301+0200 HelloCordova[99297:490675] [CDVTimer][handleopenurl] 0.180960ms
2019-04-16 11:27:43.195195+0200 HelloCordova[99297:490675] [CDVTimer][intentandnavigationfilter] 0.831008ms
2019-04-16 11:27:43.195294+0200 HelloCordova[99297:490675] [CDVTimer][gesturehandler] 0.030994ms
2019-04-16 11:27:43.195380+0200 HelloCordova[99297:490675] [OpenWithPlugin.m][onReset]
2019-04-16 11:27:43.195438+0200 HelloCordova[99297:490675] [OpenWithPlugin.m][pluginInitialize] OK
2019-04-16 11:27:43.195486+0200 HelloCordova[99297:490675] [CDVTimer][openwithplugin] 0.135064ms
2019-04-16 11:27:43.195545+0200 HelloCordova[99297:490675] [CDVTimer][TotalPluginStartup] 1.563072ms
2019-04-16 11:27:44.262038+0200 HelloCordova[99297:490675] Resetting plugins due to page load.
2019-04-16 11:27:44.262122+0200 HelloCordova[99297:490675] [OpenWithPlugin.m][onReset]
2019-04-16 11:27:44.288244+0200 HelloCordova[99297:490675] Failed to load webpage with error: The operation couldn’t be completed. (NSURLErrorDomain error -999.)
2019-04-16 11:27:44.289014+0200 HelloCordova[99297:490675] Resetting plugins due to page load.
2019-04-16 11:27:44.289077+0200 HelloCordova[99297:490675] [OpenWithPlugin.m][onReset]
2019-04-16 11:27:44.956358+0200 HelloCordova[99297:490675] Finished load of: file:///Users/jack/Library/Developer/CoreSimulator/Devices/6A5C232E-5284-410F-87D6-FE88E7ED09AC/data/Containers/Bundle/Application/3B07DF7A-6FE5-4D8D-872D-B707C274B794/HelloCordova.app/www/index.html
2019-04-16 11:27:44.960220+0200 HelloCordova[99297:490675] [OpenWithPlugin.m][setVerbosity] 0
2019-04-16 11:27:44.988338+0200 HelloCordova[99297:490675] [OpenWithPlugin.m][setLogger] OpenWithPlugin1550291298
2019-04-16 11:27:44.989308+0200 HelloCordova[99297:490675] [OpenWithPlugin.m][setHandler] OpenWithPlugin1550291299
2019-04-16 11:27:44.989741+0200 HelloCordova[99297:490675] [OpenWithPlugin.m][init]
2019-04-16 11:27:44.990032+0200 HelloCordova[99297:490675] [OpenWithPlugin.m][checkForFileToShare]
2019-04-16 11:27:44.990374+0200 HelloCordova[99297:490675] [OpenWithPlugin.m][checkForFileToShare] Nothing to share
2019-04-16 11:27:44.990572+0200 HelloCordova[99297:490675] Received Event: deviceready
2019-04-16 11:27:44.990643+0200 HelloCordova[99297:490675] 04-16 11:27:44 D openwith: init()
2019-04-16 11:27:44.990705+0200 HelloCordova[99297:490675] 04-16 11:27:44 D openwith: addHandler()
2019-04-16 11:27:44.991559+0200 HelloCordova[99297:490675] 04-16 11:27:44 D openwith: initSuccess()
2019-04-16 11:27:44.991624+0200 HelloCordova[99297:490675] init success!
2019-04-16 11:28:27.898087+0200 HelloCordova[99297:490675] [OpenWithPlugin.m][onResume]
2019-04-16 11:28:27.898268+0200 HelloCordova[99297:490675] [OpenWithPlugin.m][checkForFileToShare]
2019-04-16 11:28:27.898418+0200 HelloCordova[99297:490675] [OpenWithPlugin.m][checkForFileToShare] Nothing to share
2019-04-16 11:29:01.244667+0200 HelloCordova[99297:490675] Simulator user has requested new graphics quality: 10
2019-04-16 11:29:05.282484+0200 HelloCordova[99297:490675] [OpenWithPlugin.m][onResume]
2019-04-16 11:29:05.282647+0200 HelloCordova[99297:490675] [OpenWithPlugin.m][checkForFileToShare]
2019-04-16 11:29:05.282814+0200 HelloCordova[99297:490675] [OpenWithPlugin.m][checkForFileToShare] Nothing to share
2019-04-16 11:29:40.089829+0200 HelloCordova[99297:490675] [OpenWithPlugin.m][onResume]
2019-04-16 11:29:40.090049+0200 HelloCordova[99297:490675] [OpenWithPlugin.m][checkForFileToShare]
2019-04-16 11:29:40.090260+0200 HelloCordova[99297:490675] [OpenWithPlugin.m][checkForFileToShare] Nothing to share

Even though I share the image from Photos the log says nothing to share

Openwith appears incompatible with the standard approved Push Plugin

Build a standard blank Ionic project, add the ios platform, Add the push plugin, build => Builds OK

Add the OpenWith plugin, and build will fail.

NOTE: This is quite possibly a duplicate of phonegap/phonegap-plugin-push#2274, but when built with a different ordering, the failure symptoms are different (can't find Plist, vs linker failure in other case, but underlying cause may be the same). If you add the plugins in the other order, you will get an error more like Issue 2274 on Push plugin.

Prerequisites for the installation are that one has installed cocopods per the Push instructions (see https://github.com/phonegap/phonegap-plugin-push), and that one has set up Developer certs, App Group and App ID in concert (per the directions for this plugin). Then:

ionic start intentTest8 blank --type ionic1
cd intentTest8
   (make sure config.xml has right app id for the App Group)
ionic cordova platform add ios
ionic cordova plugin add phonegap-plugin-push
   (ensure developer signing set correctly)
ionic cordova build ios

=> Works.

Then

cordova plugin add cc.fovea.cordova.openwith --variable ANDROID_MIME_TYPE="text/*"  --variable IOS_URL_SCHEME=ccfoveaopenwithdemo  --variable IOS_UNIFORM_TYPE_IDENTIFIER=public.text
ionic cordova build ios

=> Fails, with errors:

Marks-Air-2:intentTest8 markwatkins$ ionic cordova build ios
> cordova build ios
(node:67347) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): CordovaError: Could not find *-Info.plist file, or config.xml file.
(node:67347) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Marks-Air-2:intentTest8 markwatkins$ 

Not sure if something needs to be done to allow the ShareExt target to co-exist with Cocoapods?

Share webpage

Hello,

Would it be possible to share webpage url's? At the moment I get:

uri: "content://com.android.chrome.FileProvider/BlockedFile_17148492684749"

While I expected a webpage url.

Handler function is not called in case of deployed IOS App on Test Flight.

I have implemented this plugin. It is working fine for android.
But in the case of IOS. It is working fine when I am installing the app using Xcode locally, But when I am uploading it to Test Flight and installing from there. My app is in the list for share but handler function is not called.

Another Question :
How to use this plugin for sharing the different type of files on IOS.
As it is working for images only for me.

Open choose people dialog

Hey,

First Of All, Thanks for the great plugin.

I want a functionality like, WhatsApp. I mean I want to share image with particular people on my App. Is there any way I can open my custom page after I choose images and click on our app from Share? I can list out friends there and provide select option.

Thanks :)

Returns null for item value

I see this plugin working in some cases (ie. google apps), but not for SoundCloud's share. I'm certain that it shares data correctly.

Is Image Sharing Required by this plugin? Can't get it work sharing text only....

Great plugin! Thank you so much for putting it together!

Question: I have an app that I would like to receive shares of text from other apps, but can't accept image sharing. Is that possible? When I try what looks like the obvious, it doesn't seem to work...e.g.:

If I install the plugin via:

cordova plugin add cc.fovea.cordova.openwith --variable ANDROID_MIME_TYPE="image/*" --variable IOS_URL_SCHEME=ccfoveaopenwithdemo --variable IOS_UNIFORM_TYPE_IDENTIFIER=public.image

it works as expected - the photos app can share images to my app. But text selected in an app cannot.

However, if I install via:

cordova plugin add cc.fovea.cordova.openwith --variable ANDROID_MIME_TYPE="text/*" --variable IOS_URL_SCHEME=ccfoveaopenwithdemo --variable IOS_UNIFORM_TYPE_IDENTIFIER=public.text

Then neither sharing an image nor text to my app seems possible (my app doesn't show in the share menu).

Is it possible to only share text? I have not yet tried the "extra actions" approach but would prefer not to have my app show on the image sharing menu since I can't accept it...

Thanks!

with ionic framework

The plugin worked in ionic - android without any problem.
In ionic - ios, it worked but the receiver app (my app) could not get the data.
What could we do.

loadItemForTypeIdentifier completion handler returns (nil , nil) for (item, error)

I am trying to read an image from photos app on simulator.

// SHAREEXT_UNIFORM_TYPE_IDENTIFIER @"public.data".

This issue is with the extension target created by cordova. When I manually create extension target from xcode and have the same code, it works !!.

Is there anything missing here in the way the cordova adds extension target ? (entitlements etc.. ?)

ERROR: Method 'load:' not defined in Plugin 'OpenWithPlugin'

Hello, I get this error under IONIC v3, Platform iOS.

The handler get this intent item:
{"name":"","uti":"public.jpeg","utis":["public.jpeg"],"uri":"file:///private/var/mobile/Containers/Shared/AppGroup/9A08219E-0506-4667-8D2E-287DB167B89B/Library/Caches/82DF64B5-4476-422B-AE54-DD6C3CBC5CE0..com.apple.Foundation.NSItemProvider.ZiNZID.jpeg","type":"image/jpeg"}

but I get an error at this line:
`
(window).plugins.openwith.load(intent.items[0], function (data, item) {
// data is a long base64 string with the content of the file
console.log("the item weights " + data.length + " bytes");
alert("uploadToServer(item)");

        // "exit" when done.
        // Note that there is no need to wait for the upload to finish,
        // the app can continue while in background.
        if (intent.exit) {
          (<any>window).plugins.openwith.exit();
        }
      });

`
thanks

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.