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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T11:06:21+00:00 2026-05-18T11:06:21+00:00

I have a property list ( Data.plist ) that contains an array of two

  • 0

I have a property list (Data.plist) that contains an array of two dictionaries. Each dictionary is filled with key names (Factor 1, Factor 2, etc) and floats (0.87, 1.15, etc.). I am trying to access the numbers stored in the dictionary. First I load the dictionary using:

NSString *path = [[NSBundle mainBundle] bundlePath];
NSString *finalPath = [path stringByAppendingPathComponent:@"Data.plist"];
NSArray *plistData = [[NSArray arrayWithContentsOfFile:finalPath] retain];
NSDictionary *dictionaryOne = [plistData objectAtIndex:0];

Actually accessing the numbers stored is where I’m having a problem:

Float32 conversionFactor = [scyToLCMMen objectForKey:"Factor 50"];

I’m getting the error: “incompatible types in initialization“. What am I doing wrong? Is it not a Float32?

  • 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-18T11:06:22+00:00Added an answer on May 18, 2026 at 11:06 am

    Objective-c containers can only hold obj-c types, so what you get is not a float for sure. What you probably have is NSNumber object and you need to “extract” plain float value from it:

    Float32 conversionFactor = [[scyToLCMMen objectForKey:"Factor 50"] floatValue];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a rather large list of data that contains 5 properties per element.
i have a doubt in grid view. In Data list we have a property
I have a list of dicts that have a property that may be duplicate
I have a List<NameClass> that stores a collection of NameClass items with a property
Does a List have a property or mechanism by which I can prevent duplicate
In my ViewModel I have a property, which is a list of models: private
I have web-service which give list of property at a particular area My problem
I have a List<MyClass> with 2 items which have a SequenceNumber property. If I
I have a boolean property IsActive. In the view is a list of objects
I have a list of objects with property id and parent_id. I want to

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.