ios - Properly Decoding string url for casting in NSURL -
i making player going support google dfp adserver. ad-server has vast link xml type , contains media-file, track links, clicklink etc...
the clicklinks includes redirecting url original url not decode.
i tried decode using stringbyaddingpercentescapesusingencoding
, encode again nsurl seems broken.
original vasturl is:
how can cast nsurl
?
read question again, carefully. want decode url , call method that's called
stringbyaddingpercentescapesusingencoding ^^^^^^
try using stringbyremovingpercentencoding
. should decode url.
to other question, how "cast" nsurl: casting means forcing debugger treat variable specific type. meaning cannot cast object , turn instance of type.
you have create instance of nsurl using string:
nsurl *url = [nsurl urlwithstring:[urlstring stringbyremovingpercentencoding]];
Comments
Post a Comment