Hi,

Please check your cocoapods version. Version 0.39.0 should work. To check the 
cocoapods version:

$ pod –version

Our QA encountered this issue when update cocoapods version is 1.0.0. To 
install the specific version of cocoapods

$ sudo gem install cocoapods –v 0.39.0

BR
Belem

From: rejeb zorgani [mailto:[email protected]]
Sent: Monday, May 30, 2016 6:48 PM
To: Zhang, Belem <[email protected]>; 
[email protected]
Subject: Re: [Crosswalk-help] please help : crosswalk webview IOS

Hello,
thanks for your answer, but I have this error when I try to create my project 
with crosswalk-app

crosswalk-app create org.com.test
  + Copying app template from ...node_modules/crosswalk-app-tools/app-template
  + Loading 'ios' platform backend
  + Clone project [done] Cloned.
*** ERROR: 
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin15/rbconfig.rb:213:
 warning: Insecure world writable dir /Users/user/bin/Sencha/Cmd/6.1.2.15 in 
PATH, mode 040777
Analyzing dependencies
[!] The dependency `crosswalk-ios (from `../`)` is not used in any concrete 
target.

  + Logfiles at 
/var/folders/yg/wnmtnpr52yv7zfffrkgffj4h0000gn/T/crosswalk-app-tools-org.com.test

Thanks in advance

Le Lundi 30 mai 2016 4h45, "Zhang, Belem" 
<[email protected]<mailto:[email protected]>> a écrit :

Hi,

We support cordova 
plugins<https://crosswalk-project.org/documentation/ios/cordova_plugin_support.html>
 but don’t support cordova plugin add cordova-plugin-crosswak-webview for iOS 
platform, please follow https://crosswalk-project.org/documentation/ios.html to 
create Crosswalk for iOS apps and add Cordova Plugin APIs.

BR
Belem

From: Crosswalk-help 
[mailto:[email protected]] On Behalf Of rejeb 
zorgani
Sent: Monday, May 30, 2016 4:01 AM
To: 
[email protected]<mailto:[email protected]>
Subject: [Crosswalk-help] please help : crosswalk webview IOS

Hello,
any person arrive to add crosswalk webview in ios with objective c ?
for a while I try but without results.

all my steps

cordova create PocIOS com.xyz.pocios PocIOS
cordova platform add android
cordova platform add ios
cordova plugin add cordova-plugin-crosswak-webview

I add some lines inside MainViewController.h

#import <WebKit/WebKit.h>
#import <UIKit/UIKit.h>


@interface MainViewController : CDVViewController <WKScriptMessageHandler, 
WKScriptMessageHandler, WKNavigationDelegate, WKUIDelegate> {
    IBOutlet WKWebView *myWebview;
}

I add some other lines inside 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:@"IosPoc"];
    theConfiguration.userContentController = controller;

    //WKWebView *myWebview = [[WKWebView alloc] initWithFrame:self.view.bounds 
configuration:theConfiguration];

    NSURL *myURL = [NSURL URLWithString:@"https://www.google.com/";];
    NSURLRequest *myRequest = [NSURLRequest requestWithURL:myURL];
    [myWebview loadRequest:myRequest];
    [self.view addSubview:myWebview];

}

-(void)webView:(WKWebView *)webView didStartProvisionalNavigation: 
(WKNavigation *)navigation {

}

- (void)webView:(WKWebView *)webView didFinishNavigation: (WKNavigation 
*)navigation{

}

-(void)webView:(WKWebView *)webView didFailNavigation: (WKNavigation 
*)navigation withError:(NSError *)error {

}

- (void)userContentController:(WKUserContentController *)userContentController
      didReceiveScriptMessage:(WKScriptMessage *)message {
    NSDictionary *sentData = (NSDictionary *)message.body;
    NSString *messageString = sentData[@"message"];
    NSLog(@"Message received: %@", messageString);
}

For information, I don't have error message or something, everything is ok.

Then I build my project

cordova build ios

navigator.userAgent
"Mozilla/5.0 (iPhone; CPU iPhone OS 9_3 like Mac OS X) AppleWebKit/601.1.46 
(KHTML, like Gecko) Mobile/13E230 (140227893095872)"

any help ?

thanks in advance



_______________________________________________
Crosswalk-help mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help

Reply via email to