Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6077685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:44:55+00:00 2026-05-23T10:44:55+00:00

My app has a UIWebView component that calls Obj-c functions using ‘webView:shouldStartLoadWithRequest:navigationType:’ I parse

  • 0

My app has a UIWebView component that calls Obj-c functions using ‘webView:shouldStartLoadWithRequest:navigationType:’ I parse the request here then call the required Obj-c code.

What I would like to do next is return a value back to the Webview.. e.g. status, message etc..

I’ve tried a number of solutions at the moment but nothing seems to work. I’m not posting code right now as it’s basic enough.

One attempt worth mentioning is using ‘stringByEvaluatingJavascriptFromString’ that would set global variables in the UIWebView page. I then tried to run an infinite loop (with timeout) that would watch for a change in the global variable. Javascript would then know that a response has come back from the Objective-c function. This doesn’t seem to work as the ‘infinite loop’ doesn’t seem to be blocking the javascript thread.

Has anybody come across this problem before.

It looks like there’s a function ‘windowScriptObject’ that may allow me direct access to the UIWebViews script objects. Pity it’s not available in iOS, is anybody aware of workarounds for this. Looking into it now..

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T10:44:56+00:00Added an answer on May 23, 2026 at 10:44 am

    So i’ve decided to go down the callback route.

    I’ll make a call to execute JS code in Obj-C then do nothing in the browser. The next piece of code will be executed in the callback function that is called from Objective-c one all it’s work is done.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an iPad app that receives data using UDP sockets. And it has
I am writing an iPad app that has a UIWebView and an activity indicator
My app has UIWebView that loads a document with links. I would like to
Let's say I have an iPhone app that has a UIWebView. Is it possible
I am writing a app that has a UIWebView that displays a HTML5 page.
My iPhone app has a UIWebView that loads a page containing javascript that sets
My app's main view has a uiwebview. It is white for a split second
My app has some table cells that vary in height. The cells can also
I have an app that I load in a uiwebview, it first load a
Our iOS app has a Web View that is rendering pages from file: URLs.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.