Display all the apps that support sending messages (Chatting) - ios

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.

Related

Create iOS app store links for social media and messaging? Error: Safari cannot open the page because the address is invalid

This answer is similar but doesn't address how to create links that can be shared and opened via iMessage, email, or social media.
The Apple documentation suggests URLs of the format http://appstore.com/companyname (e.g., http://appstore.com/gameloft) if the goal is to list all apps by a company.
However, opening links like this generate an error in Safari, specifically that
Safari cannot open the page because the address is invalid
1) What iOS App Store URL format will display all the apps from a company, and works from both mobile iOS and desktop?
2) What iOS App Store URL format will display a single app, and works from both mobile iOS and desktop?
The easiest way for creating links to iTunes content is to use the iTunes Link Maker, https://linkmaker.itunes.apple.com/.
You can select your country and the content type, e.g. app, music, etc, and search for the content you want, and then you will recieve valid links for different purposes...
But you can generate only links to content, not to a company
Make sure you're not testing on the OS Simulator because it doesn't come with an app store, so your links will return invalid. Instead, try testing the links on an actual iOS device.

How to call out to another app within an app - iOS

We use an LMS calles Canvas by instructure. Our students access the LMS via the iOS app, however we would like to be able to call out from this app to another app (e-book reader).
We just want to be able to select a link which will redirect us to the app.
We have a coder in our staff, and we would really appreciate any advise on how to achieve the above.
You can communicate with URL Schemes between apps Apple Inter-App Communication
And here is Tutorial explaining URL Schemes implementation.
If you have access to the e-book reader app's codebase, this is simple to achieve by specifying a URL Scheme this app may respond to (or, alternatively, if you happen to know what URL Schemes this app supports). Then it will be as simple as calling out a URL of a corresponding format from within the iOS app your students use.
Alternatively, if your app provides access to the documents of some sort, you could look into UIDocumentInteractionController that can add "Open in..." functionality to your app, allowing app users to open a document in an arbitrary app that supports this file format.

How to share a link from the app using other applications

I want to share a link from my app using other applications installed on my iPhone such as Gmail, Facebook, DropBox, WhatsApp etc. In android there is a straight way to do so, just fire an intent and it automatically shows the installed apps through which we can share whatever we want. Is there any such way in iPhone ?
Thanks!
On iOS , app is more separated from each other. The only way to pass data from one app to other is using the URL mechanism. As one example, an app register url scheme "open-me://",you invoked openURL with "open-me://my-link" then that app will launched. That app will define the detail of the URL so it could understand the content.Continue with the example we are using, the text you passed could be either "open-me://A?data=my-link" or "open-me://A?message=my-link". So there are no general solution for all apps.Typically third party app will provide a SDK to make these things easy.
If you don't mind using a kind of large third party library, ShareKit is a good choice. It supports quite some apps.
If you want to know more about this topic,for example sharing files between app. You could start from reading the class reference of UIDocumentInteractionController.This UI component will show a list of app installed on your device which support the URL scheme.

Exchange data between iOS apps

I know about x-callback-url, and how it's possible to e.g. send a string to an app in iOS.
But is it possible to do this the other way around, e.g is it possible for an iOS app to fetch the song currently playing in Music.app? Can an app fetch a message with a specific caller ID from Messages.app?
I believe, you need to have access to their API/backend to do that. Talking directly to another iOS app is not possible.
No, I'm not a crook ;) I want my app to read the content of an SMS that my gateway has sent, for device authorization.
register a scheme for your app. add a link with that scheme in your sms, with the registration code as uri-path. by clicking that should open your app and you can process the uri.

Sharing iOS custom url links

I have a Mobile App with a custom url scheme registered. The App also has social sharing enabled to allow users to share deep links within the App on Facebook, Twitter and email.
My question related to this is how to handle situations cleanly where this custom iOS url is opened on a non-ios device like a PC or a Android device.
Detect the device and change the URL scheme based on that device. If you're using HTML you can use a jQuery plugin. See this link: What is the best way to detect a mobile device in jQuery?

Resources