Are there any standard objects or functions to parse an NSURL’s components? Clearly I could write one, but why re-invent the wheel?
[NSURL path] will return an NSString like "argX=x&argY=y&argZ=z"
What I would rather get back is a dictionary populated with {@"argX" => @"x", @"argY" => @"y", @"argZ" = @"z"}
For the path, which returns a string like “/partA/partB/partC”, I would rather get an array with the structure {[0] => @"partA", [1] => @"partB", [2] => @"partC"}
I realize this is a pretty specific ask, but it seems like something a lot of people would want.
This is for iOS! Apparently NSURL has different functions on macOS.
You might want to look at
pathComponentswhich returns an array of the components of the URL. Get more information here.