is it possible to share text from apple watch app? - ios

I wants to share some text from my apple watch application to social media OR messaging apps . I found something from here - presentTextInputControllerWithSuggestions:allowedInputMode:completion:
I can able to show my text but not getting option to share my text like we found in UIactivityviewcontroller or share extension .

The method presentTextInputControllerWithSuggestions:allowedInputMode:completion: is useful to input text, for example by using voice input or by choosing from a list of suggestions.
If you want to share the selected text with someone else, send it to the iPhone app using the method openParentApplication... (more details here). Then on the iPhone, you have many possibilities that WatchKit currently does not offer.

Related

How to change iOS share feature text for my App?

I am looking for a way to dictate how my app is displayed in the iOS share feature window.
Currently opening the share feature from a different app (like Notes) will display my app with text that reads "Copy to ". I'm looking to change this to something like "Open with " or "Import to ".
The developer API pages do not seem very good though, and I have not been able to find a great answer. I imagine its some property in the info.plist, established upon installation, but I can't find out what that property might be.
Has anyone here done something like this before?
Attached image just grabbed off Google to show the text I'm talking about:
image of text
You need create a Share Extension for you App, the sharing extension allow you to share text, urls, images and videos to you app
This post can help you to get the solution that you need
https://hackernoon.com/how-to-build-an-ios-share-extension-in-swift-4a2019935b2e

XCODE / IOS - How to use exclusive extension to immediately present whatsapp (.wai, .waa, .wam)

Is there any way to make work that part of the whatsapp document interaction API:
Alternatively, if you want to show only WhatsApp in the application list (instead of WhatsApp plus any other public/*-conforming apps) you can specify a file of one of aforementioned types saved with the extension that is exclusive to WhatsApp:
images - «.wai» which is of type net.whatsapp.image
videos - «.wam» which is of type net.whatsapp.movie
audio files - «.waa» which is of type net.whatsapp.audio
When triggered, WhatsApp will immediately present the user with the contact/group picker screen. The media will be automatically sent to a selected contact/group.
I don't really ask for a code example as I almost tried eveything, but more if someone ever successfully opened the whatsapp application WITHOUT passing through the share menu (with messenger tile, whatsapp, notepad...) ?
FYI: As I went through a lot of tests with this, I couldn't find any solution yet.
Whatsapp recognize the file extension, but cannot even read it. Once shared, when you click on it, it's written ".whatsapp audio file", nothing more (And it's not even shared directly).
I sent a email to whatsapp developper team, they said they have others problem to fix currently, so it's not even on their to do list.
Wait & see..

iOS: How Do I Make a Button To Allow Users To Tell a Friend About My App? [duplicate]

This question already has an answer here:
"Tell Friend" example which allow selection multiple contact
(1 answer)
Closed 8 years ago.
After searching Google for my question, all I could find was Ad-hoc distribution options and tutorials, and it seems the results are over saturated for questions such as mine.
I simply need to make a method in my program that brings up the typical share options (action sheet) to allow my user to select ALL/ANY of the available options to inform his or her contacts about downloading my app, via any means of which the iOS divide is capable.
I'm hoping this can be handled by the iOS since I don't yet know the URL to the App Store to download my app.
EDIT: I'm a bit annoyed with the fact that so many people have rushed to mark this as a duplicate when in fact it is not.
The link to the pre existing question is that of an EMAIL ONLY share option.
As above, i clearly state: "I simply need to make a method in my program that brings up the typical share options to allow my user to select all the available options to inform his or her contacts about downloading my app."
EMAIL IS NOT ALL THE OPTIONS THAT ARE AVAILABLE...!
To use the inbuilt API for the share options like the image below, you will have to import the Social Framework.
Check out the following SO questions:
Question 1
Question 2
Apple Documentation
To address the last part of your question: You can know the URL to your App Store page even before it's in stores.
As soon as you create the app in iTunes Connect, your app is associated with a link that can be found by right-clicking on the "View in App Store" button within your app's iTunes Connect information. When creating your "share options," this is the link you should share in order to link to your page in the app store.
As far as programming the actual sharing goes, you'll need to be more specific about the type of sharing you want to do. If you want to share via Facebook or Twitter for example you'll need to use the relevant SDK/API to do so; if you want to share via email, you can use MFMailComposeViewController or perhaps an SMTP client; if you want to share via SMS, you can use MFMessageComposeViewController or an SMS service like Twilio... all depends...
Edit: Someone just now down-voted this answer, probably just because there was no mention of the action sheet; but the initial question had no mention of an action sheet until 5 days after its post. Like aksh1t said, yes, you can use the Social framework in that case.

Display all the apps that support sending messages (Chatting)

I want display all the apps in my app that support chatting. Actually I need to send the selected text via message applications (i.e., WhatsApp, WeChat, etc..) those are installed in my iOS device.
I have gone through UIDocumentInteractionController but it allow to share files only. But here in my case I want to share just text.
Is this possible. Please help me out, thanks.
iOS does not have a single option for sharing text, the UIActivityViewController can be used and will show the iOS integrated social networks.
You will be able to add you own service to this dialog, as long a the app has a URL scheme to support its.
A example of a Whatsapp UIActivity: https://github.com/jberlana/JBWhatsAppActivity
If you know the URL schemes (if the chatting app provides one) of the app, you can check if a app exists or not using -canOpenURL: of UIApplication class. If they support url schemes, you can send text in the format that those app supports.

iOS - Lauch other apps with search keywords

It is possible to launch another app (such as youtube, AppStore,Map, etc) from my iOS app & give it keyword for searching?
For example, I would like provide to user ability search cartoon video from my app & show the results in Youtube app.
Please share your though/
Thanks,
Huy
The only way to communicate with other apps is through URLs. Have a look at communicating with other apps. To answer your question, just create a URL that contains the search terms.
Since tagged app-store in your question, I'm sure you find this useful: How to link to apps on the app store.
A tip is to use itms:// instead of http://, then it'll open in the app
store directl

Resources