As the question suggests, I'd like to know how I can use private API in private, company IOS 8.1 - 8.1.2 app. It will NOT be going through the app store. I need to have programmatic control over airplane mode, wifi, bluetooth, and cellular data. I've read online over and over again that it's not possible, but I can't believe this to be true. I've tried creating an NSObject category and simply pasting the method I want to use to turn on wifi. However, I keep getting a Matcho-Link Error. I have added the corresponding 'sharing' framework to the library, so not sure what the problem is.
My Category
@interface NSObject (Wifi)
- (void)setWifiEnabled:(BOOL)arg1;
@end
My ViewController's Interface
#import <UIKit/UIKit.h>
#import "NSObject+Wifi.h"
@interface ViewController : UIViewController
@end
Viewcontroller's Implementation
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
- (IBAction)enableWifi:(UIButton *)sender {
NSObject * wifi = [[NSObject alloc]init];
[wifi setWifiEnabled:YES];
}
@end
Error Message:
ld: framework not found Sharing
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Again, the 'Sharing.framework' is added and linked to project and I've checked "Copy files if needed". How do I get passed this error?