安装好所有的东西后编译第一个tweak报错,好像是说theos/include中的头文件和XCode中的头文件定义冲突,找了半天也没找到解决方法,只好来请求帮助了。
编译报错如下:
Making all for tweak FirstTweak…
==> Preprocessing Tweak.xm…
==> Compiling Tweak.xm (armv7)…
While building module ‘UIKit’ imported from /opt/theos/Prefix.pch:22:
While building module ‘QuartzCore’ imported from /opt/theos/include/UIKit/UIKit-Structs.h:15:
In file included from :65:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CoreAnimation.h:32:
/opt/theos/include/QuartzCore/CAValueFunction.h:13:1: error: duplicate interface
definition for class ‘CAValueFunction’
@interface CAValueFunction : NSObject {
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAValueFunction.h:9:12: note:
previous definition is here
@interface CAValueFunction : NSObject
^
While building module ‘UIKit’ imported from /opt/theos/Prefix.pch:22:
While building module ‘QuartzCore’ imported from /opt/theos/include/UIKit/UIKit-Structs.h:15:
In file included from :65:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CoreAnimation.h:32:
/opt/theos/include/QuartzCore/CAValueFunction.h:17:39: error: property has a
previous declaration
@property(readonly, assign) NSString* name;
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAValueFunction.h:18:31: note:
property declared here
@property(readonly) NSString *name;
^
While building module ‘UIKit’ imported from /opt/theos/Prefix.pch:22:
In file included from :2:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:10:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibility.h:13:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibilityAdditions.h:10:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIPickerView.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UITableView.h:11:
In file included from /opt/theos/include/UIKit/UISwipeGestureRecognizer.h:10:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UISwipeGestureRecognizer.h:9:
In file included from /opt/theos/include/UIKit/UIGestureRecognizer.h:6:
/opt/theos/include/UIKit/UIKit-Structs.h:15:9: fatal error: could not build
module ‘QuartzCore’
#import <QuartzCore/QuartzCore.h>
In file included from <built-in>:341:
In file included from <command line>:5:
/opt/theos/Prefix.pch:22:12: fatal error: could not build module 'UIKit'
@import UIKit;
~~~~~~~^~~~~
4 errors generated.
make[3]: *** [/Users/zhouye/Desktop/mytweaks/firsttweak/.theos/obj/debug/armv7/Tweak.xm.9f55e45b.o] Error 1
make[2]: *** [/Users/zhouye/Desktop/mytweaks/firsttweak/.theos/obj/debug/armv7/FirstTweak.dylib] Error 2
make[1]: *** [internal-library-all_] Error 2
make: *** [FirstTweak.all.tweak.variables] Error 2