是否有可能从iOS的应用程序编程获取应用程序ID? [英] Is it possible to get app id from iOS application programmatically?

查看:130
本文介绍了是否有可能从iOS的应用程序编程获取应用程序ID?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法从运行iOS应用程序获得AppStore的ID? (有关要求用户评分和AppStore上提供的链接。)

Is there any way for getting appstore id from running iOS application? (For asking user to rate it and providing link to appstore.)

推荐答案

使用

NSString* appID = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"];

与@zaheer评论更新答案

Updating the answer with comment by @zaheer

NSBundle.mainBundle().infoDictionary?["CFBundleIdentifier"] as? NSString

这篇关于是否有可能从iOS的应用程序编程获取应用程序ID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆