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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:16:12+00:00 2026-06-14T12:16:12+00:00

I am using UIDocumentInteractionController in MonoTouch and in the iOS6 Simulator and on iOS6

  • 0

I am using UIDocumentInteractionController in MonoTouch and in the iOS6 Simulator and on iOS6 devices my code half works. However it does not work at all for iOS5 simulator/devices. Here is a sample class I made to test with in a sample project.

using System;
using MonoTouch.UIKit;
using MonoTouch.Foundation;

namespace DocumentThing
{
    public class MyViewController : UIViewController
    {
        UIDocumentInteractionController documentInteractionController1;
        UIDocumentInteractionController documentInteractionController2;
        UIBarButtonItem leftButton;
        UIBarButtonItem rightButton;

        public MyViewController()
        {

        }

        public override void ViewDidLoad()
        {
            View.BackgroundColor = UIColor.White;

            leftButton = new UIBarButtonItem(UIBarButtonSystemItem.Action, null, null);
            leftButton.Clicked += delegate(object sender, EventArgs e)
            {
                InvokeOnMainThread(delegate {
                    documentInteractionController1 = new UIDocumentInteractionController();
                    documentInteractionController1.Url = NSUrl.FromFilename(@"testpdf.pdf");
                    documentInteractionController1.PresentOpenInMenu(View.Frame, View, true);
                });
            };
            NavigationItem.LeftBarButtonItem = leftButton;


            rightButton = new UIBarButtonItem(UIBarButtonSystemItem.Action, null, null);
            rightButton.Clicked += delegate(object sender, EventArgs e)
            {
                InvokeOnMainThread(delegate {
                    documentInteractionController2 = new UIDocumentInteractionController();
                    documentInteractionController2.Url = NSUrl.FromFilename(@"testpdf.pdf");
                    documentInteractionController2.PresentOptionsMenu(View.Frame, View, true);
                });
            };
            NavigationItem.RightBarButtonItem = rightButton;
        }
    }
}

The PresentOptionsMenu works fine on iOS6 but not in iOS5, and the PresentOptionInMenu fails on both iOS5 and iOS6. Not sure if this is a bug with iOS5/6 SDKs/Simulators or if it is a bug in MonoTouch. I got no idea how to debug this issue further…

Suggestions?

  • 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-14T12:16:13+00:00Added an answer on June 14, 2026 at 12:16 pm

    Answering my own question…

    Did you check if you have any thing to open a PDF on your device which has iOS5 on it? Don’t forget iBooks is not installed by default and iOS does not think to use Safari as a PDF reader.

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

Sidebar

Related Questions

I preview docs in my app using a UIDocumentInteractionController. However, sometimes documents show fine,
Using Yii, I want to delete all the rows that are not from today.
Using the Redis info command, I am able to get all the stats of
using a binary search tree I need to add to a vector all int
I am using UIDocumentInteractionController inside my application in order to present the Instagram filter
Currently I'm using UIDocumentInteractionController to preview my PDFs (and other mostly Office formats). I
I'm using UIDocumentInteractionController to open a file in another app, DropBox. What i'm trying
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
Using preview 4 of ASP.NET MVC Code like: <%= Html.CheckBox( myCheckBox, Click Here, True,
Using rubular.com as a guide, I am trying to get this expression to work

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.