.postToWeibo is not working in UIActivityViewController

I am excluding .postToWeibo but still I can see Weibo in the options. My code is

var activityViewController = UIActivityViewController(activityItems: [documentId+".pdf", pDfdata], applicationActivities: nil)   

activityViewController.excludedActivityTypes = [.postToTwitter, .postToFacebook, .postToFlickr, .postToTencentWeibo, .postToVimeo, .postToWeibo]

present(activityViewController, animated: true)

Can you please let me know what is the reason for this?

You cannot exclude such type.

Apps can only exclude the built-in system activity types (the constants listed in the UIActivity.ActivityType struct), and are not allowed to exclude extension activities that come from other apps.

See details here: https://developer.apple.com/forums/thread/689062.

@Claude31 .postToWeibo is default built-in system activity types. It should be excluded. but this is not happening as expected. Weibo is still visible.

My mistake, sorry. Did you try to exclude another activity, such as Mail, to see if it works ? If so, you should file a bug.

.postToWeibo is not working in UIActivityViewController
 
 
Q