ios - Fetching a NSString version of NSURL from Core Data -
I have a NSURL
that I have a AVAsset
. I then use AVAsset
to remove the data from the media code NSURL
until I started using the core data So it is working fine to give this code to
nsr URL
with a NSString
to my entity < / Code> must be converted to a specialty. Now that I am taking, I can see that I am able to retrieve the string version of
ns URL
and can convert it back to NSURL
. However, when I create my AVAsset
to NS URL
, then I am unable to extract data.
NSURL storage as NSString method:
- (zero) saveRecording: (NSMutableDictionary *) recordPackage inManagedObjectContext: (NSManagedObjectContext *) Reference {Recording * Recording = [NSEntityDescription InsertNewObjectForEntityForName: @ "Recording" Managed Object Contains: Reference]; Recording. Audio URL = [[RecordPackage ObjectForcae: @ "Audience"] Absolute String]; }
The method is fetching:
- (NSMutableArray *) fetchWithContext: (NSManagedObjectContext *) Reference {NSFetchRequest * request; If (request == blue) {request = [nsftquare fetchRequestWithEntityName: @ "recording"]; Request.predicate = Zero; Request.sortDescriptors = Zero; } NSError * error; Return [[reference executeFetchRequest: request error: & amp; Error] mutableCopy];
tableFiew's cellForRowAtIndexPath:
recording * recording = [self.audioTableArray objectAtIndex: indexPath.row]; NSLog (@ "TheURL% @", recording audio URL); NSURL * audioURL = [[NS URL light] initWithString: [Recording. CenteredScripting Encoding On Audio URL StringBacking: NSTF 8 String Encoding]]; AVAsset * transferredAsset = [AVAsset assetWithURL: audioURL]; [Cell set: set: transseetset];
When I match NSLog
received from NSString
to core data , then it will be stored by me Matches url before what gives? Am I incorrectly converting between
NSString
and NSURL
?
I have seen the following answer, but I am still losing:
Comments
Post a Comment