【问题标题】:How set up bundle id for theos console app如何为 theos 控制台应用程序设置 bundle id
【发布时间】: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

标签: iphone jailbreak theos


【解决方案1】:

bundle id 在 Info.plist 文件中设置。如果您正在制作命令行工具,您可以通过添加以下链接器标志将 Info.plist 文件嵌入到您的可执行文件中:

-sectcreate __TEXT __info_plist path/to/Info.plist

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2010-09-15
    • 2012-11-02
    • 2018-03-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多