从当前项目看,大概过程分下面几步(可能三,四步大多不会遇到):
检测方法,可以查看.a 文件 framework等搜索不到的地方
1.打开终端 进去到项目目录
2.输入命令 : grep -r UIWebView .//注意有空格和一个点
grep -r UIWebView .
# 把文件目录下的 不管是第三方还是什么的全部删除了 . 删除保平安 一般这种api 大部分也是过时的
一.搜索项目里的UIWebView并删除干净
1.保险起见注释也尽量不要留了或者实在想保留注释对照“UIWebview”用“旧Webview”来替换
2.需要相应替换成WKWebView看这里;
经历过上面两步希望可见的都被干掉了.
二:第一步也可以看到AFNetworking中包含UIWebView 的分类,MJRefresh里如果有注释升级到最新版
去掉含有UIWebView 的分类
git上给了答案
// 把原有替换成下面这样
pod 'AFNetworking', :subspecs => ['Reachability', 'Serialization', 'Security', 'NSURLSession']
1.以上操作结束后,项目会报找不到AFNetWorking文件名的错。
2.使用#import
继续使用终端命令进行检测,如果没有结果,就代表成功了.
MJRefresh升级:
pod 'MJRefresh'一下安装最新版
pod update MJRefresh
当前最新版
Installing MJRefresh 3.4.3 (was 3.1.14.1)
三.隐藏文件.svn里的.svn-base里还能搜索到
./.svn/pristine/69/697d54d65678a7ed32611eacd37204cc1d3c55c8.svn-base: * [UIWebView01-The drop-down refresh](#UIWebView01-The_drop-down_refresh)
./.svn/pristine/69/697d54d65678a7ed32611eacd37204cc1d3c55c8.svn-base:* `UIScrollView`、`UITableView`、`UICollectionView`、`UIWebView`
./.svn/pristine/69/697d54d65678a7ed32611eacd37204cc1d3c55c8.svn-base:## UIWebView01-The drop-down refresh
./.svn/pristine/02/023590b8889ac1c807b83e54dfbe97d45e42d131.svn-base:// UIWebView+AFNetworking.h
./.svn/pristine/02/023590b8889ac1c807b83e54dfbe97d45e42d131.svn-base: This category adds methods to the UIKit framework's `UIWebView` class. The methods in this category provide increased control over the request cycle, including progress monitoring and success / failure handling.
./.svn/pristine/02/023590b8889ac1c807b83e54dfbe97d45e42d131.svn-base:@interface UIWebView (AFNetworking)
./.svn/pristine/d0/d068230d62e8e87b0595f8b9fd89ba21d1a841e7.svn-base: UIWebView * callWebview = [[UIWebView alloc] init];
./.svn/pristine/be/be4a144707cbc183f6438564ba8327ccc131271e.svn-base: #import "UIWebView+AFNetworking.h"
./.svn/pristine/bc/bc11c11717a8e95804fca5fc413a0196435627a5.svn-base: 8958F2453EEBAF71BFEBD78FB48986EC /* UIWebView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 91A6E7FB4EB09CDE55E06A20D0927842 /* UIWebView+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; };
./.svn/pristine/bc/bc11c11717a8e95804fca5fc413a0196435627a5.svn-base: A7F7FDCD36E2DD8D8E346DB19452CC03 /* UIWebView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = EC7DB83803F23286B9F0CF31E4D72BA9 /* UIWebView+AFNetworking.m */; };
./.svn/pristine/bc/bc11c11717a8e95804fca5fc413a0196435627a5.svn-base: 91A6E7FB4EB09CDE55E06A20D0927842 /* UIWebView+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIWebView+AFNetworking.h"; path = "UIKit+AFNetworking/UIWebView+AFNetworking.h"; sourceTree = ""; };
./.svn/pristine/bc/bc11c11717a8e95804fca5fc413a0196435627a5.svn-base: EC7DB83803F23286B9F0CF31E4D72BA9 /* UIWebView+AFNetworking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIWebView+AFNetworking.m"; path = "UIKit+AFNetworking/UIWebView+AFNetworking.m"; sourceTree = ""; };
./.svn/pristine/bc/bc11c11717a8e95804fca5fc413a0196435627a5.svn-base: 91A6E7FB4EB09CDE55E06A20D0927842 /* UIWebView+AFNetworking.h */,
./.svn/pristine/bc/bc11c11717a8e95804fca5fc413a0196435627a5.svn-base: EC7DB83803F23286B9F0CF31E4D72BA9 /* UIWebView+AFNetworking.m */,
./.svn/pristine/bc/bc11c11717a8e95804fca5fc413a0196435627a5.svn-base: 8958F2453EEBAF71BFEBD78FB48986EC /* UIWebView+AFNetworking.h in Headers */,
./.svn/pristine/bc/bc11c11717a8e95804fca5fc413a0196435627a5.svn-base: A7F7FDCD36E2DD8D8E346DB19452CC03 /* UIWebView+AFNetworking.m in Sources */,
./.svn/pristine/73/735d42796ae2ec11cc3ebee5846993cf8e70b712.svn-base: 8958F2453EEBAF71BFEBD78FB48986EC /* UIWebView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C0C245A5B945EF9E239701ABC1BAF1B /* UIWebView+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; };
./.svn/pristine/73/735d42796ae2ec11cc3ebee5846993cf8e70b712.svn-base: A7F7FDCD36E2DD8D8E346DB19452CC03 /* UIWebView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 6CF16E29F8925D42064BEBA38B547BAE /* UIWebView+AFNetworking.m */; };
./.svn/pristine/73/735d42796ae2ec11cc3ebee5846993cf8e70b712.svn-base: 1C0C245A5B945EF9E239701ABC1BAF1B /* UIWebView+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIWebView+AFNetworking.h"; path = "UIKit+AFNetworking/UIWebView+AFNetworking.h"; sourceTree = ""; };
./.svn/pristine/73/735d42796ae2ec11cc3ebee5846993cf8e70b712.svn-base: 6CF16E29F8925D42064BEBA38B547BAE /* UIWebView+AFNetworking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIWebView+AFNetworking.m"; path = "UIKit+AFNetworking/UIWebView+AFNetworking.m"; sourceTree = ""; };
./.svn/pristine/73/735d42796ae2ec11cc3ebee5846993cf8e70b712.svn-base: 1C0C245A5B945EF9E239701ABC1BAF1B /* UIWebView+AFNetworking.h */,
./.svn/pristine/73/735d42796ae2ec11cc3ebee5846993cf8e70b712.svn-base: 6CF16E29F8925D42064BEBA38B547BAE /* UIWebView+AFNetworking.m */,
./.svn/pristine/73/735d42796ae2ec11cc3ebee5846993cf8e70b712.svn-base: 8958F2453EEBAF71BFEBD78FB48986EC /* UIWebView+AFNetworking.h in Headers */,
./.svn/pristine/73/735d42796ae2ec11cc3ebee5846993cf8e70b712.svn-base: A7F7FDCD36E2DD8D8E346DB19452CC03 /* UIWebView+AFNetworking.m in Sources */,
./.svn/pristine/10/10cd261cc141bba69af65b53c882d66d1237c1e1.svn-base: // We are unable to get textField object while keyboard showing on UIWebView's textField. (Bug ID: #11)
./.svn/pristine/10/10cd261cc141bba69af65b53c882d66d1237c1e1.svn-base: //Commented due to #56. Added all the conditions below to handle UIWebView's textFields. (Bug ID: #56)
./.svn/pristine/10/10cd261cc141bba69af65b53c882d66d1237c1e1.svn-base: // We are unable to get textField object while keyboard showing on UIWebView's textField. (Bug ID: #11)
./.svn/pristine/09/093e7306b5be5d22325a8ea1d9a6447b5675640f.svn-base:// UIWebView+AFNetworking.m
./.svn/pristine/09/093e7306b5be5d22325a8ea1d9a6447b5675640f.svn-base:#import "UIWebView+AFNetworking.h"
./.svn/pristine/09/093e7306b5be5d22325a8ea1d9a6447b5675640f.svn-base:@interface UIWebView (_AFNetworking)
./.svn/pristine/09/093e7306b5be5d22325a8ea1d9a6447b5675640f.svn-base:@implementation UIWebView (_AFNetworking)
./.svn/pristine/09/093e7306b5be5d22325a8ea1d9a6447b5675640f.svn-base:@implementation UIWebView (AFNetworking)
./.svn/pristine/52/52ffe4a425e4aa391f5cb75b93e2ab94e4612956.svn-base: 8958F2453EEBAF71BFEBD78FB48986EC /* UIWebView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 0BD2FB4F2F7364B263FC18C2C495011B /* UIWebView+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; };
./.svn/pristine/52/52ffe4a425e4aa391f5cb75b93e2ab94e4612956.svn-base: A7F7FDCD36E2DD8D8E346DB19452CC03 /* UIWebView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 514AFAB846C27776C3FB7E9F81425405 /* UIWebView+AFNetworking.m */; };
./.svn/pristine/52/52ffe4a425e4aa391f5cb75b93e2ab94e4612956.svn-base: 0BD2FB4F2F7364B263FC18C2C495011B /* UIWebView+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIWebView+AFNetworking.h"; path = "UIKit+AFNetworking/UIWebView+AFNetworking.h"; sourceTree = ""; };
./.svn/pristine/52/52ffe4a425e4aa391f5cb75b93e2ab94e4612956.svn-base: 514AFAB846C27776C3FB7E9F81425405 /* UIWebView+AFNetworking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIWebView+AFNetworking.m"; path = "UIKit+AFNetworking/UIWebView+AFNetworking.m"; sourceTree = ""; };
./.svn/pristine/52/52ffe4a425e4aa391f5cb75b93e2ab94e4612956.svn-base: 0BD2FB4F2F7364B263FC18C2C495011B /* UIWebView+AFNetworking.h */,
./.svn/pristine/52/52ffe4a425e4aa391f5cb75b93e2ab94e4612956.svn-base: 514AFAB846C27776C3FB7E9F81425405 /* UIWebView+AFNetworking.m */,
./.svn/pristine/52/52ffe4a425e4aa391f5cb75b93e2ab94e4612956.svn-base: 8958F2453EEBAF71BFEBD78FB48986EC /* UIWebView+AFNetworking.h in Headers */,
./.svn/pristine/52/52ffe4a425e4aa391f5cb75b93e2ab94e4612956.svn-base: A7F7FDCD36E2DD8D8E346DB19452CC03 /* UIWebView+AFNetworking.m in Sources */,
./.svn/pristine/e6/e641f0b7a5fbce720561df66ed4b86d2938a76b0.svn-base: 8958F2453EEBAF71BFEBD78FB48986EC /* UIWebView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 4441A0285493E249CEB04EE9013D5DC1 /* UIWebView+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; };
./.svn/pristine/e6/e641f0b7a5fbce720561df66ed4b86d2938a76b0.svn-base: A7F7FDCD36E2DD8D8E346DB19452CC03 /* UIWebView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D40D1C3FFB6C79E5438BDBF22606730 /* UIWebView+AFNetworking.m */; };
./.svn/pristine/e6/e641f0b7a5fbce720561df66ed4b86d2938a76b0.svn-base: 4441A0285493E249CEB04EE9013D5DC1 /* UIWebView+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIWebView+AFNetworking.h"; path = "UIKit+AFNetworking/UIWebView+AFNetworking.h"; sourceTree = ""; };
./.svn/pristine/e6/e641f0b7a5fbce720561df66ed4b86d2938a76b0.svn-base: 9D40D1C3FFB6C79E5438BDBF22606730 /* UIWebView+AFNetworking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIWebView+AFNetworking.m"; path = "UIKit+AFNetworking/UIWebView+AFNetworking.m"; sourceTree = ""; };
./.svn/pristine/e6/e641f0b7a5fbce720561df66ed4b86d2938a76b0.svn-base: 4441A0285493E249CEB04EE9013D5DC1 /* UIWebView+AFNetworking.h */,
./.svn/pristine/e6/e641f0b7a5fbce720561df66ed4b86d2938a76b0.svn-base: 9D40D1C3FFB6C79E5438BDBF22606730 /* UIWebView+AFNetworking.m */,
./.svn/pristine/e6/e641f0b7a5fbce720561df66ed4b86d2938a76b0.svn-base: 8958F2453EEBAF71BFEBD78FB48986EC /* UIWebView+AFNetworking.h in Headers */,
./.svn/pristine/e6/e641f0b7a5fbce720561df66ed4b86d2938a76b0.svn-base: A7F7FDCD36E2DD8D8E346DB19452CC03 /* UIWebView+AFNetworking.m in Sources */,
./.svn/pristine/2c/2c31c5e2c1f278bfb73bba4c37e4be132a75ae3e.svn-base: UIWebView * callWebview = [[UIWebView alloc] init];
./.svn/pristine/8d/8d59dc373b9d39940d05557b76eb3c9b4e45602f.svn-base:link ../../../AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.h
Binary file ./.svn/wc.db matches
./Pods/MJRefresh/README.md: * [UIWebView01-The drop-down refresh](#UIWebView01-The_drop-down_refresh)
./Pods/MJRefresh/README.md:* `UIScrollView`、`UITableView`、`UICollectionView`、`UIWebView`
./Pods/MJRefresh/README.md:## UIWebView01-The drop-down refresh
Binary file ./TruckDispatcher.xcworkspace/xcuserdata/liuffsunny.xcuserdatad/UserInterfaceState.xcuserstate matches
Binary file ./TruckDispatcher.xcworkspace/xcuserdata/zhonghua.xcuserdatad/UserInterfaceState.xcuserstate matches
如下图:是这个隐藏文件惹的祸,因为我们项目里用的是git管理,所以svn应该是误操作加上的也会跟踪代码的修改,所以我删除的时候有1788个,删除后项目一切正常.
四.继续检测发现如下还有两个存在的地方
涉及到的问题就是git中如何忽略project.xcworkspace/xcuserdata/username.xcuserdatad/userinterfacestate.xcuserstate文件
1.你是否写了.gitignore文件。Git中有一个.gitignore配置文件,在这个文件中可以设置被忽略的文件,假如你在工程中写了一个小的脚本,只想自己使用而不用提交到远端进行管理,那你就可以在.gitignore文件中进行配置。我们一般只对某一个特定的工程进行一些文件的忽略,所以只需要在工程中的代码目录下添加这个文件即可。在你确定有这个文件并且加入了下面的忽略信息,那就需要清理缓存了。
*.xcuserstate
project.xcworkspace
xcuserdata
UserInterfaceState.xcuserstate
project.xcworkspace/
xcuserdata/
UserInterface.xcuserstate
2.因为project.xcworkspace/xcuserdata/username.xcuserdatad/userinterfacestate.xcuserstate文件已经出现,那么我们就要清理这个缓存文件才能避免这个文件每次都出现,清理这个缓存,你可以用命令行
git rm --cached [YourProjectName].xcodeproj/project.xcworkspace/xcuserdata/[YourUsername].xcuserdatad/UserInterfaceState.xcuserstate
或者直接找到你的工程目录project.xcworkspace,由于project.xcworkspace是一个包文件,直接显示包内容,找到UserInterfaceState.xcuserstate移到废纸篓就行了。(我简单粗暴的先用的这个)
然后打开把你的修改,commit,push。修改的过程中,最好把xcode退出,避免你删除UserInterfaceState.xcuserstate之后又会生产,造成忽略失败。
走到这里,再次去检测,终于没有了,完成.