1

我正在尝试将首选项包添加到我正在构建的调整中。我按照本教程的一部分添加了首选项包。在我尝试添加首选项包后,我的调整无法编译并出现以下错误:

Making all for tweak MyTweak...
 Preprocessing Tweak.xm...
 Compiling Tweak.xm...
 Linking tweak MyTweak...
 Stripping MyTweak...
 Signing MyTweak...
Making all in prefs...
Making all for bundle prefs...
 Copying resource directories into the bundle wrapper...
 Compiling prefs.mm...
cc1objplus: warnings being treated as errors
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/PrivateFrameworks/Preferences.framework/Headers/PSListController.h:9,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/PrivateFrameworks/Preferences.framework/Headers/PSLocaleController.h:8,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/PrivateFrameworks/Preferences.framework/Headers/Preferences.h:9,
                 from prefs.mm:1:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/PrivateFrameworks/Preferences.framework/Headers/PSViewController.h:47: warning: property ‘specifier’ type does not match protocol ‘PSController’ property type
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/PrivateFrameworks/Preferences.framework/Headers/PSViewController.h:47: warning: property ‘rootController’ type does not match protocol ‘PSController’ property type
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/PrivateFrameworks/Preferences.framework/Headers/PSSetupController.h:7,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/PrivateFrameworks/Preferences.framework/Headers/PSInternationalLanguageSetupController.h:7,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/PrivateFrameworks/Preferences.framework/Headers/Preferences.h:24,
                 from prefs.mm:1:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/PrivateFrameworks/Preferences.framework/Headers/PSRootController.h:71: warning: property ‘specifier’ type does not match protocol ‘PSController’ property type
make[3]: *** [obj/prefs.mm.ade1d157.o] Error 1
make[2]: *** [internal-bundle-all_] Error 2
make[1]: *** [prefs.all.bundle.variables] Error 2
make: *** [internal-all] Error 2

有任何想法吗?

谢谢。

4

1 回答 1

1

您的标头版本可能搞砸了,因为它们是私有框架标头,而不是官方的 Apple 标头。

两种可能的解决方案:

  1. 从更好的来源重新下载标题。通常推荐使用rpetrich 的版本。

  2. 如果这不起作用,请手动编辑标题以解决问题。找到包含PSController协议的头文件(可能是 PSController.h),检查specifier应该是什么类型,然后在PSViewController.h. 我相信我第一次处理 Preference Bundles 时必须做这样的事情。

于 2013-03-20T04:18:54.337 回答