0

多くの異なるプラットフォームで簡単に微調整を作成するための素晴らしいフレームワークである theos を使用して微調整をコンパイルしようとしました。ここでは、再起動してゆっくりとフェードアウトするたびに設定アイコンを表示しようとしていますが、コンパイルに失敗しています。必要なすべてのヘッダーとフレームワークがあり、最新の Xcode がインストールされ、Xcode 4.2 が以前にインストールされた状態で、実際の Mac を実行しています (端末に表示される名前にもかかわらず:P)。これはtweak.xmです:

#import <UIKit/UIKit2.h>
#import <objc/runtime.h>
#import <SpringBoard/SpringBoard.h>
#import <Foundation/Foundation.h>
#import <AudioToolbox/AudioToolbox.h>
#import <substrate2.h>
#import <IOSurface/IOSurface.h>
#import <QuartzCore/QuartzCore2.h>
#import <CoreGraphics/CoreGraphics.h>
#import <CaptainHook/CaptainHook.h>
#import <Foundation/Foundation.h>
#import <objc/runtime.h>
#import <AVFoundation/AVAudioPlayer.h>
#import <Celestial/Celestial.h>
#import <SpringBoardServices/SpringBoardServices.h>
#import <CoreFoundation/CFNotificationCenter.h>
#import <ChatKit/ChatKit.h>

%hook CKConversationListController

- (void)composeButtonClicked:(id)clicked {
}
%end

%hook SpringBoard
-(void)applicationDidFinishLaunching:(id)application {
NSArray *animationArray = [NSArray arrayWithObjects:[UIImage imageNamed:@"/Applications/Preferences.app/BlobIcon@2x.png"], nil];


         [NSTimer scheduledTimerWithTimeInterval:.75 target:self selector:@selector(crossfade) userInfo:nil repeats:YES];

    mainImageView.animationImages = animationArray;


    mainImageView.animationDuration = 4.5; //mainImageView is instance of UIImageView

    mainImageView.animationRepeatCount = 0;

    [mainImageView startAnimating];


    CABasicAnimation *crossFade = [CABasicAnimation animationWithKeyPath:@"contents"];
    crossFade.autoreverses = YES;
    crossFade.repeatCount = 1;
    crossFade.duration = 1.0;
}

%new
- (void) crossfade {
    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationDuration:0.5];
    [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; // user dependent transition acn be set here
    mainImageView.alpha = !mainImageView.alpha;
    [UIView commitAnimations];
}
%end

そして、メイクファイルは次のようになります。

include theos/makefiles/common.mk
export GO_EASY_ON_ME=1

TWEAK_NAME = Goofy
Goofy_FILES = Tweak.xm
Goofy_FRAMEWORKS = Foundation UIKit CoreGraphics ChatKit
Goofy_PRIVATE_FRAMEWORKS = ChatKit VoiceServices AppSupport

include $(THEOS_MAKE_PATH)/tweak.mk

私は取得し続けています

Making all for tweak Goofy...
 Preprocessing Tweak.xm...
 Compiling Tweak.xm...
Tweak.xm: In function ‘void _logos_method$_ungrouped$SpringBoard$applicationDidFinishLaunching$(SpringBoard*, objc_selector*, objc_object*)’:
Tweak.xm:32: error: ‘mainImageView’ was not declared in this scope
Tweak.xm: In function ‘void _logos_method$_ungrouped$SpringBoard$crossfade(SpringBoard*, objc_selector*)’:
Tweak.xm:53: error: ‘mainImageView’ was not declared in this scope
make[2]: *** [.theos/obj/Tweak.xm.o] Error 1
make[1]: *** [internal-library-all_] Error 2
make: *** [Goofy.all.tweak.variables] Error 2
Hackint0sh-HD:Goofy iHackerMe$ 

ここで何が欠けていますか?

4

1 に答える 1