Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Commit

Permalink
read custom group ID in SwiftReceiveSharingIntentPlugin.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
xal committed Jun 17, 2021
1 parent 779e511 commit aee4b7c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ios/Classes/SwiftReceiveSharingIntentPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ public class SwiftReceiveSharingIntentPlugin: NSObject, FlutterPlugin, FlutterSt
private func handleUrl(url: URL?, setInitialData: Bool) -> Bool {
if let url = url {
let appDomain = Bundle.main.bundleIdentifier!
let userDefaults = UserDefaults(suiteName: "group.\(appDomain)")
let appGroupId = (Bundle.main.object(forInfoDictionaryKey: "AppGroupId") as? String) ?? "group.\(Bundle.main.bundleIdentifier!)"
let userDefaults = UserDefaults(suiteName: appGroupId)
if url.fragment == "media" {
if let key = url.host?.components(separatedBy: "=").last,
let json = userDefaults?.object(forKey: key) as? Data {
Expand Down

0 comments on commit aee4b7c

Please sign in to comment.