IOS各类问题
1、The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.
解决方法:
在Info.plist中添加
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
2、找不到cococapod添加的第三方框架
解决方法:
在项目的Target的里设置一下,添加cocoapods头文件目录:目录路径直接写:${SRCROOT},后边选择recursive。
注意:是在 User Header Search Paths 里添加,不是上面的 Header Search Paths.
3、添加自定义模板
在此路径下添加 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/Project Templates/iOS/Application/
4、<Error>: CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
在SDWebImageDecoder.m中添加:
if (!context) { if (unsupportedColorSpace) { CGColorSpaceRelease(colorspaceRef); } return image; } //after this call: CGContextRef context = CGBitmapContextCreate(NULL, width, height, CGImageGetBitsPerComponent(imageRef), 0, colorspaceRef,kCGBitmapByteOrderDefault | kCGImageAlphaPremultipliedFirst);
5、iTunes文件共享
在info.plist中添加Application supports iTunes file sharing,设置为YES。
6、多target,复制代码,再使用command跳转,索引会失效,比如在iPhone的代码有可能会跳到iPad。
6、