2

I've created a Share extension that will save a file URL to user default. The extension comes with a UI with Post and Cancel button. How can I remove this (the UI) so that when I press my share extension, it will straight away call the didSelectPost?

I'm using Swift 3 and building for iPhone

da32
  • 703
  • 1
  • 9
  • 18
  • Not sure if you really mean Swift 3 as in the 2016 version of swift. Make sure it is compatible with Xcode 14.1 https://developer.apple.com/news/?id=jd9wcyov – lorem ipsum May 16 '23 at 19:27

1 Answers1

1

The template uses a SLComposeServiceViewController. Use a plain view controller instead. The entire interface, including providing a way to dismiss the view controller, will then be up to you.

(However, I can't help wondering whether what you really want might not be an Action extension.)

matt
  • 515,959
  • 87
  • 875
  • 1,141
  • I'm using it to share a file which I have converted into Data before set it in user default for use in my host app. – da32 Sep 29 '17 at 06:18