How to get the currently selected text in any app? - ios

I want to get the selected text from any application. Is there a way to send it to my app? In android there is a Share button, but how does iOS do it? Or there is another way

You can possibly use the UIPasteBoard API for your needs: https://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIPasteboard_Class/Reference.html
There is, however not any way apps can communicate with each as apps are sandboxed on iOS and not open like you're used to with Android development.

Related

How to open an app in my flutter app without making it fill up the whole screen?

I'm trying to make a flutter app that can open Instagram, twitter or any other app.
But, I don't want the app to fill up the whole screen. I also want to display the app inside of my own app like this:
Is there a way to display an app like this?
This is not possible.
Opening other apps require their permission.
This means that you need development access for those apps.
Android
iOS
The way an app is displayed is handled by the OS and that functionality is not accessible for iOS and Android developers to be customised.

Adding Safari bookmarks on iOS

Is there any way one can add a URL to Safari bookmarks?
I'd like to have an extension to bookmark a webpage (opened in any app's webview).
Since it's for personal use, it can be a private way of doing that.
To my best knowledge, there isn't any APIs to modify Safari bookmarks on iOS. But on macOS, there are ways to do it (e.g. A UNIX script to add a bookmark to Safari).
Since it is for your personal use, I suggest you to create a macOS companion app to receive instructions from your iOS extension and add bookmarks accordingly.

Is there a way to get notes from iOS default note application programmatically? [duplicate]

i'm developing a notes app and I want to import all the notes stored in the default ios app into mine.
How should I do this?
There's no API to do this. 3rd party apps have no access to such data.

Launch an app on iOS using taps

I would like to know if it is possible to launch an app on iOS that is currently in the back group using three taps for example ? Think of it as a short cut on a desktop app.
Thanks
No!
That is not possible. There is no way to open one specific app on some combination of touches.
You can however open other apps from your app using url schemes, but something like that is not supported across the entire OS and of course not supported on the springboard. (see the apple docs)

How can I show my app in the menu that is displayed when text is selected in another iOS app?

Let's say I am in Safari and I select some text on a web page. A menu pops up that shows "Copy" and possibly other options.
How can I show my app in that menu?
(The purpose would be to send that text to my app in a custom url scheme.)
Edit:
I thought I saw this behavior in safari, but I was mistaken. It was in an app called Equipd.
Here is an example:
![enter image description here][2]
Is this due to a collaboration between Equipd and Pleco? Or can Equipd just do this because it knows about Pleco's custom url scheme? Or is something else going on here?
It's not possible to edit this kind of menu without using jailbreak-methods. But Apple won't allow these kind of methods in their App Store apps.
But you can use the new App Extensions which Apple introduced with iOS 8. You should check the App Extension Programming Guide Apple provides.
There are different extension-types. What you will need is the Share Extension.

Resources