【发布时间】:2013-08-23 11:08:47
【问题描述】:
如何为theos控制台应用(工具)设置bundle id?
在我的代码中,这个
NSString *bundleIdentifier = [[NSBundle mainBundle] bundleIdentifier];
NSLog(@"MYBid: %@", bundleIdentifier");
总是打印(null)
要创建我的工具,我会这样做
$ ./theos/bin/nic.pl
NIC 2.0 - New Instance Creator
------------------------------
[1.] iphone/application
[2.] iphone/library
[3.] iphone/preference_bundle
[4.] iphone/tool
[5.] iphone/tweak
Choose a Template (required): 4
Project Name (required): tst
Package Name [com.yourcompany.tst]:
Author/Maintainer Name [tst]: tst
为什么我的捆绑包 ID 不是“com.yourcompany.tst”?
【问题讨论】:
-
看来你正在制作一个“工具”,即。 e.命令行非 Cocoa 应用程序。那些没有任何捆绑 ID。
-
实际上他们可以有捆绑ID。例如,如果您查看 iOS 6 中的 imagent,您会发现它是一个命令行应用程序,在系统启动时作为守护进程启动,并且具有捆绑 ID - com.apple.imagent