Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3BB2A200C2B for ; Thu, 16 Feb 2017 00:32:47 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 3A32F160B70; Wed, 15 Feb 2017 23:32:47 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 824DA160B5E for ; Thu, 16 Feb 2017 00:32:46 +0100 (CET) Received: (qmail 94011 invoked by uid 500); 15 Feb 2017 23:32:45 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 94000 invoked by uid 99); 15 Feb 2017 23:32:45 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Feb 2017 23:32:45 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 2E306C09B6 for ; Wed, 15 Feb 2017 23:32:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.199 X-Spam-Level: X-Spam-Status: No, score=-1.199 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id m6YXUUStMjzj for ; Wed, 15 Feb 2017 23:32:44 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 3586B5FB49 for ; Wed, 15 Feb 2017 23:32:43 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 50605E0570 for ; Wed, 15 Feb 2017 23:32:42 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id A3FAD2411F for ; Wed, 15 Feb 2017 23:32:41 +0000 (UTC) Date: Wed, 15 Feb 2017 23:32:41 +0000 (UTC) From: "jcesarmobile (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-12459) network-information and device plugins cause deviceready to not fire on cordova-ios 4+ MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 15 Feb 2017 23:32:47 -0000 [ https://issues.apache.org/jira/browse/CB-12459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15868811#comment-15868811 ] jcesarmobile commented on CB-12459: ----------------------------------- Have you ever tried what I told you on Slack? To run javascript in your webview you only have to use {code} [self.commandDelegate evalJs:@"your javascript here"]; {code} You don't need a reference to the webview, you just have to use that code from a plugin, not from the MainViewController, you should NEVER edit the Objective-C classes from the Cordova project, and of course, you should not hijack the delegates, you don't need to do it neither. If for some reason you still want to get the webview reference when the app finish loading, looking into the link Shazron told you on Slack you can see this: https://github.com/apache/cordova-ios/blob/master/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewNavigationDelegate.m#L67 The delegate is sending a notification when Cordova finish loading and passing the webview on it, you can listen for this notification on your plugin class and use the webview (casting it to UIWebView as it's an UIView now) > network-information and device plugins cause deviceready to not fire on cordova-ios 4+ > -------------------------------------------------------------------------------------- > > Key: CB-12459 > URL: https://issues.apache.org/jira/browse/CB-12459 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Device, Plugin Network Information > Affects Versions: cordova-ios@4.3.1 > Environment: Phonegap cli version 6.4.3, cordova cli 6.5.0, cordova platform ios 4.3.1 > Reporter: Mark > Assignee: jcesarmobile > > installing either of these 2 plugins results in an app deviceready event not firing. It also results in the didFinishLaunchingWithOptions delegates not firing. > I used a bare skeleton of an app, but executing only these commands : > phonegap create test com.test "Test" > cd test > cordova platform add ios > cordova plugin add cordova-plugin-network-information > I edit the MainViewController.h file and add the protocol to the declaration : > MainViewController implements CDVViewController > I edit MainViewController.m and simply add the method definition : > - (void)webViewDidFinishLoad:(UIWebView *)webView { > > [super webViewDidFinishLoad:theWebView]; > } > I use XCode (7+) to install the app and run it on any iphone device and the deviceready event never fires. -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org For additional commands, e-mail: issues-help@cordova.apache.org