This is pretty frustrating. I\'m trying to get the size of an AVURLasset, but try to avoid naturalSize since Xcode tells me, this is deprecated in iOS5.
The deprecation warning says:
Use the naturalSize and preferredTransform, as appropriate,
of the asset’s video tracks instead (see also tracksWithMediaType:).
So we need an AVAssetTrack, and we want its naturalSize and preferredTransform. This can be accessed with the following:
AVAssetTrack *track = [[asset tracksWithMediaType:AVMediaTypeVideo] firstObject];
CGSize dimensions = CGSizeApplyAffineTransform(track.naturalSize, track.preferredTransform);
asset is obviously your AVAsset.