iOS 7: How to get own number via private API?

iOS 越狱开发 获取本机手机号码:

http://stackoverflow.com/questions/19504478/ios-7-how-to-get-own-number-via-private-api


关于code sign 和 entitlement怎么操作:

越狱开发环境设置的时候,Project Navigation Section 左上角 -》Target-》Build Phase


在Run Script中 会有这样的shell 脚本:

<span style="font-size:18px;">export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
if [ "${PLATFORM_NAME}" == "iphoneos" ] || [ "${PLATFORM_NAME}" == "ipados" ]; then
/Applications/Xcode.app/Contents/Developer/iphoneentitlements/gen_entitlements.py "my.company.${PROJECT_NAME}" "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/${PROJECT_NAME}.xcent";
codesign -f -s "iPhone Developer" --entitlements "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/${PROJECT_NAME}.xcent" "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/"
fi</span>


你会看到
<strong style="background-color: rgb(255, 204, 204);"><span style="font-size:18px;">/Applications/Xcode.app/Contents/Developer/iphoneentitlements/gen_entitlements.py</span></strong>

是的 打开这个python脚本,在里面 你可以设置Entitlement内容:

<span style="font-size:18px;">entitlements = """
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>application-identifier</key>
    <string>%s</string>
    <key>get-task-allow</key>
    <true/>
    <key>com.apple.coretelephony.Identity.get</key>
    <true/>
</dict>
</plist></span>

OK 重新编译一下,就可以获取手机号码了

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值