xcode - Why won't substrings work in Swift 4 anymore? -
one of pods in project won't compile , can't figure out why. truthfully, i've never had deal string.unicodescalarview
have no idea , docs aren't being helpful. still using string[subscript]
in swift 4 documentation xcode complaining subscript
being obsolete. ideas?
i came across exact same error in same place (same mapbox file). believe problem has new substring type being distinct string type breaks code @ line indicate. i'm still trying understand new docs. anyway took punt , tried following, using string.unicodescalarview
(which i"ve not come across either)
encodedstring = string.unicodescalarview(encodedstring[encodedstring.index(after: currentindex)..<encodedstring.endindex])
be aware while allows code compile , run, involves unlocking file in pod (to allow editing) , should use caution , make sure update pod mapbox release update. isn't long term fix @ all.
Comments
Post a Comment