objective c - AVURLAsset loadValuesAsynchronouslyForKeys: completionHandler: never fires on device -


I'm using the next snippet to load, values ​​are synchronously, so loading = no fire ever No. And I have the same problem with the AVAssetExportSession export. Simultaneously This is not all just working on the device.

  NSDictionary * options = [Object with NSDictionary dictionary: [NSNumber Number Witbools: Yes] Key: AVURLASETPreferPreciseDurationAndTimingKey]; AVURLAsset * asset = [AVURLASET URLServerValid URL: URL options: options]; NSArray * key = [NSArray arrayWithObjects: @ "duration", @ "track", zero]; __block Bull loading = yes; [Asset Load ValueExcinronusForcases: Keys Whole Handler: ^ (Zero) {Loading = No; }]; While (loading) [[NSRunLoop currentRunLoop] Run-upDate: [[NSDate date] dateByAddingTimeInterval: 0.5]];   

Please, help! My brain is melting.

Here's the code I use:

  NSDRAEL * URL = [NSUr file URLTHath Path: [[NSBindal Mainbundal] PathForreresource: @ "Intro" type type: @ "M4V"]]; Self.asset = [[AVURLAsset alloc] initWithURL: url option: zero]; NSString * tracksKey = @ "tracks"; [Self.asset loadValuesAsynchronouslyForKeys: [NSArray arrayWithObject: tracksKey] completionHandler: ^ {// Other code for AVPlayer here}};   

I do not use any options or anything of that nature. I'm sure you saw an example of Apple's documentation:



Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

c# - Confused over DLL entry points (entry point not found exception) -