Hello,App crash when I run it.int retVal = UIApplicationMain(argc, argv, nil,
@"AppDelegate");
step by step my project cordova create Test fr.org.test Testcd Test codova
platform add ioscordova platform add androidcordova plugin add
cordova-plugin-wkwebview-enginecordova build
I add this code in MainViewController.h
#import <UIKit/UIKit.h>#import <WebKit/WebKit.h>
@interface MainViewController : CDVViewController <WKScriptMessageHandler>{
IBOutlet WKWebView *myWebView;}
@end
then I add this code in MainViewController.m
- (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup
after loading the view from its nib. WKWebViewConfiguration
*theConfiguration = [[WKWebViewConfiguration alloc] init];
WKUserContentController *controller = [[WKUserContentController alloc] init];
[controller addScriptMessageHandler:self name:@"Test"];
theConfiguration.userContentController = controller; NSString *urlString
= @"https://www.google.com/"; NSURL *url = [NSURL URLWithString:urlString];
NSURLRequest *urlRequest = [NSURLRequest requestWithURL:url]; [myWebView
loadRequest:urlRequest]; [self.view addSubview:myWebView]; }
- (void)userContentController:(WKUserContentController *)userContentController
didReceiveScriptMessage:(WKScriptMessage *)message { NSDictionary
*sentData = (NSDictionary *)message.body; NSString *messageString =
sentData[@"message"]; NSLog(@"Test => Message received: %@",
messageString);}-(void)myWebView:(WKWebView *)myWebView
didStartProvisionalNavigation: (WKNavigation *)navigation { }
- (void)myWebView:(WKWebView *)myWebView didFinishNavigation: (WKNavigation
*)navigation{ }
-(void)myWebView:(WKWebView *)myWebView didFailNavigation: (WKNavigation
*)navigation withError:(NSError *)error { }
// show webview in full screen- (void)viewDidLayoutSubviews { myWebView.frame
= CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height);}
I add webview to MainViewController.xib
any help or exemple work correctly please thanks in advance
Le Lundi 20 juin 2016 2h45, "Dong, Jonathan" <[email protected]> a
écrit :
#yiv2031528078 #yiv2031528078 -- _filtered #yiv2031528078
{font-family:Helvetica;panose-1:2 11 6 4 2 2 2 2 2 4;} _filtered #yiv2031528078
{font-family:宋体;panose-1:2 1 6 0 3 1 1 1 1 1;} _filtered #yiv2031528078
{panose-1:2 4 5 3 5 4 6 3 2 4;} _filtered #yiv2031528078
{font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;} _filtered #yiv2031528078
{panose-1:2 1 6 0 3 1 1 1 1 1;}#yiv2031528078 #yiv2031528078
p.yiv2031528078MsoNormal, #yiv2031528078 li.yiv2031528078MsoNormal,
#yiv2031528078 div.yiv2031528078MsoNormal
{margin:0in;margin-bottom:.0001pt;font-size:12.0pt;}#yiv2031528078 a:link,
#yiv2031528078 span.yiv2031528078MsoHyperlink
{color:#0563C1;text-decoration:underline;}#yiv2031528078 a:visited,
#yiv2031528078 span.yiv2031528078MsoHyperlinkFollowed
{color:#954F72;text-decoration:underline;}#yiv2031528078
span.yiv2031528078EmailStyle17 {color:#1F497D;}#yiv2031528078
.yiv2031528078MsoChpDefault {font-size:10.0pt;} _filtered #yiv2031528078
{margin:1.0in 1.25in 1.0in 1.25in;}#yiv2031528078 div.yiv2031528078WordSection1
{}#yiv2031528078 Hi Rejeb, Thanks for using Crosswalk for iOS. As far as I
can remember, we use the WKWebView’s UA instead of injecting any Crosswalk
related contents, because on iOS the XWalkView is just a simple wrapper of
WKWebView, we have no controls to the features provided by the web engine, so
we don’t follow the release schedule as what we do for Android. As for the
ES6 feature support, we are exactly the same as the abilities that WKWebView
provides, I think you can refer to
thehttps://kangax.github.io/compat-table/es6/ or other ES6 capabilities test
sites for more details. From: Crosswalk-help
[mailto:[email protected]]On Behalf Of rejeb
zorgani
Sent: Sunday, June 19, 2016 11:07 PM
To: [email protected]
Subject: [Crosswalk-help] help : crosswalk webview for ios Hello when I run
for android I have : "Mozilla/5.0 (Linux; Android 5.0; SM-G900F Build/LRX21T)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116
Crosswalk/18.48.477.13 Mobile Safari/537.36" when i run for ios I have :
"Mozilla/5.0 (iPhone; CPU iPhone OS 9_3 like Mac OS X) AppleWebKit/601.1.46
(KHTML, like Gecko) Mobile/13E230 (140588519385568)" Why I don't see
Crosswalk/18.48.477.13 for IOS (navigator.userAgent) ? Do you think ECMAScript
6 is compatible with crosswalk for IOS,
_______________________________________________
Crosswalk-help mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help
_______________________________________________
Crosswalk-help mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help