IOS Keychain across Apps

Source: Internet
Author: User

Keychain can be used to persist some information. Typically, each app has its own Keychain Access. But sometimes you will need to share some information with multiple apps. You need to create Keychain Access Group.

Keychain Access Group needs to be created in the entitlements file. The default value is the appidentifierprefix+ project ID. The former is the prefix of the AppId, and for each developer, this is unique. We changed the project ID to a new group name. In the end it should look like this: $ (appidentifierprefix) newgroupname. This is then set up in each app Keychain Access group so that they belong to the same group and can share the Keychain.

In the code, if you want to save a string, use the setString forkey Service method. Instead, remove the string using the Stringforkey service method. Note that service is important. If the value of the service is not set, it cannot be shared.

IOS Keychain across Apps

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.