What's the best way to create a custom sharing method on iOS? - ios

A streaming app that I'm using on iOS has a share button that allows me to hook into the sharing app extension. I'd like to be able to send the URL string that it has to a custom API on my server.
Would I need to create an entire app just to have that custom sharing method, or is there another way?
If that's the only way, how can I get that app on my phone without going through the store?
It seems like when I create, build and install apps through Xcode, Apple intentionally breaks the app after a short while?

Related

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.

Application inside another application in iOS

How do you import or display an application inside another application?
It is like, it will be a part of the app where you can use it's functionalities. Maybe in full screen or not in full screen. My thoughts are these are web based and is being opened in a UIWebView to use the functionalities.
Extensions? It's more like "piggybacking".
Here's an example:
https://hub.united.com/en-us/news/web/pages/uber-on-the-united-app.aspx
I'll post an answer regrouping my answer and also #Popeye one that seems valid too.
There may be a few ways to do it, each ones of them may act differently.
The other app offers a public SDK/API/WebServices
As an example, I'll take FaceBook API, that allow you to login giving you a UIViewController (that you can customise), and allowing you to ask for some data through their WebServices (like who are the friends, etc.). You're still inside your app.
The other app offers you a private SDK/API/WebServices
Same as the other one, but it more like a parternship. You're still inside your app.
URL Schemes
The other app gives you a few way to interact with it. They check if the app is installed, and launch it with some parameters, or if not, they may redirect it to the app in the Store, their website, etc. More info about URL Schemes from Apple Doc. You have to check their documentaion to know how to interact with it.

Access code and data in hosting app using today extension

I'm wondering if it's at all possible to access features in the main app using a today extension in iOS 8. For example, can a media player send commands from its extension to the main app without opening the app (I know there is a framework for this but it's just an example)? The only solution I can see is using URIs but the problem is that it will open the app which isn't the behavior I'm looking for.
So for a complete example using the media player:
There is an extension in the today screen that allows you to play/pause using a button.
The user presses the button and the app plays/pauses in the background without leaving the notification center.
Any way to achieve this behavior?
Code can be shared using an embedded framework, however there are some backwards compatibility issues.
Data can be shared using shared user defaults.
Both are explained in the apple docs.

iOS Conversion / installation Tracking

Objective: i want to fetch my custom parameter(referrer) from iTunes link upon installation of my application in device.
iTunes links look somethings like this:
https://itunes.apple.com/in/app/complete-gym-guide-lite/id550449574?mt=8
If i append my parameter say(&referrer=xyz)at the end and i open this url in ios safari browser then it will prompt to download the application.
Confusion: will app store send my parameter(referrer) to my application on launch so that i can fetch it in my application and use it.
In case of Android play store link look like this: http://play.google.com/store/apps/details?id=&referrer=guid%3D%guid%
As you can see referrer parameter at the end of url. Once app is installed in device then play store will send this parameter to app using INSTALL_REFERRER broadcast receiver. We can use this parameter.
What i tried OR Other people doing for conversion tracking: Other people are simply sending static data to their server at the first time opening of app and maintain a flag in NSDefault to make sure that app does not send same data again. I can also do the same as well as alternate ways suggested in below links but i want to do something with custom parameter.
I have already seen below links:
iOS - track which ad campaigns my installs are coming from
Tracking iOS installs from multiple marketing sources
Please help me out.
As #Aditya said, for now, Apple is not sending any referrer (or params) from iTunes to installation.
The only way you have it's to use a third party sdk to get your installations.
I have been working on a own sdk to get this but the way to get any info it's really hard and not really confident to use it. So endly we used some third party which are using many techniques to getting this (as fingerprint data, App2App methods, etc...)
I have tested appsflyer sdk and facebook sdk, they work as expected, use this or any else you prefer.
Hope this helps

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.

Resources