HomeiOS Developmentios - App Icon just isn't showing whereas sharing publish through firebase...

ios – App Icon just isn’t showing whereas sharing publish through firebase dynamic hyperlink


I efficiently created a Dynamic Hyperlink in Firebase to share posts. Nonetheless, once I share the publish, the app icon just isn’t seen and as a substitute, Firebase’s icon is displayed. All the pieces works high quality apart from this. Are you able to assist me resolve this concern? see picture right here

func sharePostWithDynamicLinking() {
    guard let hyperlink = URL(string: "https://www.instance.com/(displayDataObject?.postId ?? 0)") else { return }
    let dynamicLinksDomainURIPrefix = "https://www.instance.com"
    let linkBuilder = DynamicLinkComponents(hyperlink: hyperlink, domainURIPrefix: dynamicLinksDomainURIPrefix)
    linkBuilder?.iOSParameters = DynamicLinkIOSParameters(bundleID: "") // right here I've talked about my app's Bundle ID
    
    linkBuilder?.iOSParameters?.appStoreID = "" // right here I've talked about my app's appStoreID
    linkBuilder?.iOSParameters?.minimumAppVersion = "1"
        
    linkBuilder?.socialMetaTagParameters = DynamicLinkSocialMetaTagParameters()
    linkBuilder?.socialMetaTagParameters?.title = "Instance of a Dynamic Hyperlink"
    linkBuilder?.socialMetaTagParameters?.descriptionText = "This hyperlink works whether or not the app is put in or not!"
        
    guard let longDynamicLink = linkBuilder?.url else { return }
    print("longDynamicLink --> (longDynamicLink)")
    
    linkBuilder?.shorten { url, warnings, error in
        if let error = error {
            print("Oh no! Received an error! (error)")
            return
        }
        if let warnings = warnings {
            for warning in warnings {
                print("Warning: (warning)")
            }
        }
        guard let url = url else { return }
        print("I've a brief url to share! (url.absoluteString)")
        
        self.shareItem(with: url)
    }
}

// Share dynamic hyperlink
func shareItem(with url: URL) {
    let activityView = UIActivityViewController(activityItems: [url], applicationActivities: nil)
    if let topVC = UIApplication.topViewController() {
        topVC.current(activityView, animated: true, completion: nil)
    }
}

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments