Open Container App from Share Extenion - ios

So I've found that the you cannot open URLs (and therefore deeplinks) from Share Extensions in iOS. But I'm wondering if there is any way to open the container app of the extension.
For instance, in my app the share extension will only work if you are logged in, so if you tap the extension it will present an alert view telling you so. But I want a button on that alert view to bring you into the container app to make it easier to log in.
Hope this makes sense and thanks in advance!

No, Apple does not permit this. It's not an accident that you can't open URLs from share extensions. There have been workarounds in some versions of iOS, but Apple has closed them, because they apparently considered them to be bugs. The intended behavior is apparently that a share extension must be able to do whatever it needs to have done without relying on the containing app.

Related

Intent does not appear in Supported Intents

Link to all the code I'm working with so far: https://github.com/banool/respose.
I want to make an app where it is possible for users to activate some intent it defines as an action in response to some event in the iOS shortcuts app. For example:
If I open app X.
Run intent from my app instead.
I've seen this done before in other apps, so I know it's possible.
I have an intent defined (see attached code as well as image) that seems to be correct as far as I can tell. I don't think I need an intent extension because I don't intend to handle the intent in the background or via Siri.
I notice that when I try to add an intent under My Target -> General -> Supported Intents, the dropdown doesn't show my intent, only the built in system intents.
I'm not sure what I'm doing wrong here. I got to this point just by following the official guide from Apple: https://developer.apple.com/documentation/sirikit/adding_user_interactivity_with_siri_shortcuts_and_the_shortcuts_app.
I don't think the fact that I'm using Flutter should matter so much right now (I figure that's more of a concern for when the app actually opens up from the shortcut), but perhaps I'm wrong.
I have registered the app on App Store connect and I'm using an identifier that has the sirikit capability enabled. I've also added the "Siri" capability in XCode. I've tried this on both a simulator and a real device, the results are the same.
Any help would be much appreciated, thanks!
Had the same issue.
It seems that you can just type the class name without prompt, and it should work just fine. Don't forget to select proper target though

Is it possible to handle a file to another App without displaying the Share Screen in IOS?

I've never written any code with Objective-C and I'm as lost as you can be.
My App is in React Native but I couldn't find a way to achieve this so I had to start to search for a solution using Native Code.
What I basically need to do is taking a file I downloaded in my app's sandbox and open it in other app (PowerPoint) without actually showing the Share Screen Modal where the user selects the other App.
I know that when "Sharing" the file is copied into the PowerPoint's folder but I'm not sure if I'm able to do this kind of actions.
I was told to use this -> UIDocumentInteractionController but like I said, I'm not sure if it allows me to do that.
Any suggestion is welcome !
Thanks in advance !

Is it possible to prevent an iOS app from being placed on the home screen?

I am developing an iOS app using Xamarin.iOS that should only be triggered by tapping on a URL. Because of this, I would like to prevent the app icon from being placed on the home screen. The reason is, the app will not function properly if they open it from the home screen (it needs some of the data in the URL to load properly). I would prefer to prevent the app from being on the home screen instead of checking whether a link was tapped or not. I know that is possible to do this in Android using the manifest, is this also possible in iOS?
This is not possible whatsoever; the developer has no control as to the placement and visibility of the application, and as such will always be visible on the springboard/home screen.
The best option you have is to show information to the user that explains why opening it from the home screen will not work, if they launch it that way. Most likely though, this will be rejected from the App Store as having no useful purpose. The guidelines are found here (App Store Guidelines), and I think this is what may cause a rejection (emphasis mine):
If your app is not particularly useful, unique, or “app-like,” it doesn’t belong on the App Store.
I'm not finding the documentation I was looking for, but, as far as I know, this is not possible in iOS.
You could maybe have a default url that the app launches with and then use deep linking to launch the app with a custom urls. There are lots of great tutorials on deep linking (launching your app through a url) like
This one or maybe this one

iOS Today Extension: can this be dynamically enabled and disabled from within my app?

By default, a today extension appears in the extension list for my app as soon as the app is installed.
What I'd like to know is - is there a way, documented or undocumented, that this can extension be enabled or disabled dynamically? By disabled, I mean that it won't even appear in the list of extensions if the user tries to add it.
Hacky answers are OK if necessary, I'd really like to be able to do this.
It doesn't look like it. The exact mechanism for populating that list is not documented, but it appears that if an app bundle contains a valid, properly signed today extension, that extension appears in the user's list.
To make it disappear then, you'd have to somehow rename or move the extension bundle, or break its code signature. That might be possible with a jailbroken device, but otherwise you can't modify the contents of your app bundle at run time.

How can I make my iOS apps talk to each other?

I’ve got several iOS apps and I need them to be aware of each other. More precisely, I need to know whether there’s already one of my apps installed.
I thought about registering a custom URL scheme (something like my-app-present://), so that I could check whether the custom scheme is supported and if yes, I would know there’s already one of my apps on the device. But that doesn’t work, because the schemes are registered through Info.plist and the app registers the scheme before it has a chance to check for its existence. In other words, the check always succeeds.
Then I thought about creating a file in the temporary directory, but NSTemporaryDirectory() returns a folder inside the application sandbox, so that wouldn’t work either. I also thought about keychain, but again it looks like each application has strictly separate keychain on iOS.
I don’t want to go through the list of running apps and I don’t want to use networking. Do you know some other tricks?
The custom URL scheme method sounds fine, as long as you have a different scheme for every app, for example my-app-1:// and my-app-2://. Then (I assume this is what you already knew) you can use canOpenURL: to check if the URL can be handled (i.e., your app is installed).
If by "talk to each other" you meant you just want to detect whether other app has been installed or not then iHasApp is an open source iOS framework could come in handy. I haven't used it yet. but from the description it appears to be a good choice.
http://www.ihasapp.com/documentation/Classes/iHasApp.html

Resources