cocos2d-lua 3.14提审itm - 90809 UIWebView处理

博主在晚上传送cocos2d-lua 3.14版本到App Store时遇到itm - 90809错误,问题源于UIWebView。尝试删除微信SDK中的UIWebView引用无效,后发现在cocos源码的UIWebViewImpl-ios.mm文件中使用了UIWebView。由于项目未实际使用WebView,博主选择注释掉相关代码以通过提审。尽管面临编译错误,最终通过注释掉`_impl->setBounces(bounces);`解决了问题。若有人了解正确处理方式,博主期待留言交流。此外,官方3.17.2版本提供了处理方案,但由于结构差异,博主未采纳。
摘要由CSDN通过智能技术生成

大晚上的终于把这东西处理提审了。难受得一匹。
提审反馈
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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值