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 7850007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:42:49+00:00 2026-06-02T18:42:49+00:00

I am building an iOS app using MonoTouch and attempting to implement a custom

  • 0

I am building an iOS app using MonoTouch and attempting to implement a custom NSUrlProtocol.

When I register my own protocol implementation, I get the following error:

WebKit discarded an uncaught exception in the
webView:decidePolicyForNavigationAction:request:frame:decisionListener:
delegate: * -canInitWithRequest: only
defined for abstract class. Define
-[Foo.Network.NetworkServices+TestProtocol canInitWithRequest:]!

Any thoughts on what could be causing this?

Here is the code:

//Registering the protocol    
NSUrlProtocol.RegisterClass(new Class(typeof(TestProtocol)));

public class TestProtocol : NSUrlProtocol
{
    public TestProtocol ()
    {
        this.Client = new TestProtocolClient(); 
    }       

    public override bool CanInitWithRequest (NSUrlRequest request)
    {
        return true;
    }
}

public class TestProtocolClient : NSUrlProtocolClient
{
    public override void DataLoaded (NSUrlProtocol protocol, NSData data)
    {
    }

    public override void FailedWithError (NSUrlProtocol protocol, NSError error)
    {
    }

    public override void ReceivedResponse (NSUrlProtocol protocol, NSUrlResponse response, NSUrlCacheStoragePolicy policy)
    {
    }

    public override void Redirected (NSUrlProtocol protocol, NSUrlRequest redirectedToEequest, NSUrlResponse redirectResponse)
    {
    }

    public override void CachedResponseIsValid (NSUrlProtocol protocol, NSCachedUrlResponse cachedResponse)
    {
    }

    public override void FinishedLoading (NSUrlProtocol protocol)
    {
    }

    public override void ReceivedAuthenticationChallenge (NSUrlProtocol protocol, NSUrlAuthenticationChallenge challenge)
    {
    }

    public override void CancelledAuthenticationChallenge (NSUrlProtocol protocol, NSUrlAuthenticationChallenge challenge)
    {
    }
}
  • 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-02T18:42:50+00:00Added an answer on June 2, 2026 at 6:42 pm

    The NSUrlProtocol support in MonoTouch is currently broken.

    It will be fixed in the next beta release (MonoTouch 5.3.3). There is also a sample available to show how it works (but it will obviously not work until MonoTouch 5.3.3 is out).

    Xamarin’s support can usually give you preview builds if it’s an urgent matter.

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

Sidebar

Related Questions

I'm using the following code within XCode, building for iOS with ARC enabled. Why
I'm diving into iOS development and am building my own alarm clock app to
I'm building an iOS app with PhoneGap. I'm using translate3d CSS animations to create
I'm building a custom RSS reader app with incorporated feed link view (UIWebView). Using
I am building an app for iOS 5 using ARC and I seem to
I am building an app in xcode using the Cordova/phonegap framework for ios which
I'm building an app using Phonegap and I'm using Urban Airship for iOS and
Currently I am building an app using phonegap for the Android and iOS systems.
I'm building a view in my iOS app with Xcode. I'm using the interfice
Im building a mobile app for android & ios using appcelerator. I've build a

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.