如何在iOS上找到用于自定义UIActivity的捆绑包标识符或应用捆绑包

时间:2018-10-16 14:24:52

标签: ios swift uikit

我想知道用户将在哪里共享我的应用程序,因此我在complementWithItemsHandler上创建了一些代码,但是UIKit仅提供了某些应用程序,例如fb,twitter,那么Telegram和Line呢?我应该在哪里找到它们?我刚刚找到了whatsapp

activityVC.completionWithItemsHandler = { [weak s] activityType, completed, _, error in
                    guard let ss = s,
                        let activityType = activityType,
                        completed else { return }

                    if error != nil {
                        return
                    }

                    var action: String = ""
                    switch activityType {
                    case .postToFacebook:
                        action = "facebook"
                    case .postToTwitter:
                        action = "twitter"
                    case .message:
                        action = "message"
                    case .mail:
                        action = "mail"
                    case UIActivity.ActivityType(rawValue: "net.whatsapp.WhatsApp.ShareExtension"):
                        action = "whatsapp"
                    default:
                        action = "others"
                    }

1 个答案:

答案 0 :(得分:0)

电报:ph.telegra.Telegraph
行:jp.naver.line

请参考以下链接:
finding-the-app-bundle-id

对于Whatsapp,它是net.whatsapp.WhatsApp
我不知道extension是干什么的