How to override the mac app right-click options? - swift

I'm working on a mac app that is based on links like bitly.
Users can create short link mapping using the app.
I'm looking to provide an option that whenever the user right-clicks on links no matter what app users have been using I'm just looking to append my app's action Create short link along with.
Let's say a user right-clicks a link on slack, slack usually provides two options 1. Copy Link 2. Open Link I want to provide Create short link option along with that. Is that technically possible in the mac app?

Related

Open the app from an external link with universalLink or deeplink

I want to open app from an external link, for example a link that I get in iMessage, the question is, I should use deepLink or universalLink, I want to open the app when I tap on the link, then having ability to read the url in the app is enough for me.
And for this matter, I should set a Json file in the website as well? something like this:
https://developer.apple.com/documentation/xcode/supporting-universal-links-in-your-app
It's a bit confusing for me, could anyone gives me a real example and steps?
Thank you
Yes, basically both the app itself and the website need to be aware that you are going to be using Universal Links. There are a few steps to do this:
First you need to include the website as an Associated Domain inside of your Xcode project.
Then for the website you do have to create what is known as the apple-app-site-association file. This lets the the website know which apps are associated with the website.
This tutorial has a step by step on How to setup your website to work Universal Links.
Lastly you will have to have to update your AppDelegate file to handle when a Universal link opens the application.
More info can be found in the official Apple Documentation on Creating Universal Links.

How to link to page inside a flutter app?

When I click on the link I created on the website; If the application is installed, I want it to open and go to the page I want in the application, if the application is not installed, I want it to go to the app store or play store. I searched a lot but couldn't find it. Can you help me.
enter image description here
The solution for you would be deep linking or custom scheme. Them are practically, the same thing. Here you can find a link how to use them:
https://medium.com/flutter-community/deep-links-and-flutter-applications-how-to-handle-them-properly-8c9865af9283
This is exactly what Firebase Dynamic links was created for.
You can configure urls to redirect based on whether the user has the app installed or not.
https://firebase.google.com/docs/dynamic-links

Can Custom App Store Listings be created?

I want my app to show different metadata (title, subtitle, description, images etc) for different countries.
The way of doing this in Google Play Store would be to create custom listings.
Is the same possible for App Store? If not, what are the ways of doing this? How international Apps like booking.com, uber etc do it?
I have gone through this documentation: https://help.apple.com/app-store-connect/#/dev34e9bbb5a and the only thing that stands out is have different apps for different territories.
You can create different app store pages by adding additional languages to your app on App Store Connect.
Simply go to App Store Connect > My Apps > Choose the app > Click on the languages dropdown on the right and add the languages. Then click on the version below "IOS APP" and you can add your language specific information.
That's exactly the same why as you would do it on Google Play Dev Console. Custom listing are something completely different as they allow you to target more specific audiences. The general languages correspond with the user language / store front.

branch.io sharesheet questions

Im using branch.io's sdk for unity, im having 2 questions im hoping someone could answer:
1: Is it any way to restrict the share sheet from sharing to certain apps? for example some apps that doesn't handle links well and in special the sms service.
The reason we do not want the ability to send by sms is that the app needs permission to access the phone book and thus the google play service will need an "privacy policy" link.
2: If its not then i would like to know if you guys could lead me in the right direction when writing a privacy policy because i do not have any legal education and do not know how to wright it. Is it sufficient to state that we are using your sdk? The demands are things like "you should see to it that the code is secure and encrypted" (Something like that) though i'm using your sdk and do not have a clue about how it works.
Thanks!
There is no way to change the list of apps from the share sheet in Branch's Unity SDK. Although Branch does have an end point to exclude certain apps using the Android SDK.
You will need to export your Unity 3D project to Android Studio. Once you successfully export the project, you can use the Branch Android SDK endpoint to exclude any app by providing the Package name of the App.
This is the sample code to update your Share Sheet:
//define the share sheet style
ShareSheetStyle shareSheetStyle = new ShareSheetStyle(context, shareTitle, shareDescription)
.setCopyUrlStyle(getResources().getDrawable(android.R.drawable.ic_menu_send), "Copy this URl", "Link added to clipboard")
.setMoreOptionStyle(getResources().getDrawable(android.R.drawable.ic_menu_search), "Show more")
.addPreferredSharingOption(SharingHelper.SHARE_WITH.FACEBOOK)
.addPreferredSharingOption(SharingHelper.SHARE_WITH.GMAIL)
.addPreferredSharingOption(SharingHelper.SHARE_WITH.TWITTER)
.addPreferredSharingOption(SharingHelper.SHARE_WITH.PINTEREST)
.setAsFullWidthStyle(true)
.setSharingTitle("Share With");
//to exclude whatsapp from the Share Sheet
shareSheetStyle.excludeFromShareSheet("com.whatsapp");
//to exclude android messages app from the Share Sheet
shareSheetStyle.excludeFromShareSheet("com.google.android.apps.messaging");

how do you link directly to app store app update page?

I'm finishing up an iPhone app. I'm using an external server to inform users of when an update is available for my app and allowing them to click from within the app to go straight to the update on the app store. Problem is, I can't seem to figure out the link format to go directly to the update. I've found an old method of using viewsoftwareUpdate (mentioned in another post here) but it's all related to outdated phobos links and I can't seem to get it working for me. I'm currently using the simple format to link directly to the app: itms-apps://itunes.com/apps/"appname", and I assume there is a way to alter this format to get to the app update instead of the main app page?
This seems like a pretty basic functionality so I'm surprised I can't find anything on it.
Also, does anybody know how to link directly to the users own update tab in the app store? Not specific to one app, but the update tab that shows all the updates they have available for download.
Turns out the phobos links do still work and you can link directly to the update page using this URL format:
itms-apps://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftwareUpdate?id=[APPID]&mt=8
Of course replacing the [APPID] with your own app id, not including the brackets. This will link directly to the latest update for the app, instead of the main app page.
[Note: the solution was posted in with the question, I just moved it here --progrmr]
Just link to your app in the app store, that link will never change.
The page will show the updates right above the screenshots.
Your best bet is to strip the update information from your apps page using JSON, or some XML parser.
As for the list of all updates, again, Apple compares versions of the installed apps and lists them accordingly, stripping out only the update information.
The phobos link did not work for me so I used the following link and it works great:
itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftwareUpdate?id=[APPID]&mt=8