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。
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);
时间: 2024-11-05 23:32:59