无法在 iOS 上编译调整

Trouble compiling tweak on iOS

我目前正在尝试通过 ssh 在 8.1.1 上使用我的 iPhone 5s 上的 theos 编译一个调整。

我使用了一个名为 EasyRespring 的开源软件,这是我在 github 上找到的,据称与 iOS 8 兼容。

从中复制所有文件并 运行 make 后,我遇到了一大堆错误,无法破译。

如有必要,我可以提供任何额外信息。

drop-it-like-its-hotspot:/private/var/easyrespring root# make
/private/var/easyrespring/theos/makefiles/targets/Darwin-arm64/iphone.mk:43: Targeting iOS 4.0 and higher is not supported with iphone-gcc. Forcing clang.
/private/var/easyrespring/theos/makefiles/targets/Darwin-arm64/iphone.mk:53: Deploying to iOS 3.0 while building for 6.0 will generate armv7-only binaries.
Making all for tweak EasyRespring...
 Preprocessing Tweak.xm...
 Compiling Tweak.xm...
In file included from <built-in>:181:
In file included from <command line>:3:
In file included from /private/var/easyrespring/theos/Prefix.pch:4:
In file included from /private/var/easyrespring/theos/sdks/iPhoneOS8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:9:
/private/var/easyrespring/theos/sdks/iPhoneOS8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:18:1: error: 
      C++ requires a type specifier for all declarations
NS_CLASS_DEPRECATED_IOS(2_0, 5_0, "UIAcceleration has been replaced by t...
^~~~~~~~~~~~~~~~~~~~~~~
/private/var/easyrespring/theos/sdks/iPhoneOS8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:18:26: error: 
      invalid suffix '_0' on integer constant
NS_CLASS_DEPRECATED_IOS(2_0, 5_0, "UIAcceleration has been replaced by t...
                         ^
/private/var/easyrespring/theos/sdks/iPhoneOS8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:18:98: error: 
      expected ';' after top level declarator
  ...5_0, "UIAcceleration has been replaced by the CoreMotion framework")
                                                                         ^
/private/var/easyrespring/theos/sdks/iPhoneOS8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:26:1: error: 
      unexpected '@' in program
@property(nonatomic,readonly) UIAccelerationValue x;
^
/private/var/easyrespring/theos/sdks/iPhoneOS8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:27:1: error: 
      unexpected '@' in program
@property(nonatomic,readonly) UIAccelerationValue y;
^
/private/var/easyrespring/theos/sdks/iPhoneOS8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:28:1: error: 
      unexpected '@' in program
@property(nonatomic,readonly) UIAccelerationValue z;
^
/private/var/easyrespring/theos/sdks/iPhoneOS8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:30:1: error: 
      '@end' must appear in an Objective-C context
@end
^
/private/var/easyrespring/theos/sdks/iPhoneOS8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:32:1: error: 
      C++ requires a type specifier for all declarations
NS_CLASS_DEPRECATED_IOS(2_0, 5_0, "UIAccelerometer has been replaced by ...
^~~~~~~~~~~~~~~~~~~~~~~
/private/var/easyrespring/theos/sdks/iPhoneOS8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:32:26: error: 
      invalid suffix '_0' on integer constant
NS_CLASS_DEPRECATED_IOS(2_0, 5_0, "UIAccelerometer has been replaced by ...
                         ^
/private/var/easyrespring/theos/sdks/iPhoneOS8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:32:99: error: 
      expected ';' after top level declarator
  ...5_0, "UIAccelerometer has been replaced by the CoreMotion framework")
                                                                          ^
/private/var/easyrespring/theos/sdks/iPhoneOS8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:45:1: error: 
      unexpected '@' in program
@property(nonatomic) NSTimeInterval updateInterval; //May be capped at ...
^
/private/var/easyrespring/theos/sdks/iPhoneOS8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:46:1: error: 
      unexpected '@' in program
@property(nonatomic,assign) id<UIAccelerometerDelegate> delegate;
^
/private/var/easyrespring/theos/sdks/iPhoneOS8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:48:1: error: 
      '@end' must appear in an Objective-C context
@end
^
/private/var/easyrespring/theos/sdks/iPhoneOS8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:50:35: error: 
      cannot find protocol declaration for 'NSObject'
@protocol UIAccelerometerDelegate<NSObject>
                                  ^
/private/var/easyrespring/theos/sdks/iPhoneOS8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:53:24: error: 
      expected a type
- (void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UI...
                       ^
/private/var/easyrespring/theos/sdks/iPhoneOS8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:53:71: error: 
      expected a type
- (void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAc...
                                                                      ^
/private/var/easyrespring/theos/sdks/iPhoneOS8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:53:118: error: 
      expected ':'
  ...didAccelerate:(UIAcceleration *)acceleration NS_DEPRECATED_IOS(2_0, 5_0);
                                                                   ^
/private/var/easyrespring/theos/sdks/iPhoneOS8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:53:118: error: 
      expected ';' after method prototype
In file included from <built-in>:181:
In file included from <command line>:3:
In file included from /private/var/easyrespring/theos/Prefix.pch:4:
In file included from /private/var/easyrespring/theos/sdks/iPhoneOS8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:10:
In file included from /private/var/easyrespring/theos/sdks/iPhoneOS8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibility.h:11:
/private/var/easyrespring/theos/sdks/iPhoneOS8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIBezierPath.h:12:20: error: 
      C++ requires a type specifier for all declarations
typedef NS_OPTIONS(NSUInteger, UIRectCorner) {
                   ^~~~~~~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [obj/Tweak.xm.1c1f697b.o] Error 1
make[1]: *** [internal-library-all_] Error 2
make: *** [EasyRespring.all.tweak.variables] Error 2

我不确定 post 的更好方法,所以我将 link 留给 ghostbin here,也许它更清楚?

我想知道这是否是您使用的 SDK headers 的问题,问题似乎是与您的项目无关的随机文件(根据 github 上的 easyrespring 文件) .如果您手动下载了 ios 8.1 SDK,请尝试其他版本。也许试试这个? https://github.com/MP0w/iOS-Headers

编辑: 使用下载的 8.1 headers,您将替换 theos/sdks/ 目录中的现有版本。然后你可以在你的项目中再次尝试 运行 make 看看它是否正常工作。