1⃣️ 访问HTTPS-SSL证书无效或者过期
- (void)webView:(WKWebView *)webView didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition, NSURLCredential * _Nullable))completionHandler {
if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) {
NSURLCredential * card = [[NSURLCredential alloc] initWithTrust:challenge.protectionSpace.serverTrust];
completionHandler(NSURLSessionAuthChallengeUseCredential,card);
}
}
2⃣️ Xcode 管理证书 更新证书
Finder前往文件夹:~/Library/MobileDevice/Provisioning Profiles
删除该文件夹下的所有文件,这时Xcode会从新下载最新的各种需要的证书,自动管理证书下的证书就更新了
3⃣️ Safari 输入 findmy://items 打开查找
4⃣️ 批量替换项目中字符串
grep -rl '查找要替换的字符串' 文件路径 | xargs sed -i "" "s/要替换的字符串/新的字符串/g"
grep -rl 'colorWithHexString' ./XpandaGoPodium/XpandaGo/ | xargs sed -i "" "s/colorWithHexString/colorWithHex/g"
5⃣️ 安装homebrew
使用github源安装及卸载
安装:/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
卸载:/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
使用国内镜像源安装及卸载 https://gitee.com/iamhefang/homebrew-install/commit/b379aa1da050ec29ba572fe228c5f19487664df9
安装:/bin/bash -c "$(curl -fsSL https://gitee.com/iamhefang/homebrew-install/raw/master/install.sh)"
卸载:/bin/bash -c "$(curl -fsSL https://gitee.com/iamhefang/homebrew-install/raw/master/uninstall.sh)"
6⃣️ ZYouSDKDemo.xcodeproj Building for iOS Simulator, but the linked and embedded framework 'TTNetworkManager.framework' was built for iOS
打开工程设置,Build Settings,搜索 Excludeed 关键字,找到 Excluded Source File Names,在其 Debug (也就是模拟器运行的配置)中添加这样的字段
Any iOS Simulator: xxx.framework yyy.framework
每个 framework 用空格隔开,再 command + shift + k,clean 一下,再编译。如果失败可以尝试重启 Xcode 再试