如何在运行时以编程方式确定应用程序ID? [英] How to figure out the app ID programmatically at runtime?

查看:113
本文介绍了如何在运行时以编程方式确定应用程序ID?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有办法吗?我讨厌它在某处硬编码应用程序ID ...

Is there a way to do that? I would hate it to hard-code the app ID somewhere...

推荐答案

如果你的意思是你的com.whatever.whatever identification :

If you mean your com.whatever.whatever identification:

NSString *myAppID = [[NSBundle mainBundle] bundleIdentifier];

如果您的iTunes id123456789标识,则在运行时无法使用,但会提供给您在iTunes Connect上,可以从那里手动插入您的应用程序。

If you mean your iTunes id123456789 identification, it's not available to you at runtime, but is given to you on iTunes Connect and can be manually inserted into your app from there.

这篇关于如何在运行时以编程方式确定应用程序ID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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