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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:15:13+00:00 2026-05-29T10:15:13+00:00

i´m using ARC to update my old project. I have a Filehelper class in

  • 0

i´m using ARC to update my old project.
I have a “Filehelper” class in which i use c-functions e.g. for methods i need in almost every projects. (eg.load plist, etc..)

ViewController

NSDictionary* dictionary = getDictionaryFromPlistWithName(@"TestFile", @"plist");

Filehelper.m

#pragma Returns content of plist as NSDictionary
NSDictionary* getDictionaryFromPlistWithName(NSString* fileName, NSString* pathExtension) {

    NSString *path = [[NSBundle mainBundle] pathForResource:fileName ofType:pathExtension];

    BOOL fileExists = [[NSFileManager defaultManager] fileExistsAtPath:path];

    if(fileExists){
        NSDictionary* dictionary = [NSDictionary dictionaryWithContentsOfFile:path];
        return dictionary;
    }
    else{
        [NSException raise:@"File not found" format:@"path %@", path];
        return nil;
    }
}

I get this error:

*error: Automatic Reference Counting Issue: Implicit conversion of ‘int’ to ‘NSDictionary ‘ is disallowed with ARC

Any ideas how to fix it to use it with iOS 5?
I´ve read something that i need to use (__bridge NSDictionary*), but that didn´t help.

PS.
What´s your workflow for classes which you already need? Use C-functions, too?=
What´s the best way?

  • 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-29T10:15:14+00:00Added an answer on May 29, 2026 at 10:15 am

    The most likely problem here is that you forgot to #include your header file. I bet there are further warnings that you’re ignoring, particularly one that says something like “unknown signature for getDictionaryFromPlistWithName, assuming it returns int”. Read through your warnings and never ignore them (I strongly recommend -Werror for all ObjC projects).

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

Sidebar

Related Questions

My project using ARC, so I can't use retain nor release, in ViewController A,
I'm trying to use TPMultiLayoutViewController in a project using ARC, but am bumping into
Is there a way to draw an arc using points in JavaScript?? I need
Using C#, I need a class called User that has a username, password, active
I have a global dictionary with Class objects and NSString keys. Every custom subclass
So I'm using ARC in my project and when I add an AVPlayerLayer it
I have created an iphone application using the empty template without ARC in xcode
I have an objective-C program and I am using ARC (Automatic Reference Counting), it
I have a project dealing with video conferencing using the Kinect (or, more likely,
i have a rotated arc drawn using android 2d graphics c.drawArc(new RectF(50, 50, 250,

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.