共享keychain数据

  当往keychain中插入数据时,默认的 kSecAttrAccessGroup 就是App自身的BundleID。

官方文档

  You can add a keychain-access-groups entitlement to the application and, in the entitlement property list file, specify an array of keychain access groups to which the application belongs.

  可以在entitlements文件中指定keychain-access-groups属性。此属性下定义了一组字符串标识。

  If you add such a property-list file to the application bundle, then the access group corresponding to the application-identifier entitlement is treated as the last element in the access groups array.

  如果添加了keychain-access-group选项,那原有的app BundleID会被加入到最后一项。

  If you do not include the kSecAttrAccessGroup key in the attributes dictionary when you call the SecItemAdd function to add an item to the keychain, the function uses the first access group in the array by default.

  如果没有指定kSecAttrAccessGroup键,SecItemAdd函数默认使用第一个group值。

  If there is no kSecAttrAccessGroup key in the attributes dictionary and there is no keychain-access-groups entitlement in the application bundle, then the access group of a newly created item is the value of the application-identifier entitlement.

  如果没有指定kSecAttrAccessGroup键,也没有设置keychain-acess-group选项,则使用App BundleID作为kSecAttrAccessGroup的值

【其它要求】

   When you want to create an app that can share keychain access with an existing app you need to make sure that you use the bundle seed ID of the existing app. You do this when you create the new App ID in the iPhone Provisioning Portal. Instead of generating a new value you select the existing value from the list of all your previous bundle seed IDs.

  若要共享keychain数据,两个App的bundle seed id必须相同。

  The keychain access group can be named pretty much anything you want as long as it starts with the bundle seed ID.

  keychain-acess-group必须以同样的bundle seed id开头。

参考:http://useyourloaf.com/blog/2010/04/03/keychain-group-access.html

共享keychain数据的更多相关文章

  1. 采用EaglePHP框架解决分布式集群服务器利用MEMCACHE方式共享SESSION数据的问题

    一.问题起源 稍大一些的网站,通常都会有好几个服务器,每个服务器运行着不同功能的模块,使用不同的二级域名,而一个整体性强的网 站,用户系统是统一的,即一套用户名.密码在整个网站的各个模块中都是可以登录 ...

  2. PHP 实现多服务器共享 SESSION 数据

    PHP 实现多服务器共享 SESSION 数据 2011 年 12 月 05 日评论暂缺 一.问题起源 稍大一些的网站,通常都会有好几个服务器,每个服务器运行着不同功能的模块,使用不同的二级域名,而一 ...

  3. 黄聪:多个wordpress网站(不同域名)共享用户数据的方法

    WordPress可以自定义用户数据表,这样多个wordpress网站就可以共享用户数据了,有时候这是非常方便的,这些Wordpress站点应该安装在同一个数据库下,数据表前缀各不相同.由于Wordp ...

  4. win7下设置挂载Linux服务器nfs共享的数据 -- 转

    最近学习NFS文件系统的使用,Ubuntu上配置好了,想和Win7共享数据,所以网上搜到了这篇文章.借花献佛,跟大家共享一下: http://www.2cto.com/os/201207/139132 ...

  5. Android之 内容提供器(1)——使用内容提供器访问其它程序共享的数据

    (下面内容是阅读郭霖大神的<第一行代码>总结的) 1 概述 内容提供器是Android实现跨程序共享数据的标准方式. 内容提供器的的使用方法有两种, 一是使用已有的内容提供器对其他程序的数 ...

  6. 多域名THINKPHP利用MEMCACHE方式共享SESSION数据(转)

    一.问题起源 稍大一些的网站,通常都会有好几个服务器,每个服务器运行着不同功能的模块,使用不同的二级域名,而一个整体性强的网站,用户系统是统一的,即一套用户名.密码在整个网站的各个模块中都是可以登录使 ...

  7. windows笔记-在可执行文件或DLL的多个实例之间共享静态数据

    全局数据和静态数据不能被同一个. exe或DLL文件的多个映像共享,这是个安全的默认设置.但是,在某些情况下,让一个. exe文件的多个映像共享一个变量的实例是非常有用和方便的. 每个. exe或DL ...

  8. 【Android Developers Training】 31. 序言:共享简单数据

    注:本文翻译自Google官方的Android Developers Training文档,译者技术一般,由于喜爱安卓而产生了翻译的念头,纯属个人兴趣爱好. 原文链接:http://developer ...

  9. android中共享全局数据的方法

    转自:http://blog.csdn.net/ameyume/article/details/6100756 我们在平时的开发中,有时候可能会需要一些全局数据,来让应用中的所有Activity和Vi ...

随机推荐

  1. 设计模式(Python)-简单工厂,工厂方法和抽象工厂模式

    本系列文章是希望将软件项目中最常见的设计模式用通俗易懂的语言来讲解清楚,并通过Python来实现,每个设计模式都是围绕如下三个问题: 为什么?即为什么要使用这个设计模式,在使用这个模式之前存在什么样的 ...

  2. postgraphile 基本试用

    我的测试环境使用docker 进行的安装 基本安装 pg 数据库 我使用的是timesacledb 复制集版本,参考https://github.com/timescale/streaming-rep ...

  3. leetcode:Insert Sort List

    问题描写叙述 对一个单链表进行插入排序,head指向第一个结点. 代码 /** * Definition for singly-linked list. * struct ListNode { * i ...

  4. Cocos2d-x调用Java 代码

    Java代码: package com.dishu; import com.dishu.org.R; import android.app.Activity; import android.app.A ...

  5. jenkins初始化配置完后设置了管理员账号密码 网页停留时间长了刷新登录不了了

    好像陆陆续续在几台机子安装到最后正式使用的这台机器都是这样.难道是它自己本身的问题吗?只能网上帖子凑了. 找到.jenkins/config.xml文件:(windows环境就是和initialsec ...

  6. 黑马程序员【JSP九大内置对象和四个作用域】转载

    http://www.cnblogs.com/fanfu1/p/4530980.html JSP九大内置对象和四个作用域 ------- android培训.java培训.期待与您交流! ------ ...

  7. 再记录一次delete出错的经历

    调试的时候进行到delete语句时出现问题,我做的操作是在函数体内用int*申请了N个内存空间,这让我十分纳闷,为什么不能delete呢? 回忆到之前delete出错也遇过一次问题 手动封装OpenC ...

  8. Check failed: mdb_status == 0 (2 vs. 0) No such file or directory

    运行  ./examples/mnist/train_lenet.sh  时,碰到了这个问题. 一定是路径问题!!!仔细查看prototxt文件里面的各种路径!!! 解决方案: 把.prototxt里 ...

  9. Getting Started(入门)

    欢迎阅读专门针对android开发者的培训课程,在这一系列的课程中,描述了如何通过我们的示例代码来完成特定的任务和功能,这些代码可以灵活地应用到你的应用程序中. 课程被分成了几部分, 第一部分,入门, ...

  10. 开始Django之旅

    MTV 与 MVC 模型 1.MVC模型 Web服务器开发领域里著名的MVC模式,所谓MVC就是把Web应用分为 模型(M) ,控制器(C) 和 视图(V) 三层,他们之间以一种插件式的.松耦合的方式 ...