iOS-Runtime-Headers
iOS-Runtime-Headers copied to clipboard
Getting 64bit architecture error for Private Api
I need to toggle AirPlane mode programmatically using the Private API RadiosPreferences, but I am getting a compile error that RadioPreferences does not support 64-bit architecture arm64. I have import below header file in my project.
#import <Foundation/Foundation.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
Here is the Xcode compile error.
Can you please update the header file or give a proper solution to use this.
Thanks in advance.
Undefined symbols for architecture arm64: "OBJC_CLASS$_RadiosPreferences", referenced from: objc-class-ref in AppDelegate.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
I think you don't need to compile this code, it's already there. Try this https://github.com/nst/iOS-Runtime-Headers#sample-usage for your purpose without adding anything.