-
-
Save anonymous/48de4882c270420db4b11423e96de01e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
这个是.xm文件: | |
%hook CLGeocoder | |
import | |
(void)reverseGeocodeLocation:(CLLocation *)location completionHandler:(CLGeocodeCompletionHandler)completionHandler{ | |
%orig; | |
} | |
%end | |
这个是Makefile: | |
include $(THEOS)/makefiles/common.mk | |
TWEAK_NAME = MyTweak | |
MyTweak_FILES = Tweak.xm | |
MyTweak_FRAMEWORKS = CoreLocation | |
include $(THEOS_MAKE_PATH)/tweak.mk | |
这个是报错的信息: | |
bogon:mytweak Jk_Chan$ make | |
Making all for tweak MyTweak… | |
==> Preprocessing Tweak.xm… | |
==> Compiling Tweak.xm (armv7)… | |
Tweak.xm:23:152: error: unknown type name 'CLLocation' | |
...CLGeocoder* LOGOSSELF_CONST, SEL, CLLocation *, CLGeocodeCompletionHan... | |
^ | |
Tweak.xm:23:166: error: unknown type name 'CLGeocodeCompletionHandler' | |
...CLGeocoder* LOGOSSELF_CONST, SEL, CLLocation *, CLGeocodeCompletionHan... | |
^ | |
Tweak.xm:23:345: error: unknown type name 'CLLocation' | |
...CLGeocoder* LOGOSSELF_CONST, SEL, CLLocation *, CLGeocodeCompletionHan... | |
^ | |
Tweak.xm:23:359: error: unknown type name 'CLGeocodeCompletionHandler' | |
...CLGeocoder* LOGOSSELF_CONST, SEL, CLLocation *, CLGeocodeCompletionHan... | |
^ | |
Tweak.xm:4:184: error: declaration of 'CLGeocodeCompletionHandler' must be | |
imported from module 'CoreLocation.CLGeocoder' before it is required | |
...LOGOSSELF_CONST self, SEL _cmd, CLLocation * location, CLGeocodeComple... | |
^ | |
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CLGeocoder.h:21:16: note: | |
previous declaration is here | |
typedef void (^CLGeocodeCompletionHandler)(NSArray< CLPlacemark *> * __n... | |
^ | |
Tweak.xm:5:93: error: cannot initialize a parameter of type 'int *' with an | |
lvalue of type 'CLLocation *' | |
..._cmd, location, completionHandler); | |
^~~~~~~~ | |
6 errors generated. | |
make[3]: *** [/Users/Jk_Chan/Desktop/tweak/mytweak/.theos/obj/debug/armv7/Tweak.xm.fc8db1a8.o] Error 1 | |
make[2]: *** [/Users/Jk_Chan/Desktop/tweak/mytweak/.theos/obj/debug/armv7/MyTweak.dylib] Error 2 | |
make[1]: *** [internal-library-all_] Error 2 | |
make: *** [MyTweak.all.tweak.variables] Error 2 | |
bogon:mytweak Jk_Chan$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment