Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting 64bit architecture error for Private Api #74

Open
AnkitPanchal10 opened this issue Jan 2, 2019 · 1 comment
Open

Getting 64bit architecture error for Private Api #74

AnkitPanchal10 opened this issue Jan 2, 2019 · 1 comment

Comments

@AnkitPanchal10
Copy link

AnkitPanchal10 commented Jan 2, 2019

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)

@Harvant
Copy link

Harvant commented Apr 3, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants