How Can I Launch The App-store App Directly from my Application - windows-8

I want to place a button or a link in my app with which the user can start the app-store and buy my app if the app is in trial mode.
I can not find any relavant Information on this. How can I implement this?

MSDN documentation: Creating links with the Windows Store protocol. Alternatively, the URI for the app in the store can be accessed using the Windows.ApplicationModel.Store.CurrentApp.LinkUri property.
You can then open a link to your app in the store using Windows.System.Launcher.LaunchUriAsync.

Related

React-Native: Share file

I'm a web developer (React) and I'm facing in my first react-native App. The context is an app where user can create and configure recipes. The app is without any type of authentication (at the moment). Now I would like to implement a Share functionality to share a recipe through social and messaging apps. The user clicking in the shared content open the app and can view the recipe.
At the moment I used react-native-fs and react-native-share to create and share a file (json or txt). Now I have problem to open app clicking the file shared. I saw some example of DeepLink but all the example involves only web resources. There are any way to use deeplink with file?
There are better pattern to achieve my objective? (considering the use case where there are only Application without any backend and server)
Thanks in advance.

How to get the URI scheme of any app for AppLinks/universal linking?

I need to open a third-party app from my react native mobile app. I understand that this is called universal linking on iOS and AppLink on Android.
I have done a lot of research for this, and I have been able to set up a link to the third party app on the app store. Now I just need to get my app to open up the app if the user has it installed. That requires the URI scheme of the other app, though.
My question is, how do I get the URI scheme to this third party app? Rather, how do I get the URI scheme of any app? I know the URI scheme of the twitter app is 'twitter://app', but the app I am trying to link to is way more niche than twitter or other popular apps, so there is no help for this sort of thing online.
Any tips?
Finding the URL scheme of an iOS app
Due to Apple's tendency for secrecy, it's not easy to find the URL scheme of an iOS app. But it can be done. Here's how I do it, using a Mac app called iMazing.
Launch iMazing, select a connected iOS device, click Apps:
In the footer of the window, click Manage Apps:
Select the app you're interested in , then select Export .IPA menu item. Note: You may need to download the app first.
The saved file will have the .ipa extension. Change the extension to .zip, and unzip the file. You now have a directory with the name matching the app's name.
Assuming "asana" is the app name, open the file "asana/Payload/asana.app/Info.plist" in a text editor, and search for a section that contains "CFBundleURLSchemes". Assuming the app contains CFBundleURLSchemes (they are optional), it should look something like this:
The URL scheme is in the <string>asana</string>, so the complete url scheme in this case is "asana://". Test that the URL launches the app by typing it into iOS Safari browser window. If it works, Safari should display an alert like this:
What About Apps Without CFBundleURLSchemes?
I haven't found a way to launch apps without CFBundleURLSchemes directly, but you can link to the app's page in the App Store, where the user can open the app with the Open button (or Get button if the app is not installed).
You will need to obtain the app page's URL from the App Store:
Open App Store, go to the app's page, click the share icon:
Click Copy Link:
The URL will look like this:
https://apps.apple.com/us/app/asana-organize-tasks-work/id489969512
Clicking on that link in Safari will bring up the app page in the App Store.
Maybe it is worth to start with some background:
There are various ways to deep link into an app, and it depends on the platform (iOS\Android\WindowsPhone...) and its version.
On iOS, up until version 9, the way to open an app was by using URI schemes, e.g. the one you added above: twitter://app. Each app declares the scheme that should be used. Therefore in order to deep link into the app you wish to open, you'll need to use the scheme that it declared. This is the same for Android until version 6.
Starting iOS9+, Apple introduced Universal Links as the method for deep linking. Here's some information: https://developer.apple.com/ios/universal-links/
In these versions, URI schemes won't longer work when using Safari browser (which is the iOS default browser) if the app is not installed. If the app is installed, however, URI schemes should allow opening the app, if everything is configured successfully. In Android there's a similar method called "AppLinks".
Having said this, the above information is for setting deep link for your app. I do not think that it is a common use case to open a third party app from your app - deep links are configured and used by the app owner (e.g. for publishing his\her app to engage users).

How can i get parameters from play store download link

I am currently developing a mobile app with react-native and this app contain a invitation code.
Store download link will have a invitation code parameter.
I want to get this parameter from downloaded apps via store download link.
How can i do this on react-native ?
Thanks in advance
Use Firebase Dynamic Links
Firebase Invites makes it simple for users to send content to their friends, over both SMS and email, by ensuring that referral codes, recipe entries, or other shared content gets passed along with the invitation—no cutting-and-pasting required.
Documentation https://firebase.google.com/docs/dynamic-links/
How does it work?
You create a Dynamic Link either by using the Firebase console, using a REST API, iOS or Android Builder API, or by forming a URL by adding Dynamic Link parameters to a domain specific to your app. These parameters specify the links you want to open, depending on the user's platform and whether your app is installed.
When a user opens one of your Dynamic Links, if your app isn't yet installed, the user is sent to the Play Store / App Store to install your app (unless you specify otherwise), and your app will open. You can then retrieve the link that was passed to your app and handle the deep link as appropriate for your app.
For react-native use react-native-firebase https://www.npmjs.com/package/react-native-firebase
and
https://rnfirebase.io/docs/v5.x.x/links/reference/links

objective-c method to open an app already installed

I've created an iPhone app in objective-c with Xcode 5. It's a simple redirect to an app on AppStore via button (UIbutton and its IBAction). Can I open directly this app if it's already installed on iOS? Because in spite of this app is already available on iPhone it's carry on to open it via AppStore!
If it is your app, or you know it well and it has a custom url scheme, you may use Application::canOpenUrl: (link) to check for its existence and Application::openUrl: to launch the application.
This will not be possible for third party applications that do not have, or of which you don't know a custom url scheme.
you need to use URL schemes, a method for sending and receiving data between applications.
A physical device is required for testing this app.look at this example .sample example
try this example . if you face any issue let me know about that.
Yeah! Problem solved...I had to use only URL Scheme of the App I want to open, and insert inside openurl method, -> https://stackoverflow.com/a/24033837/3706995

Adding a Sandboxed app to Login Items

I have read through many questions here about launching my app on login. I have followed this awesome tutorial suggested many times. That tutorial does work. BUT...
The one side affect that comes from using a helper app and registering it using SMLoginItemSetEnabled is that my app does not show up inside the user's Login Items in System Preferences.
There are several apps in the App Store (such as PopClip and Dash) that do what I am trying to do. I just can't figure out how...
UPDATE: I found out from the Dash developer that Dash is actually not sandboxed. He also believes that PopClip is not either. This could explain things... https://alpha.app.net/kapeli/post/3975968
UPDATE #2: I just got confirmation from the PopClip dev that it indeed is not sandboxed as well. https://twitter.com/pilotmoon/status/313746294361427968
With the last 2 updates, I guess the answer is clear. As of today, there is no way to accomplish this with Sandboxed apps.
Hope it's not too late.
In Apple's "Daemons and Services Programming Guide":
Adding Login Items
There are two ways to add a login item: using the Service Management framework, and using a shared file list.
Login items installed using the Service Management framework are not visible in System Preferences and can only be removed by the application that installed them.
Login items installed using a shared file list are visible in System Preferences; users have direct control over them. If you use this API, your login item can be disabled by the user, so any other application that communicates with it it should have reasonable fallback behavior in case the login item is disabled.
In sandboxed environment, only Helper applications can be installed in login items. You need to create one, stored in the Contents/Library/LoginItems folder of the main application.
Then you can used SMLoginItemSetEnabled to set the helper as login item and ask the login item to start the main application.