Funny
Funny

Reputation: 576

Detect if Airplane mode is ON or OFF in iOS

I am trying to detect the airplane mode using private framework - "AppSupport framework". I have changed the content of RadiosPreferences.h file in it. New content is

@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

I followed below link for this.

Detect if iPhone is in Airplane mode?

Once done, it gives me this error

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

I have tried all the solutions. But nothing works for me. Any help appreciated.

Upvotes: 1

Views: 1487

Answers (0)

Related Questions