问题
In my nativescript iOS app, users will create a file, and then share the file via text message with other users. I'm using angular.
I expect that I can use the file system to create and save the file, and then use nativescript-share-file to open up the text message and attach the file.
BUT: how do I enable the recipient to tap on the file in the text message, and have that tap automatically open the app with the file there?
It's that piece I am not sure of: user taps on the file in the text message and this tap 1) opens the app, and 2) the app reads the file.
This is functionality a variety of apps have. For example, if you send someone a youtube video via text, they can tap on the message and have the video open in youtube. Same with sending people podcasts via iOS's podcast app.
How can I enable this in my nativescript iOS app?
EDIT 1: Note that, while sms messages have strict limits, iphone does allow you to attach files by using iMessage or (if iMessage is not available) MMS. So attaching and sending the file should not be a problem.
EDIT 2: the key is: how can I have my app open a file a user receives via text? The best way may be to include my app in iOS's "open in..." option, discussed here. But how do I do that in Nativescript?
来源:https://stackoverflow.com/questions/57775807/open-file-from-text-message-with-nativescript