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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:20:54+00:00 2026-06-04T13:20:54+00:00

For a while I’m strugeling creating a custom titaniummodule. I’m trying to open a

  • 0

For a while I’m strugeling creating a custom titaniummodule. I’m trying to open a pdf in an otrher app.
Everything seems to be correct (no warnings etc)
But there is no menu showing when pressing the button in de navBar.

Here is the code of the method showing the menu:

ENSURE_SINGLE_ARG_OR_NIL(args,NSDictionary);

TiViewProxy* viewAnchor = [args objectForKey:@"view"];
NSString* fileToOpen = [args objectForKey:@"url"];



NSLog(@"%@",fileToOpen);

if(viewAnchor != nil){
    NSLog(@"viewAnchor is not nil accessing controller");
    NSLog(@"%@",[TiUtils toURL:fileToOpen proxy:self]);

    CGRect rect = [TiUtils rectValue:args];
    self.controller = [[UIDocumentInteractionController interactionControllerWithURL:[TiUtils toURL:fileToOpen proxy:self]] retain];
    self.controller.delegate = self;

    BOOL menuDisplayed = [self.controller presentOpenInMenuFromBarButtonItem:[viewAnchor barButtonItem] animated:YES];

    //menuDisplayed = YES
    if(menuDisplayed)
    {
        NSLog(@"Menu is displayed");
        //This display's com.adobe.pdf
        NSLog(@"%@",self.controller.UTI);
    }
    else
    {
        NSLog(@"Menu failed to display");
    }
}
  • 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-04T13:20:56+00:00Added an answer on June 4, 2026 at 1:20 pm

    Module methods run on a non-UI thread, however, all UIKit methods must be executed on the main UI thread. You need ensure that your method is running on the UI thread with the macro:

    ENSURE_UI_THREAD_1_ARG(args);
    

    More details on:

    https://wiki.appcelerator.org/display/guides/iOS+Module+Development+Guide#iOSModuleDevelopmentGuide-AddingSpecialCompilerDirectives

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

Sidebar

Related Questions

While trying to call an EJB made using NETbeans (using jdk1.7) from a client
While trying to install a program from source I found that it installed libraries
while setting up a simple Rails app, I met an issue i never had
While trying to debug why my multi threaded Java application is consuming large amount
while trying to analyse in greater depth inheritance mechanism of C++ I stumbled upon
While creating product, at the last step after retrieving for a time, Magento gives
while trying to analyse in greater depth inheritance mechanism of C++ I stumbled upon
While trying to compile the following code, which is enhanced version of read build
While working in a Java app, I recently needed to assemble a comma-delimited list
While I was working on my app, I decided to add an interface builder

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.