Xcodeでプライベートフレームワークをインポートする選択された回答に従っています
基本的に、アプリで機内モードを制御できるようにしたいです。アプリにインポートRadioPreferences.h
してコンパイルしようとするとExpected Identifier
、@class <RadiosPreferencesDelegate>;
次に何をすべきか正確にはわかりません。前方宣言プロトコルができることすら知りませんでした。
Xcodeでプライベートフレームワークをインポートする選択された回答に従っています
基本的に、アプリで機内モードを制御できるようにしたいです。アプリにインポートRadioPreferences.h
してコンパイルしようとするとExpected Identifier
、@class <RadiosPreferencesDelegate>;
次に何をすべきか正確にはわかりません。前方宣言プロトコルができることすら知りませんでした。
まず、次の内容を。という名前のファイルにコピーしますRadioPreferences.h
。(https://stackoverflow.com/a/13095362/418715から取得)。
@protocol RadiosPreferencesDelegate
-(void)airplaneModeChanged;
@end
@interface RadiosPreferences : NSObject
{
struct __SCPreferences *_prefs;
int _applySkipCount;
id <RadiosPreferencesDelegate> _delegate;
BOOL _isCachedAirplaneModeValid;
BOOL _cachedAirplaneMode;
BOOL notifyForExternalChangeOnly;
}
- (id)init;
- (void)dealloc;
@property(nonatomic) BOOL airplaneMode;
- (void)refresh;
- (void)initializeSCPrefs:(id)arg1;
- (void)notifyTarget:(unsigned int)arg1;
- (void)synchronize;
- (void *)getValueForKey:(id)arg1;
- (void)setValue:(void *)arg1 forKey:(id)arg2;
@property(nonatomic) BOOL notifyForExternalChangeOnly; // @synthesize notifyForExternalChangeOnly;
@property(nonatomic) id <RadiosPreferencesDelegate> delegate; // @synthesize delegate=_delegate;
@end
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/System/Library/PrivateFrameworks
ます。iPhoneOS6.0.sdk
パス内をターゲットのSDKに置き換えます。これですべてがコンパイルされ、クラスを使用できるようになります。