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

  • Home
  • SEARCH
  • 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 7711487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T01:23:16+00:00 2026-06-01T01:23:16+00:00

I want to integrate a full HTML framework (ie HTML/CSS/JavaScript) inside an iOS app

  • 0

I want to integrate a full HTML framework (ie HTML/CSS/JavaScript) inside an iOS app and make the UIWebView in charge of running the HTML content being able to communicate with the rest of the native Objective-C source code.

Direction 1: from Objective-C to HTML inside a UIWebView

The way to make the rest of the source send messages to the HTML content is pretty straightforward: i can just call stringByEvaluatingJavaScriptFromString: on the Objective-C side and implement JavaScript methods the right way.

Direction 2: from HTML inside a UIWebView to Objective-C

This is the way I can’t really figure out. My only idea so far is to make my app a local web server and make the HTML request stuff to it. But I have no idea how to do that although I suppose it can be bone as I believe apps such as Things, VLC or 1Password might use this kind of features.

Any idea to make this direction 2 work or any new perspective to make events inside HTML content being sent to Objective-C code is welcome.

  • 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-06-01T01:23:18+00:00Added an answer on June 1, 2026 at 1:23 am

    I have done this using jQuery and UIWebViewDelegate:

    JavaScript (jQuery mobile):

    $("#bloodType").change(function() {
        url = $("#bloodType option:selected").text();
        url = "donordialog:bloodTypeChanged(" + url + ")";
        window.location = url;
    });
    

    So, the resulting URL looks like: donordialog:bloodTypeChanged(typeAB-)

    In my objc code:

    -(BOOL) webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
    {
        NSURL *URL = [request URL];
        if ([[URL scheme] isEqualToString:@"donordialog"])
        {
            // now we need to figure out the function part
            NSString *functionString = [URL resourceSpecifier];
    
            if ([functionString hasPrefix:@"bloodTypeChanged"])
            {
                // the blood type has changed, now do something about it.
                NSString *parameter = [functionString stringByReplacingOccurrencesOfString:@"bloodTypeChanged" withString:@""];
    
                // remove the '(' and then the ')'
                parameter = [parameter stringByReplacingOccurrencesOfString:@"(" withString:@""];
                parameter = [parameter stringByReplacingOccurrencesOfString:@")" withString:@""];
    
                // log the paramter, as I don't know what to do with it right now
                NSLog(@"%@", parameter);
            }
    
            return NO;
        }
    
        return YES;
    }
    

    This code was copied verbatim from a project I am currently working on, and can verify that this works.

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

Sidebar

Related Questions

I want to integrate photologue with my Django app and use it to display
We have a proprietary framework and now we want to integrate the authentication by
I want to integrate full-text search into a .NET application with [Fluent] NHibernate-based data
I am trying to integrate jquery full calendar plugin.. And I want to disable
I want to integrate In-App billing in the free version of my game, to
I want to integrate Twitter in my iPhone App for getting some tweets of
I want integrate CPD (Copy-Paste-Detection) to my iOS project. I read about it here
I want to integrate some existing Perl code with ASP.NET. I see plenty examples
I want to integrate the MySQL fulltext search function in my PHP site. I
i want to integrate maps using map kit in iphone, and i am successful

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.