http://www.cnblogs.com/moonvan/archive/2012/10/15/2724898.html
=====工程A=====
0. 建立工程A, 先调出URL Types
1.Add Row 一个URL Schemes 并随便起个名字 (这就是调用这个app的唯一链接)
<array> <dict> <key>CFBundleURLName</key> <string>com.chujian.sevendaysversion</string> <key>CFBundleURLSchemes</key> <array> <string>chujian</string> </array> </dict> </array>
2. 在工程A的AppDelegate.m里加入以下系统方法:
(这个方法会捕获调用本工程的程序传递过来的URL identifier文本)
====工程B=====
3. 建立工程B, 添加调用语句:
4. 编译运行工程B, 结果是:
B启动->A启动->A弹出Alert:
另外:
0. 从结果看出app的地址构成是: URL Scheme://URL identifier
1. 单用URL Scheme 即可打开程序, 即URL identifier是可选的
2. myapp://后面的字 可以为点”.”和等号”=” 不可以为空格和问号
3. stackoverflow上有很多人指出这是apple禁止的功能, 所以请谨慎使用, 但如果是客户问”设备能力”这方面的问题, 那么答案是”可以”, 但 不建议那么做.