在iOS中检测飞行模式是ON还是OFF

时间:2014-10-21 12:09:37

标签: ios airplane

我正在尝试使用私有框架检测飞机模式 - " AppSupport框架"。我已经更改了RadiosPreferences.h文件的内容。新内容

@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

我按照以下链接进行操作。

Detect if iPhone is in Airplane mode?

完成后,它会给我这个错误

ld: framework not found AppSupport
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我尝试了所有的解决方案。但没有什么对我有用。任何帮助表示赞赏。

0 个答案:

没有答案
相关问题