Data Sharing Using AppGroups

Shantaram Kokate
1 min readAug 14, 2020

--

Let’s share strings and images between apps using AppGroups.

Share strings with UserDefaults

UserDefaults(suiteName:)Use the.
For suiteName, set the identifier of AppGroups selected in Capabilities of the project file.

You can share info between apps in the same AppGroup.

Share images with File Manager

FileManager.default.containerURL(forSecurityApplicationGroupIdentifier:)Use the. Again, like
UserDefaults set the identifier of AppGroups selected in the Capabilities of the project file. I tried the code like this.
(The above saveMessage and loadMessage are also used.)

This can also be shared between apps in the same AppGroup.

If you like this post, please share and give claps so others can find it 👏👏

You can follow me on Medium for updated articles. Also, connect with me on LinkedIn, Twitter.

If you have any comments, questions, or recommendations, feel free to post them in the comment section below!👇

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Shantaram Kokate
Shantaram Kokate

No responses yet

Write a response