UIActivityViewController for Facebook, Twitter and Instangram ONLYiOS 6 sharing like Messages, not like Photos (UIActivityViewController and UIDocumentInteractionController)UIActivityViewController, activities not being completed, sharing options not loadingUIActivityViewController crashing on iOS 8 iPadsLimiting UIActivityViewController share extension activitiesIs there maximum file or image size for twitter or Facebook via UIActivityViewController?Sharing image using UIActivityViewControllerUIActivityViewController and facebook/twitterHave UIActivityItemProvider return multiple objects or nothing?How to save a PDF file created in my app to iBooks with UIActivityViewController?Sharing image from camera roll with Instagram, Facebook

My manager quit. Should I agree to defer wage increase to accommodate budget concerns?

Hiking with a mule or two?

Which place in our solar system is the most fit for terraforming?

A food item only made possible by time-freezing storage?

Guitar tuning (EADGBE), "perfect" fourths?

Does wetting a beer glass change the foam characteristics?

I reverse the source code, you negate the input!

Going to France with limited French for a day

On the meaning of 'anyways' in "What Exactly Is a Quartz Crystal, Anyways?"

Would there theoretically be an accompanying effect to something moving beyond the speed of light?

Do we have any particular tonal center in mind when we are NOT listening music?

Is it more effective to add yeast before or after kneading?

Do multiple shower heads require multiple shower valves?

Can Northern Ireland's border issue be solved by repartition?

Should the average user with no special access rights be worried about SMS-based 2FA being theoretically interceptable?

What is the meaning of word 'crack' in chapter 33 of A Game of Thrones?

Can a broken/split chain be reassembled?

Ruby language curious integer arithmetic : (-5/2) != -(5/2)

How can this Stack Exchange site have an animated favicon?

Hilbert's hotel: why can't I repeat it infinitely many times?

Organisational search option

What is the need of methods like GET and POST in the HTTP protocol?

What is the difference between an astronaut in the ISS and a freediver in perfect neutral buoyancy?

Is it true that, "just ten trading days represent 63 per cent of the returns of the past 50 years"?



UIActivityViewController for Facebook, Twitter and Instangram ONLY


iOS 6 sharing like Messages, not like Photos (UIActivityViewController and UIDocumentInteractionController)UIActivityViewController, activities not being completed, sharing options not loadingUIActivityViewController crashing on iOS 8 iPadsLimiting UIActivityViewController share extension activitiesIs there maximum file or image size for twitter or Facebook via UIActivityViewController?Sharing image using UIActivityViewControllerUIActivityViewController and facebook/twitterHave UIActivityItemProvider return multiple objects or nothing?How to save a PDF file created in my app to iBooks with UIActivityViewController?Sharing image from camera roll with Instagram, Facebook






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I am trying to get a UIActivityViewController for presenting only the options for Facebook, Twitter and Instagram. So far I have done:



 let shareText = "Hello, world!"

let image = UIImage(named: "TheImage")
let activityViewController = UIActivityViewController(activityItems: [shareText,image], applicationActivities: nil)
activityViewController.excludedActivityTypes = [UIActivityType.addToReadingList,
UIActivityType.airDrop,
UIActivityType.assignToContact,
UIActivityType.copyToPasteboard,
UIActivityType.mail,
UIActivityType.message,
UIActivityType.openInIBooks,
UIActivityType.print,
UIActivityType.saveToCameraRoll
]
present(activityViewController, animated: true, completion: )


But the UIActivityViewController is still giving me unwanted options.



I also thought to get and approach with NSExtensionItem but I am not sure about it.



Thank you










share|improve this question
































    1















    I am trying to get a UIActivityViewController for presenting only the options for Facebook, Twitter and Instagram. So far I have done:



     let shareText = "Hello, world!"

    let image = UIImage(named: "TheImage")
    let activityViewController = UIActivityViewController(activityItems: [shareText,image], applicationActivities: nil)
    activityViewController.excludedActivityTypes = [UIActivityType.addToReadingList,
    UIActivityType.airDrop,
    UIActivityType.assignToContact,
    UIActivityType.copyToPasteboard,
    UIActivityType.mail,
    UIActivityType.message,
    UIActivityType.openInIBooks,
    UIActivityType.print,
    UIActivityType.saveToCameraRoll
    ]
    present(activityViewController, animated: true, completion: )


    But the UIActivityViewController is still giving me unwanted options.



    I also thought to get and approach with NSExtensionItem but I am not sure about it.



    Thank you










    share|improve this question




























      1












      1








      1








      I am trying to get a UIActivityViewController for presenting only the options for Facebook, Twitter and Instagram. So far I have done:



       let shareText = "Hello, world!"

      let image = UIImage(named: "TheImage")
      let activityViewController = UIActivityViewController(activityItems: [shareText,image], applicationActivities: nil)
      activityViewController.excludedActivityTypes = [UIActivityType.addToReadingList,
      UIActivityType.airDrop,
      UIActivityType.assignToContact,
      UIActivityType.copyToPasteboard,
      UIActivityType.mail,
      UIActivityType.message,
      UIActivityType.openInIBooks,
      UIActivityType.print,
      UIActivityType.saveToCameraRoll
      ]
      present(activityViewController, animated: true, completion: )


      But the UIActivityViewController is still giving me unwanted options.



      I also thought to get and approach with NSExtensionItem but I am not sure about it.



      Thank you










      share|improve this question
















      I am trying to get a UIActivityViewController for presenting only the options for Facebook, Twitter and Instagram. So far I have done:



       let shareText = "Hello, world!"

      let image = UIImage(named: "TheImage")
      let activityViewController = UIActivityViewController(activityItems: [shareText,image], applicationActivities: nil)
      activityViewController.excludedActivityTypes = [UIActivityType.addToReadingList,
      UIActivityType.airDrop,
      UIActivityType.assignToContact,
      UIActivityType.copyToPasteboard,
      UIActivityType.mail,
      UIActivityType.message,
      UIActivityType.openInIBooks,
      UIActivityType.print,
      UIActivityType.saveToCameraRoll
      ]
      present(activityViewController, animated: true, completion: )


      But the UIActivityViewController is still giving me unwanted options.



      I also thought to get and approach with NSExtensionItem but I am not sure about it.



      Thank you







      ios swift uiactivityviewcontroller






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 20 '18 at 11:07









      ayaio

      61.3k20 gold badges138 silver badges202 bronze badges




      61.3k20 gold badges138 silver badges202 bronze badges










      asked Mar 20 '18 at 11:04









      Reimond HillReimond Hill

      8669 silver badges22 bronze badges




      8669 silver badges22 bronze badges

























          3 Answers
          3






          active

          oldest

          votes


















          2
















          There are option available for Facebook and Twitter, You need to just add excludedActivityTypes. You have missing it.



          Instagram option still not available in activity types



          let image = UIImage(named: "TheImage")
          let activityViewController = UIActivityViewController(activityItems: [shareText,image], applicationActivities: nil)

          activityViewController.excludedActivityTypes = [.addToReadingList,
          .airDrop,
          .assignToContact,
          .copyToPasteboard,
          .mail,
          .message,
          .openInIBooks,
          .print,
          .saveToCameraRoll,
          .postToWeibo,
          .copyToPasteboard,
          .saveToCameraRoll,
          .postToFlickr,
          .postToVimeo,
          .postToTencentWeibo,
          .markupAsPDF
          ]

          present(activityViewController, animated: true, completion: )


          I hope this will help you.



          There are following list of Activity types available.



          extension UIActivityType 


          @available(iOS 6.0, *)
          public static let postToFacebook: UIActivityType

          @available(iOS 6.0, *)
          public static let postToTwitter: UIActivityType

          @available(iOS 6.0, *)
          public static let postToWeibo: UIActivityType // SinaWeibo

          @available(iOS 6.0, *)
          public static let message: UIActivityType

          @available(iOS 6.0, *)
          public static let mail: UIActivityType

          @available(iOS 6.0, *)
          public static let print: UIActivityType

          @available(iOS 6.0, *)
          public static let copyToPasteboard: UIActivityType

          @available(iOS 6.0, *)
          public static let assignToContact: UIActivityType

          @available(iOS 6.0, *)
          public static let saveToCameraRoll: UIActivityType

          @available(iOS 7.0, *)
          public static let addToReadingList: UIActivityType

          @available(iOS 7.0, *)
          public static let postToFlickr: UIActivityType

          @available(iOS 7.0, *)
          public static let postToVimeo: UIActivityType

          @available(iOS 7.0, *)
          public static let postToTencentWeibo: UIActivityType

          @available(iOS 7.0, *)
          public static let airDrop: UIActivityType

          @available(iOS 9.0, *)
          public static let openInIBooks: UIActivityType

          @available(iOS 11.0, *)
          public static let markupAsPDF: UIActivityType






          share|improve this answer






















          • 2





            But by excluding them I do the opposite of what i wanted...

            – Reimond Hill
            Mar 20 '18 at 11:37











          • Also in the extension I get the error "'static var' declaration requires an initializer expression or getter/setter specifier"

            – Reimond Hill
            Mar 20 '18 at 11:39











          • Ohhh, yeah. Sorry.. My misunderstanding I will update answer.

            – Sagar Chauhan
            Mar 20 '18 at 11:49











          • @ReimondHill, Please check now. I have updated my answer

            – Sagar Chauhan
            Mar 20 '18 at 11:55



















          1
















          Apple provides support for some of the default UIActivityTypes that includes both Facebook and Twitter as required by you.



          You can get a complete list of UIActivityTypes here: https://developer.apple.com/documentation/uikit/uiactivitytype



          By default, all the UIActivityTypes appear in the UIActivityController. The activities you don't want to appear in the UIActivityController an be added in the exclude list, i.e



          activityViewController.excludedActivityTypes = [.postToFlickr, .postToVimeo]


          Also, whenever an App that includes a Share App Extension is installed on the device, it is also added to the UIActivityController.



          Example:



          WhatsApp. Whenever you install WhatsApp on your device, it will appear as a Share App Extension in the UIActivityController.
          You cannot remove them but can only hide them from the UIActivityController's More option.



          Let me know if you still face any issues.






          share|improve this answer
































            1
















            As of now (march 2019), Instagram share option will only appear if you set an image and only that image on the activityItems. If you add a TEXT or URL object there as well the Instagram option will not show up.



            Twitter, on the otehr hand would accept a TEXT and an IMAGE, but if you pass an URL too it will not show up as an option as well






            share|improve this answer



























              Your Answer






              StackExchange.ifUsing("editor", function ()
              StackExchange.using("externalEditor", function ()
              StackExchange.using("snippets", function ()
              StackExchange.snippets.init();
              );
              );
              , "code-snippets");

              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "1"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader:
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              ,
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );














              draft saved

              draft discarded
















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f49382561%2fuiactivityviewcontroller-for-facebook-twitter-and-instangram-only%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              2
















              There are option available for Facebook and Twitter, You need to just add excludedActivityTypes. You have missing it.



              Instagram option still not available in activity types



              let image = UIImage(named: "TheImage")
              let activityViewController = UIActivityViewController(activityItems: [shareText,image], applicationActivities: nil)

              activityViewController.excludedActivityTypes = [.addToReadingList,
              .airDrop,
              .assignToContact,
              .copyToPasteboard,
              .mail,
              .message,
              .openInIBooks,
              .print,
              .saveToCameraRoll,
              .postToWeibo,
              .copyToPasteboard,
              .saveToCameraRoll,
              .postToFlickr,
              .postToVimeo,
              .postToTencentWeibo,
              .markupAsPDF
              ]

              present(activityViewController, animated: true, completion: )


              I hope this will help you.



              There are following list of Activity types available.



              extension UIActivityType 


              @available(iOS 6.0, *)
              public static let postToFacebook: UIActivityType

              @available(iOS 6.0, *)
              public static let postToTwitter: UIActivityType

              @available(iOS 6.0, *)
              public static let postToWeibo: UIActivityType // SinaWeibo

              @available(iOS 6.0, *)
              public static let message: UIActivityType

              @available(iOS 6.0, *)
              public static let mail: UIActivityType

              @available(iOS 6.0, *)
              public static let print: UIActivityType

              @available(iOS 6.0, *)
              public static let copyToPasteboard: UIActivityType

              @available(iOS 6.0, *)
              public static let assignToContact: UIActivityType

              @available(iOS 6.0, *)
              public static let saveToCameraRoll: UIActivityType

              @available(iOS 7.0, *)
              public static let addToReadingList: UIActivityType

              @available(iOS 7.0, *)
              public static let postToFlickr: UIActivityType

              @available(iOS 7.0, *)
              public static let postToVimeo: UIActivityType

              @available(iOS 7.0, *)
              public static let postToTencentWeibo: UIActivityType

              @available(iOS 7.0, *)
              public static let airDrop: UIActivityType

              @available(iOS 9.0, *)
              public static let openInIBooks: UIActivityType

              @available(iOS 11.0, *)
              public static let markupAsPDF: UIActivityType






              share|improve this answer






















              • 2





                But by excluding them I do the opposite of what i wanted...

                – Reimond Hill
                Mar 20 '18 at 11:37











              • Also in the extension I get the error "'static var' declaration requires an initializer expression or getter/setter specifier"

                – Reimond Hill
                Mar 20 '18 at 11:39











              • Ohhh, yeah. Sorry.. My misunderstanding I will update answer.

                – Sagar Chauhan
                Mar 20 '18 at 11:49











              • @ReimondHill, Please check now. I have updated my answer

                – Sagar Chauhan
                Mar 20 '18 at 11:55
















              2
















              There are option available for Facebook and Twitter, You need to just add excludedActivityTypes. You have missing it.



              Instagram option still not available in activity types



              let image = UIImage(named: "TheImage")
              let activityViewController = UIActivityViewController(activityItems: [shareText,image], applicationActivities: nil)

              activityViewController.excludedActivityTypes = [.addToReadingList,
              .airDrop,
              .assignToContact,
              .copyToPasteboard,
              .mail,
              .message,
              .openInIBooks,
              .print,
              .saveToCameraRoll,
              .postToWeibo,
              .copyToPasteboard,
              .saveToCameraRoll,
              .postToFlickr,
              .postToVimeo,
              .postToTencentWeibo,
              .markupAsPDF
              ]

              present(activityViewController, animated: true, completion: )


              I hope this will help you.



              There are following list of Activity types available.



              extension UIActivityType 


              @available(iOS 6.0, *)
              public static let postToFacebook: UIActivityType

              @available(iOS 6.0, *)
              public static let postToTwitter: UIActivityType

              @available(iOS 6.0, *)
              public static let postToWeibo: UIActivityType // SinaWeibo

              @available(iOS 6.0, *)
              public static let message: UIActivityType

              @available(iOS 6.0, *)
              public static let mail: UIActivityType

              @available(iOS 6.0, *)
              public static let print: UIActivityType

              @available(iOS 6.0, *)
              public static let copyToPasteboard: UIActivityType

              @available(iOS 6.0, *)
              public static let assignToContact: UIActivityType

              @available(iOS 6.0, *)
              public static let saveToCameraRoll: UIActivityType

              @available(iOS 7.0, *)
              public static let addToReadingList: UIActivityType

              @available(iOS 7.0, *)
              public static let postToFlickr: UIActivityType

              @available(iOS 7.0, *)
              public static let postToVimeo: UIActivityType

              @available(iOS 7.0, *)
              public static let postToTencentWeibo: UIActivityType

              @available(iOS 7.0, *)
              public static let airDrop: UIActivityType

              @available(iOS 9.0, *)
              public static let openInIBooks: UIActivityType

              @available(iOS 11.0, *)
              public static let markupAsPDF: UIActivityType






              share|improve this answer






















              • 2





                But by excluding them I do the opposite of what i wanted...

                – Reimond Hill
                Mar 20 '18 at 11:37











              • Also in the extension I get the error "'static var' declaration requires an initializer expression or getter/setter specifier"

                – Reimond Hill
                Mar 20 '18 at 11:39











              • Ohhh, yeah. Sorry.. My misunderstanding I will update answer.

                – Sagar Chauhan
                Mar 20 '18 at 11:49











              • @ReimondHill, Please check now. I have updated my answer

                – Sagar Chauhan
                Mar 20 '18 at 11:55














              2














              2










              2









              There are option available for Facebook and Twitter, You need to just add excludedActivityTypes. You have missing it.



              Instagram option still not available in activity types



              let image = UIImage(named: "TheImage")
              let activityViewController = UIActivityViewController(activityItems: [shareText,image], applicationActivities: nil)

              activityViewController.excludedActivityTypes = [.addToReadingList,
              .airDrop,
              .assignToContact,
              .copyToPasteboard,
              .mail,
              .message,
              .openInIBooks,
              .print,
              .saveToCameraRoll,
              .postToWeibo,
              .copyToPasteboard,
              .saveToCameraRoll,
              .postToFlickr,
              .postToVimeo,
              .postToTencentWeibo,
              .markupAsPDF
              ]

              present(activityViewController, animated: true, completion: )


              I hope this will help you.



              There are following list of Activity types available.



              extension UIActivityType 


              @available(iOS 6.0, *)
              public static let postToFacebook: UIActivityType

              @available(iOS 6.0, *)
              public static let postToTwitter: UIActivityType

              @available(iOS 6.0, *)
              public static let postToWeibo: UIActivityType // SinaWeibo

              @available(iOS 6.0, *)
              public static let message: UIActivityType

              @available(iOS 6.0, *)
              public static let mail: UIActivityType

              @available(iOS 6.0, *)
              public static let print: UIActivityType

              @available(iOS 6.0, *)
              public static let copyToPasteboard: UIActivityType

              @available(iOS 6.0, *)
              public static let assignToContact: UIActivityType

              @available(iOS 6.0, *)
              public static let saveToCameraRoll: UIActivityType

              @available(iOS 7.0, *)
              public static let addToReadingList: UIActivityType

              @available(iOS 7.0, *)
              public static let postToFlickr: UIActivityType

              @available(iOS 7.0, *)
              public static let postToVimeo: UIActivityType

              @available(iOS 7.0, *)
              public static let postToTencentWeibo: UIActivityType

              @available(iOS 7.0, *)
              public static let airDrop: UIActivityType

              @available(iOS 9.0, *)
              public static let openInIBooks: UIActivityType

              @available(iOS 11.0, *)
              public static let markupAsPDF: UIActivityType






              share|improve this answer















              There are option available for Facebook and Twitter, You need to just add excludedActivityTypes. You have missing it.



              Instagram option still not available in activity types



              let image = UIImage(named: "TheImage")
              let activityViewController = UIActivityViewController(activityItems: [shareText,image], applicationActivities: nil)

              activityViewController.excludedActivityTypes = [.addToReadingList,
              .airDrop,
              .assignToContact,
              .copyToPasteboard,
              .mail,
              .message,
              .openInIBooks,
              .print,
              .saveToCameraRoll,
              .postToWeibo,
              .copyToPasteboard,
              .saveToCameraRoll,
              .postToFlickr,
              .postToVimeo,
              .postToTencentWeibo,
              .markupAsPDF
              ]

              present(activityViewController, animated: true, completion: )


              I hope this will help you.



              There are following list of Activity types available.



              extension UIActivityType 


              @available(iOS 6.0, *)
              public static let postToFacebook: UIActivityType

              @available(iOS 6.0, *)
              public static let postToTwitter: UIActivityType

              @available(iOS 6.0, *)
              public static let postToWeibo: UIActivityType // SinaWeibo

              @available(iOS 6.0, *)
              public static let message: UIActivityType

              @available(iOS 6.0, *)
              public static let mail: UIActivityType

              @available(iOS 6.0, *)
              public static let print: UIActivityType

              @available(iOS 6.0, *)
              public static let copyToPasteboard: UIActivityType

              @available(iOS 6.0, *)
              public static let assignToContact: UIActivityType

              @available(iOS 6.0, *)
              public static let saveToCameraRoll: UIActivityType

              @available(iOS 7.0, *)
              public static let addToReadingList: UIActivityType

              @available(iOS 7.0, *)
              public static let postToFlickr: UIActivityType

              @available(iOS 7.0, *)
              public static let postToVimeo: UIActivityType

              @available(iOS 7.0, *)
              public static let postToTencentWeibo: UIActivityType

              @available(iOS 7.0, *)
              public static let airDrop: UIActivityType

              @available(iOS 9.0, *)
              public static let openInIBooks: UIActivityType

              @available(iOS 11.0, *)
              public static let markupAsPDF: UIActivityType







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Mar 20 '18 at 11:55

























              answered Mar 20 '18 at 11:14









              Sagar ChauhanSagar Chauhan

              3,5132 gold badges11 silver badges42 bronze badges




              3,5132 gold badges11 silver badges42 bronze badges










              • 2





                But by excluding them I do the opposite of what i wanted...

                – Reimond Hill
                Mar 20 '18 at 11:37











              • Also in the extension I get the error "'static var' declaration requires an initializer expression or getter/setter specifier"

                – Reimond Hill
                Mar 20 '18 at 11:39











              • Ohhh, yeah. Sorry.. My misunderstanding I will update answer.

                – Sagar Chauhan
                Mar 20 '18 at 11:49











              • @ReimondHill, Please check now. I have updated my answer

                – Sagar Chauhan
                Mar 20 '18 at 11:55













              • 2





                But by excluding them I do the opposite of what i wanted...

                – Reimond Hill
                Mar 20 '18 at 11:37











              • Also in the extension I get the error "'static var' declaration requires an initializer expression or getter/setter specifier"

                – Reimond Hill
                Mar 20 '18 at 11:39











              • Ohhh, yeah. Sorry.. My misunderstanding I will update answer.

                – Sagar Chauhan
                Mar 20 '18 at 11:49











              • @ReimondHill, Please check now. I have updated my answer

                – Sagar Chauhan
                Mar 20 '18 at 11:55








              2




              2





              But by excluding them I do the opposite of what i wanted...

              – Reimond Hill
              Mar 20 '18 at 11:37





              But by excluding them I do the opposite of what i wanted...

              – Reimond Hill
              Mar 20 '18 at 11:37













              Also in the extension I get the error "'static var' declaration requires an initializer expression or getter/setter specifier"

              – Reimond Hill
              Mar 20 '18 at 11:39





              Also in the extension I get the error "'static var' declaration requires an initializer expression or getter/setter specifier"

              – Reimond Hill
              Mar 20 '18 at 11:39













              Ohhh, yeah. Sorry.. My misunderstanding I will update answer.

              – Sagar Chauhan
              Mar 20 '18 at 11:49





              Ohhh, yeah. Sorry.. My misunderstanding I will update answer.

              – Sagar Chauhan
              Mar 20 '18 at 11:49













              @ReimondHill, Please check now. I have updated my answer

              – Sagar Chauhan
              Mar 20 '18 at 11:55






              @ReimondHill, Please check now. I have updated my answer

              – Sagar Chauhan
              Mar 20 '18 at 11:55














              1
















              Apple provides support for some of the default UIActivityTypes that includes both Facebook and Twitter as required by you.



              You can get a complete list of UIActivityTypes here: https://developer.apple.com/documentation/uikit/uiactivitytype



              By default, all the UIActivityTypes appear in the UIActivityController. The activities you don't want to appear in the UIActivityController an be added in the exclude list, i.e



              activityViewController.excludedActivityTypes = [.postToFlickr, .postToVimeo]


              Also, whenever an App that includes a Share App Extension is installed on the device, it is also added to the UIActivityController.



              Example:



              WhatsApp. Whenever you install WhatsApp on your device, it will appear as a Share App Extension in the UIActivityController.
              You cannot remove them but can only hide them from the UIActivityController's More option.



              Let me know if you still face any issues.






              share|improve this answer





























                1
















                Apple provides support for some of the default UIActivityTypes that includes both Facebook and Twitter as required by you.



                You can get a complete list of UIActivityTypes here: https://developer.apple.com/documentation/uikit/uiactivitytype



                By default, all the UIActivityTypes appear in the UIActivityController. The activities you don't want to appear in the UIActivityController an be added in the exclude list, i.e



                activityViewController.excludedActivityTypes = [.postToFlickr, .postToVimeo]


                Also, whenever an App that includes a Share App Extension is installed on the device, it is also added to the UIActivityController.



                Example:



                WhatsApp. Whenever you install WhatsApp on your device, it will appear as a Share App Extension in the UIActivityController.
                You cannot remove them but can only hide them from the UIActivityController's More option.



                Let me know if you still face any issues.






                share|improve this answer



























                  1














                  1










                  1









                  Apple provides support for some of the default UIActivityTypes that includes both Facebook and Twitter as required by you.



                  You can get a complete list of UIActivityTypes here: https://developer.apple.com/documentation/uikit/uiactivitytype



                  By default, all the UIActivityTypes appear in the UIActivityController. The activities you don't want to appear in the UIActivityController an be added in the exclude list, i.e



                  activityViewController.excludedActivityTypes = [.postToFlickr, .postToVimeo]


                  Also, whenever an App that includes a Share App Extension is installed on the device, it is also added to the UIActivityController.



                  Example:



                  WhatsApp. Whenever you install WhatsApp on your device, it will appear as a Share App Extension in the UIActivityController.
                  You cannot remove them but can only hide them from the UIActivityController's More option.



                  Let me know if you still face any issues.






                  share|improve this answer













                  Apple provides support for some of the default UIActivityTypes that includes both Facebook and Twitter as required by you.



                  You can get a complete list of UIActivityTypes here: https://developer.apple.com/documentation/uikit/uiactivitytype



                  By default, all the UIActivityTypes appear in the UIActivityController. The activities you don't want to appear in the UIActivityController an be added in the exclude list, i.e



                  activityViewController.excludedActivityTypes = [.postToFlickr, .postToVimeo]


                  Also, whenever an App that includes a Share App Extension is installed on the device, it is also added to the UIActivityController.



                  Example:



                  WhatsApp. Whenever you install WhatsApp on your device, it will appear as a Share App Extension in the UIActivityController.
                  You cannot remove them but can only hide them from the UIActivityController's More option.



                  Let me know if you still face any issues.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 20 '18 at 12:05









                  PGDevPGDev

                  12.7k2 gold badges18 silver badges54 bronze badges




                  12.7k2 gold badges18 silver badges54 bronze badges
























                      1
















                      As of now (march 2019), Instagram share option will only appear if you set an image and only that image on the activityItems. If you add a TEXT or URL object there as well the Instagram option will not show up.



                      Twitter, on the otehr hand would accept a TEXT and an IMAGE, but if you pass an URL too it will not show up as an option as well






                      share|improve this answer





























                        1
















                        As of now (march 2019), Instagram share option will only appear if you set an image and only that image on the activityItems. If you add a TEXT or URL object there as well the Instagram option will not show up.



                        Twitter, on the otehr hand would accept a TEXT and an IMAGE, but if you pass an URL too it will not show up as an option as well






                        share|improve this answer



























                          1














                          1










                          1









                          As of now (march 2019), Instagram share option will only appear if you set an image and only that image on the activityItems. If you add a TEXT or URL object there as well the Instagram option will not show up.



                          Twitter, on the otehr hand would accept a TEXT and an IMAGE, but if you pass an URL too it will not show up as an option as well






                          share|improve this answer













                          As of now (march 2019), Instagram share option will only appear if you set an image and only that image on the activityItems. If you add a TEXT or URL object there as well the Instagram option will not show up.



                          Twitter, on the otehr hand would accept a TEXT and an IMAGE, but if you pass an URL too it will not show up as an option as well







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Mar 28 at 16:38









                          rickrvorickrvo

                          3061 silver badge13 bronze badges




                          3061 silver badge13 bronze badges































                              draft saved

                              draft discarded















































                              Thanks for contributing an answer to Stack Overflow!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid


                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.

                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f49382561%2fuiactivityviewcontroller-for-facebook-twitter-and-instangram-only%23new-answer', 'question_page');

                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                              Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

                              Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript