iOS获取当前路由信息】的更多相关文章

导入头文件: #import <SystemConfiguration/CaptiveNetwork.h> - (void)currentWifiSSID {    // Does not work on the simulator.    NSArray *ifs = (__bridge id)CNCopySupportedInterfaces();    NSLog(@"ifs:%@",ifs);    for (NSString *ifnam in ifs) {   …
获取通讯录中信息 一. 我们设置一个ABAddressBookRef类型的属性addressBook. 二. 要获得通讯录中的信息,我们需要获取访问通讯录的权限. 在运行下面的获取权限的方法的时候,系统会自动跳出来一个alterView,询问是否允许访问通讯录.(注意这个访问只会执行一次,之后即使我们删除了这个app,下次在下载回来,这个询问也不会再执行了) CFErrorRef error; addressBook = ABAddressBookCreateWithOptions(NULL ,…
iOS具体的设备型号: #include <sys/types.h> #include <sys/sysctl.h> - (void)test { //手机型号. size_t size; sysctlbyname(); char *machine = (char*)malloc(size); sysctlbyname(); NSString *platform = [NSString stringWithCString:machine encoding:NSUTF8StringE…
现在许多接口都需要上传应用版本信息,所以呢,这个是必不可少的,可以在进入应用的时候先获取到,然后存在单例中,用的时候直接调用单例就好了,记住这些字符串 NSString *executableFile = [[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString *)kCFBundleExecutableKey];    //获取项目名称   NSString *version = [[[NSBundle mainBundle]…
//在[UIDevice currentDevice]中的属性 @property(nonatomic,readonly,strong) NSString *name; // e.g. "My iPhone" @property(nonatomic,readonly,strong) NSString *model; // e.g. @"iPhone", @"iPod touch" @property(nonatomic,readonly,stro…
一,在需要的地方添加监听 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onKeyboardWillShowNotification:) name:UIKeyboardWillShowNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onKeybo…
/手机序列号      NSString* identifierNumber = [[UIDevice currentDevice] uniqueIdentifier];     NSLog(@"手机序列号: %@",identifierNumber);     //手机别名: 用户定义的名称      NSString* userPhoneName = [[UIDevice currentDevice] name];     NSLog(@"手机别名: %@",…
/* Generated by RuntimeBrowser Image: /System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices */ @interface LSApplicationWorkspace : NSObject // Image: /System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices + (i…
[UIDevice currentDevice]:表示设备 NSString *devices=[[NSString alloc] initWithFormat: @"unique id: %@ \nlocalized model: %@ \nsystem version: %@ \nsystem name: %@ \nmodel: %@", [[UIDevice currentDevice] uniqueIdentifier], [[UIDevice currentDevice] l…
iOS获取通讯录全部信息 ABAddressBookRef addressBook = ABAddressBookCreate(); CFArrayRef results = ABAddressBookCopyArrayOfAllPeople(addressBook); for(int i = 0; i < CFArrayGetCount(results); i++) { ABRecordRef person = CFArrayGetValueAtIndex(results, i); //读取f…