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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:39:16+00:00 2026-06-04T07:39:16+00:00

i am getting the null values ,whenever i am using MPMediaItemCollection convert MPMediaItemPropertyAssetURL to

  • 0

i am getting the null values ,whenever i am using MPMediaItemCollection convert MPMediaItemPropertyAssetURL to data?

here my code

MPMediaItemCollection *collection=[allAlbumsArray objectAtIndex:indexPath.row];
MPMediaItem *item = [collection representativeItem];

NSLog(@" songs titles_str url is===>%@",[item valueForProperty:MPMediaItemPropertyAssetURL]);

NSLog(@"class type is %@",[[item valueForProperty:MPMediaItemPropertyAssetURL] class]);

self.songData=[NSData dataWithContentsOfURL:[item valueForProperty:MPMediaItemPropertyAssetURL]];

NSLog(@"original data is %@",self.songData);

here i am getting url for song ipod-library://item/item.mp3?id=-9207595762773025867

but when i convert into data i getting null value
Thanks for advance.

  • 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-04T07:39:17+00:00Added an answer on June 4, 2026 at 7:39 am

    The problem here is that the URL has a custom scheme, ipod-library, which can only be used with AVFoundation methods, for example AVAsset objects.

    The MPMediaItem Class Reference says this about MPMediaItemPropertyAssetURL:

    MPMediaItemPropertyAssetURL

    A URL pointing to the media item, from which an AVAsset object (or other URL-based AV Foundation
    object) can be created, with any options as desired. Value is an NSURL object.

    The URL has the custom scheme of ipod-library. For example, a URL might look like this:

    ipod-library://item/item.m4a?id=12345

    Usage of the URL outside of the AV Foundation framework is not supported.

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

Sidebar

Related Questions

IN JAVA CODE IN JSP as below i m getting null value for fieldnoOfRecords.
I am getting a Value cannot be null error from the code below: @Html.Label(material.ExtendedGroup)
I am getting null-exception throw error in the following code. What can be the
Hi i am reading inbox using service but i m getting null pointer exception
i'm getting a weird null pointer exception in the last line of this code:
I am getting null Values while passing datas through Intent from 1 activity to
The values are getting null in grid in Extjs when i am parsing these
Here's my code - I am getting an error in my firebug console that
I am getting NULL values in the results of an operation in MySQL. Is
I am getting the following error: InnerException: {Cannot insert the value NULL into column

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.