[
https://issues.apache.org/jira/browse/CB-3530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14207768#comment-14207768
]
Pu Wang commented on CB-3530:
-----------------------------
I am using the latest cordova(3.5.0-0.2.7), I am still having this issue, and
finally I found that the webview.request.absoluteString is always the root path
of my website.
And I fix it by update the CDVWebViewDelegate.m, the method: - (BOOL)
request:(NSURLRequest*)newRequest
isEqualToRequestAfterStrippingFragments:(UIWebView*)webview,
changed the line:
{code:none}
*NSTring* originalRequestUrl = [originalRequest.URL absoluteString]; *
{code}
to :
{code:none}
*NString& originalRequestUrl = [self evalForCurrentURL absoluteString];*
{code}
I don't known why that the webview.request.URL is always the root of my website
after navigate with JQM , but the method evalForCurrentURL will get the correct
current url.
Please review and check if the current fix really works.
> PhoneGap app crashes on iOS with error "CDVWebViewDelegate: Navigation
> started when state=1" (for navigation to an anchor on the same page)
> -------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CB-3530
> URL: https://issues.apache.org/jira/browse/CB-3530
> Project: Apache Cordova
> Issue Type: Bug
> Components: iOS, Plugin InAppBrowser
> Affects Versions: 2.7.0
> Environment: Mac OSX 10.8.3, XCode 4.6.2, iOS 6.1
> Reporter: Montyleena
> Assignee: Shazron Abdullah
> Labels: crash, iOS,, inappbrowser,
> Fix For: 3.0.0
>
> Attachments: 2013-07-08.crash, 2013-07-08.crash
>
>
> I have a PhoneGap app on iOS which was working fine with PhoneGap 2.3.0 but
> crashes with 2.7.0 with the following error:
> 2013-05-02 10:08:13.214 App[8896:c07] CDVWebViewDelegate: Navigation started
> when state=1
> 2013-05-02 10:08:13.215 App[8896:c07] Failed to load webpage with error:
> (null)
> The problem is:
> CDVWebViewDelegate.m: shouldStartLoadWithRequest() function: In switch case,
> default: error code is being passed as nil
> and in CDVInAppBrowser.m: didFailLoadWithError() function,
> error.localizedDescription is being referenced, which causes a crash as error
> object is nil.
> For now, i added a check in the above function to put default values for
> error code if the error object is nil. I hope this crash is fixed in the next
> PhoneGap release.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]