iOS share extension
#1
I was wondering is anyone has thought / is possible to implement iOS share extension?

Reason why I think this would be useful:

1) Current I have a jailbrokenu iPad and use the camera kit to store films on sd card which traveling (and not on home network to stream them). This works fine on a jailbroken device as you can access the mnt folder. On a non-jailbroken device (side loaded via Xcode) this is not possible due to sandbox.

2) there are lots of third part usb/lightning sticks providing additional storage for idevices but these all use companion apps to access the files and copy/shares these with other apps

If kodi supported the sharing extension then from a companion app you could select a file on the external storage and pass a reference to kodi to play it.

What do people think? Is it possible to pass a file when launching kodi for it to play?
Reply
#2
It shouldn't be too difficult to add...

It seems that with proper plist modifications it would just copy anything to the Documents/Inbox folder inside the sandbox when you "Open In"

I'll see if I can figure it out
Install Kodi on iOS without a jailbreak: iOS App Signer — donations are gratefully accepted
Reply
#3
Hi Dan,

Does the share actually do a copy vs providing a pointer to the file? I think there are two different extensions.

The reason I was hoping to not have the copy version is I have little space internal storage left (though keeping a gig or so free should be doable).

Obviously either would be appreciated Smile
Reply
#4
I'm fairly certain that all apps who use "open in..." in iOS are doing a full copy. I don't think apps can look at each other's file space.
Reply
#5
Damn it I can't find the link I saw yesterday. Maybe I got confused with containers which still, it appears, do a full copy into the container then multiple apps can access (and modify) that containers copy.

With this being the case, registering kodi against all the file extensions it supports (I image the list is actually rather large) then 'open with' will copy the file into kodi'a sandbox.

Can kodi be started with a --play-this-file type switch (or even if that concept exists in iOS)?
Reply
#6
iOS has a few different ways of sharing files

Open In: This puts a copy of the file in the Kodi sandbox and opens Kodi
Action Extension (to quote apple): An Action extension helps users view or transform content originating in a host app.
Document Picker: This would let Kodi open a file from other document provider apps

What you're talking about is an action extension which SHOULD be possible with Kodi but I personally don't know where you would even begin with that...

I'm assuming it would be much easier to implement the document picker method though, my thought on this would be to add a menu item under videos that opens the document picker and lets Kodi play that file directly.

Obviously the only method that would allow Kodi to add a file to the database would be the "Open In" method since that makes a copy of the file...

I don't think any official Apple API can replicate the type of functionality a jailbroken device with the camera connection kit can get though... (so no adding the files directly to the Kodi database)

Of course the file not getting copied to the device would be dependent on the app for the storage... (the app may copy the file off the storage to use in apps)

The relevant Apple documentation on the document picker can be found here
Install Kodi on iOS without a jailbreak: iOS App Signer — donations are gratefully accepted
Reply
#7
and im guessing that the picker will only be able to pick from files in other apps inbox (e.g. on device storage), which wouldnt be the case with a lightning port stick/companion app.

I think for kodi (or any other app) to access the files on the stick then they must be copied locally, either inside the companion app and then picked, or open with and copied into kodi's sandbox. what i dont know (and i dont expect anyone other than the companion app writing to know) is whether open with from them app has to copy it into their sandbox before it can be copied into kodi's
Reply

Logout Mark Read Team Forum Stats Members Help
iOS share extension0