Problem Using '!' will be removed in a future release [duplicate]












0
















This question is an exact duplicate of:




  • Using '!' here is deprecated and will be removed in a future release - swift 4.2

    2 answers




    if let encodingName = response?.textEncodingName as CFString! , convertedEncoding == nil {
convertedEncoding = String.Encoding(rawValue: CFStringConvertEncodingToNSStringEncoding(
CFStringConvertIANACharSetNameToEncoding(encodingName))
)


Any ideas for my problem??










share|improve this question













marked as duplicate by Bob Gilmore, Tamás Sengel, Community Nov 26 '18 at 7:58


This question was marked as an exact duplicate of an existing question.



















  • @BobGilmore probably but I cant apply it :/

    – JuleesC
    Nov 25 '18 at 16:42
















0
















This question is an exact duplicate of:




  • Using '!' here is deprecated and will be removed in a future release - swift 4.2

    2 answers




    if let encodingName = response?.textEncodingName as CFString! , convertedEncoding == nil {
convertedEncoding = String.Encoding(rawValue: CFStringConvertEncodingToNSStringEncoding(
CFStringConvertIANACharSetNameToEncoding(encodingName))
)


Any ideas for my problem??










share|improve this question













marked as duplicate by Bob Gilmore, Tamás Sengel, Community Nov 26 '18 at 7:58


This question was marked as an exact duplicate of an existing question.



















  • @BobGilmore probably but I cant apply it :/

    – JuleesC
    Nov 25 '18 at 16:42














0












0








0









This question is an exact duplicate of:




  • Using '!' here is deprecated and will be removed in a future release - swift 4.2

    2 answers




    if let encodingName = response?.textEncodingName as CFString! , convertedEncoding == nil {
convertedEncoding = String.Encoding(rawValue: CFStringConvertEncodingToNSStringEncoding(
CFStringConvertIANACharSetNameToEncoding(encodingName))
)


Any ideas for my problem??










share|improve this question















This question is an exact duplicate of:




  • Using '!' here is deprecated and will be removed in a future release - swift 4.2

    2 answers




    if let encodingName = response?.textEncodingName as CFString! , convertedEncoding == nil {
convertedEncoding = String.Encoding(rawValue: CFStringConvertEncodingToNSStringEncoding(
CFStringConvertIANACharSetNameToEncoding(encodingName))
)


Any ideas for my problem??





This question is an exact duplicate of:




  • Using '!' here is deprecated and will be removed in a future release - swift 4.2

    2 answers








ios swift swift4.2






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 25 '18 at 16:33









JuleesCJuleesC

61




61




marked as duplicate by Bob Gilmore, Tamás Sengel, Community Nov 26 '18 at 7:58


This question was marked as an exact duplicate of an existing question.









marked as duplicate by Bob Gilmore, Tamás Sengel, Community Nov 26 '18 at 7:58


This question was marked as an exact duplicate of an existing question.















  • @BobGilmore probably but I cant apply it :/

    – JuleesC
    Nov 25 '18 at 16:42



















  • @BobGilmore probably but I cant apply it :/

    – JuleesC
    Nov 25 '18 at 16:42

















@BobGilmore probably but I cant apply it :/

– JuleesC
Nov 25 '18 at 16:42





@BobGilmore probably but I cant apply it :/

– JuleesC
Nov 25 '18 at 16:42












1 Answer
1






active

oldest

votes


















2














Just use



if let encodingName = response?.textEncodingName as? CFString , convertedEncoding == nil {
convertedEncoding = String.Encoding(rawValue: CFStringConvertEncodingToNSStringEncoding(
CFStringConvertIANACharSetNameToEncoding(encodingName)))
}


The issue is caused by casting to CFString!






share|improve this answer






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    Just use



    if let encodingName = response?.textEncodingName as? CFString , convertedEncoding == nil {
    convertedEncoding = String.Encoding(rawValue: CFStringConvertEncodingToNSStringEncoding(
    CFStringConvertIANACharSetNameToEncoding(encodingName)))
    }


    The issue is caused by casting to CFString!






    share|improve this answer




























      2














      Just use



      if let encodingName = response?.textEncodingName as? CFString , convertedEncoding == nil {
      convertedEncoding = String.Encoding(rawValue: CFStringConvertEncodingToNSStringEncoding(
      CFStringConvertIANACharSetNameToEncoding(encodingName)))
      }


      The issue is caused by casting to CFString!






      share|improve this answer


























        2












        2








        2







        Just use



        if let encodingName = response?.textEncodingName as? CFString , convertedEncoding == nil {
        convertedEncoding = String.Encoding(rawValue: CFStringConvertEncodingToNSStringEncoding(
        CFStringConvertIANACharSetNameToEncoding(encodingName)))
        }


        The issue is caused by casting to CFString!






        share|improve this answer













        Just use



        if let encodingName = response?.textEncodingName as? CFString , convertedEncoding == nil {
        convertedEncoding = String.Encoding(rawValue: CFStringConvertEncodingToNSStringEncoding(
        CFStringConvertIANACharSetNameToEncoding(encodingName)))
        }


        The issue is caused by casting to CFString!







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 25 '18 at 16:43









        DionizBDionizB

        1,0552515




        1,0552515

















            Popular posts from this blog

            Costa Masnaga

            Fotorealismo

            Sidney Franklin