大晚上的终于把这东西处理提审了。难受得一匹。
xcode上传成功,但是app store connect一直没有构建版本,查一下账号对应的邮箱发现图上的错误反馈。搜了一遍报错信息 itm - 90809,按这篇文章中的命令搜了一遍,发现新升级的微信sdk 1.8.6 的ReadMe中包含UIWebView(病急乱投医),删除后再提交,依然如此。
后来又搜到一篇,在Xcode里面全局搜索UIWebView,发现cocos\ui\UIWebViewImpl-ios.mm里面就使用到了UIWebView。第一反应就是反正项目里没用上WebView,干脆删除了事。还好想到自己这半吊子压根不知道到时make文件怎么改,没办法,继续搜吧。
先搜到cocos论坛中Raz前辈的回复,覆盖了.mm文件:
/****************************************************************************
Copyright (c) 2014-2016 Chukong Technologies Inc.
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#include "platform/CCPlatformConfig.h"
// Webview not available on tvOS
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) && !defined(CC_TARGET_OS_TVOS)
#import <WebKit/WKWebView.h>
#import <WebKit/WKUIDelegate.h>
#import <WebKit/WKNavigationDelegate.h>
#include "ui/UIWebViewImpl-ios.h"
#include "renderer/CCRenderer.h"
#include "base/CCDirector.h"
#include "platform/CCGLView.h"
#include "platform/ios/CCEAGLView-ios.h"
#include "platform/CCFileUtils.h"
#include "ui/UIWebView.h"
@interface UIWebViewWrapper : NSObject
@property (nonatomic) std::function<bool(std::string url)> shouldStartLoading;
@property (nonatomic) std::function<void(std::string url)> didFinishLoading;
@property (nonatomic) std::function<void(std::string url)> didFailLoading;
@property (nonatomic) std::function<void(std::string url)> onJsCallback;
@property(nonatomic, readonly, getter=canGoBack) BOOL canGoBack;
@property(nonatomic, readonly, getter=canGoForward) BOOL canGoForward;
+ (instancetype)newWebViewWrapper;
- (void)setVisible:(bool)visible;
- (void)setBounces:(bool)bounces;
- (void)setOpacityWebView:(float)opacity;
- (float)getOpacityWebView;
- (void)setBackgroundTransparent;
- (void)setFrameWithX:(float)x y:(float)y width:(float)width height:(float)height;
- (void)setJavascriptInterfaceScheme:(const std::string &)scheme;
- (void)loadData:(const std::string &)data MIMEType:(const std::string &)MIMEType textEncodingName:(const std::string &)encodingName baseURL:(const std::string &)baseURL;
- (void)loadHTMLString:(const std::string &)string baseURL:(const std::string &)baseURL;
- (void)loadUrl:(const std::string &)urlString cleanCachedData:(BOOL) needCleanCachedData;
- (void)loadFile:(const std::string &)filePath;
- (void)stopLoading;
- (void)reload;
- (void)evaluateJS:(const std::string &)js;
- (void)goBack;
- (void)goForward;
- (void)setScalesPageToFit:(const bool)scalesPageToFit;
@end
@interface UIWebViewWrapper () <WKUIDelegate, WKNavigationDelegate>
@property(nonatomic, retain) WKWebView *wkWebView;
@property(nonatomic, copy) NSString *jsScheme;
@end
@implementation UIWebViewWrapper {
}
+ (instancetype) newWebViewWrapper {
return [[self alloc] init];
}
- (instancetype)init {
self = [super init];
if (self) {
self.wkWebView = nil;
self.shouldStartLoading = nullptr;
self