سؤال

I am trying to add a preference bundle to a tweak I am building. I followed the part of this tutorial where they add the preference bundle. After I tried adding the preference bundle, my tweak fails to compile with the following error:

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

Any ideas?

Thanks.

هل كانت مفيدة؟

المحلول

Your versions of the headers may be messed up, since they're Private Framework headers, not official Apple headers.

Two possible solutions:

  1. Redownload the headers from a better source. rpetrich's versions are often recommended.

  2. If that doesn't work, edit the headers manually to fix the problem. Find the header containing the PSController protocol (probably PSController.h), check what type specifier is supposed to be, and then make the change in PSViewController.h. I believe I had to do something like this the first time I was dealing with Preference Bundles.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top