H5和原生交互不用卸载重装就更新H5代码的方法

        方法1>NSSet *types = [WKWebsiteDataStore allWebsiteDataTypes];
        NSDate *sinceDate = [NSDate dateWithTimeIntervalSince1970:0];
        [[WKWebsiteDataStore defaultDataStore]removeDataOfTypes:types forDataRecords:self.records    completionHandler:^{
            NSLog(@"清除record完成");
        }];

方法2>和前端测试的时候拼接一个时间戳

方法3>自己手动卸载finder里的缓存文件

猜你喜欢

转载自blog.csdn.net/cola_wh/article/details/106625384