I have the following URL from which I want to extract the id parameter:
assets-library://asset/asset.JPG?id= 123456789 &ext=JPG
I wonder if there is a better way to figure out the value for id than this:
NSString *id = [[[[def.url.query componentsSeparatedByString:@"id="]
lastObject]
componentsSeparatedByString:@"&"]
objectAtIndex:0];
In your case something along these lines would probably work (somewhat simplified, but working):