共享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. linux下不同tomcat使用不同的jdk版本

    环境:Linux tomcat7 使用jdk7 tomcat 8使用jdk8 最近写好了一个程序,需要部署在测试机器上,这个测试机器上已经有了在运行的tomcat7, 我这个程序要求使用tomcat8 ...

  2. streamsets 错误记录处理

    我们可以在stage 级别,或者piepline 级别进行error 处理配置 pipeline的错误记录处理 discard(丢踢) send response to Origin pipeline ...

  3. 适合Centos Web服务器的iptables规则

    适合Centos Web服务器的iptables规则IPT="/sbin/iptables"$IPT --delete-chain$IPT --flush$IPT -P INPUT ...

  4. linux下tengine安装

    1.什么是tengine? 说到tengine,首先还是得说下nginx了,大家对于nginx并不陌生,对于基本的需求都能满足,如果是涉及高级性能,那么就必须使用商用版nginx plus了,一谈到商 ...

  5. Angular 安装

    1.angular安装 npm  install -g angular 2. 显示angular安装路径 npm config ls 3. angular 双向绑定 <!DOCTYPE html ...

  6. 查询反模式 - GroupBy和HAVING的理解

    为了最简单地说明问题,我特地设计了一张这样的表. 一.GROUP BY单值规则 规则1:单值规则,跟在SELECT后面的列表,对于每个分组来说,必须返回且仅仅返回一个值. 典型的表现就是跟在SELEC ...

  7. MPEG2-TS音视频同步原理

    一.引言MPEG2系统用于视音频同步以及系统时钟恢复的时间标签分别在ES,PES和TS这3个层次中.  在TS 层, TS头信息包含了节目时钟参考PCR(Program Clock Reference ...

  8. LeetCode 177. Nth Highest Salary

    https://leetcode.com/problems/nth-highest-salary/description/ Write a SQL query to get the nth highe ...

  9. controller 允许跨域访问

    1.在controller 上加上 @CrossOrigin(origins = {"http://localhost:7777", "http://someserver ...

  10. mybatis 2 -常用数据操作

    1.写入数据并获取自增ID XML配置: <!-- 写入数据获取自增ID --> <insert id="insertLog" parameterType=&qu ...