In full bloom of youth
siruoxian · 共 133 篇文章
[NetworkInfo] Signal strength query returned error: Error Domain=NSPOSIXErrorDom
最近使用Xcode 10.1运行App的时候,控制台总是频繁打印如下日志: 2019-02-27 17:43:19.239825+0800 siruoxian[28799:1433202] [NetworkInfo] Signal strength query returned error: Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied", descriptor: <CTServiceDescriptor 0x2814f7b40, domain=1, instance=1> 经查证和[CTTelephonyNetwork…
2019-02-28 18:07 · iphone · 评论(0)
Xcode10 运行报错 Copy Pods Resources
Showing Recent Messages :-1: Multiple commands produce '/Users/siruoxian/Library/Developer/Xcode/DerivedData/appDemo-cuslchramlktdfchvntczwoqjqyq/Build/Products/Debug-iphoneos/appDemo.app': 1) Target 'appDemo' has create directory command with output '/Users/siruoxian/Library/Developer/Xcode/Derive…
2018-10-09 15:29 · iphone · 评论(0)
常见的IOS APP所用到的第三方库
转自:http://www.liuchendi.com/2016/01/04/iOS/11_ThridPart/?utm_source=tuicool&utm_medium=referral 收集了常见的APP所用到的第三方库,提高开发效率 弹出视图 1、底部弹出栏,可以控制视图差 : ZFDragableModalTransition 2、类似微信点击加号弹出的选项视图: kxmenu 3、底部弹出视图: CNPPopupController 4、类似QQ和微信,长按可以弹出黑色的选项视图 QBPopupMenu 5、类似微博的菜单栏弹出: TumblrMenu 6、菜单栏上方弹出: LM…
2018-03-14 16:50 · iphone · 评论(0)
Xcode9-expected parameter declarator
check_compile_time() expected parameter declarator 定义在 usr/include/AssertMacros.h #ifndef check_compile_time #define check_compile_time( expr ) __Check_Compile_Time( expr ) #endif 修改check_compile_time为__Check_Compile_Time 解决了报错。 参考:http://blog.csdn.net/xjh093/article/details/78599759
2018-01-12 13:42 · iphone · 评论(0)
Xcode中的环境变量
一般我们在xcode里面配置包含工程目录下头文件的时候,都要关联着相对路径和绝对路径,如果只是自己用这个项目,用绝对路径的问题不大,但是如果协作开发,这时候绝对路径的缺点立马出现。 所以在修改User Header Search Paths这个选项的时候使用 "$(SRCROOT)/当前工程名字/需要包含头文件所在文件夹" 将上面的双引号里面的字符串拷贝之后,你会发现这个“$(SRCROOT)”,会自动变成当前工程所以的目录。 一、xcode中的环境变量 $(BUILT_PRODUCTS_DIR) build成功后的,最终产品路径--可以在Build Settings参数的Per-confi…
2018-01-11 15:46 · iphone · 评论(0)
判断当前设备是否是64位设备
//判断当前设备是否是64位设备,也可以用这个方法判断是否是32位设备 - (BOOL)is64Bit { #if defined(__LP64__) && __LP64__ return YES; #else return NO; #endif }
2018-01-03 10:55 · iphone · 评论(0)
linker command failed with exit code 1
升级到Xcode8之后遇到文件冲突,错误如下: error: linker command failed with exit code 1 (use -v to see invocation) 是因为个某个文件中的某一变量或者某一方法名和其他某一文件的变量名或者方法有重复同名,解决方法如下 : 在Build Setting里面 NO Common Blocks 设置为NO 官方的解释是: In C, allocate even uninitialized global variables in the data section of the object file, rather than …
2017-05-12 19:39 · iphone · 评论(0)
华厦邓白氏码查询网址
话不多说,地址如下: https://www.dandb.com/search/?keyword=邓白氏码&country=CP&submit=SEARCH&type=coo&source=%2Finternational-credit-reports%2F
2015-10-23 10:58 · iphone · 评论(0)
获取手机所有安装的app
#include <objc/runtime.h> Class LSApplicationWorkspace_class = objc_getClass("LSApplicationWorkspace"); if (LSApplicationWorkspace_class) { NSObject* workspace = [LSApplicationWorkspace_class defaultWorkspace];;//[LSApplicationWorkspace_class performSelector:@selector(defaultWorkspace)]; if (worksp…
2015-05-07 11:09 · iphone · 评论(0)
关于JS与Native通信时,消息丢失的解决方案
加载一个隐藏的iframe来实现的,通过将iframe的src指定为一个特殊的URL // Javascript语言 // 通知iPhone UIWebView 加载url对应的资源 // url的格式为: gap:something function loadURL(url) { var iFrame; iFrame = document.createElement("iframe"); iFrame.setAttribute("src", url); iFrame.setAttribute("style", "display:none;"); iFrame.setAttribute("h…
2015-04-27 11:15 · iphone · 评论(0)
推送证书生成
生成pem步骤: 1.下载下来你配置好的推送证书aps_developer_identity.cer 文件。 2.转换 .cer 文件到 .pem 文件: openssl x509 -in aps_developer_identity.cer -inform der -out PushChatCert.pem 3.在把你“钥匙”推送证书导出成的.p12到.pem文件: openssl pkcs12 -nocerts -out PushChatKey.pem -in PushChatKey.p12 Enter Import Password: MAC verified OK Enter PEM…
2015-01-23 11:37 · iphone · 评论(0)
获取当前类中所有的方法
#import <objc/runtime.h> #import <objc/message.h> - (void)methods { unsigned int count; Method *methods = class_copyMethodList([self class], &count); for (int i = 0; i < count; i++) { Method method = methods[i]; SEL selector = method_getName(method); NSString *name = NSStringFromSelector(selector);…
2014-12-30 10:40 · iphone · 评论(0)
获取当前网络类型
// 0:无网络 1:2g 2:3g 3:4g 5:wifi +(NSInteger)getNetWorkInfo{ UIApplication *app=[UIApplicationsharedApplication]; NSArray *children = [[[app valueForKeyPath:@"statusBar"] valueForKeyPath:@"foregroundView"] subviews]; int type =0; for (id child in children) { if ([child isKindOfClass:NSClassFromString…
2014-12-19 14:23 · iphone · 评论(0)
oc调用CMD命令
- (NSString *)executeCommand: (NSString *)cmd { NSString *output = [NSString string]; FILE *pipe = popen([cmd cStringUsingEncoding: NSASCIIStringEncoding], "r+"); if (!pipe) return @""; char buf[1024]; while(fgets(buf, 1024, pipe)) { output = [output stringByAppendingFormat: @"%s", buf]; } pclose(p…
2014-12-19 14:16 · iphone · 评论(0)
PushMeBaby 发布证书推送失败
开发证书正常。切换到发布证书报错:SSLWrite(): -9806 0 原因如下: result = SSLSetPeerDomainName(context, "gateway.sandbox.push.apple.com", 30); 改为 result = SSLSetPeerDomainName(context, "gateway.push.apple.com", 22);//22表示gateway.push.apple.com地址的长度
2014-07-18 17:29 · iphone · 评论(0)