原文 http://reactnative.cn/post/2600
長(zhǎng)期以來(lái)流傳一則消息,蘋果將于17年1月1日收緊ats政策略水,強(qiáng)制接口使用HTTPS協(xié)議价卤。依據(jù)據(jù)說(shuō)是6月14日開發(fā)者大會(huì)上的演講。
但是蘋果真的這么激進(jìn)嗎渊涝?蘋果開發(fā)者論壇里一名官方人員近日對(duì)此進(jìn)行了 澄清:
First up, there have been no changes to the technical behaviour of ATS (other than the addition of NSAllowsArbitraryLoadsInWebContent and NSRequiresCertificateTransparency). From a technical perspective, ATS exceptions in the newly seeded OS releases work the same way as they do in the current OS release.
首先慎璧,ATS的技術(shù)行為不會(huì)有任何變化(除了新增兩個(gè)字段NSAllowsArbitraryLoadsInWebContent和NSRequiresCertificateTransparency床嫌,也就是更細(xì)分權(quán)限)。從技術(shù)角度來(lái)看胸私,ATS在iOS10中和iOS9中的表現(xiàn)完全一致厌处。
What has changed is that App Review will require “reasonable justification” for most ATS exceptions. The goal here is to flush out those folks who, when ATS was first released, simply turned it off globally and moved on. That will no longer be allowed.
那么到底是什么變化了呢?我們會(huì)收緊審核政策岁疼,即對(duì)于開發(fā)者添加的ATS例外(即http接口)阔涉,要求提供一個(gè)“合理的解釋”。之所以要增加這么一個(gè)“麻煩”五续,是為了避免開發(fā)者們都無(wú)腦地全局關(guān)閉ATS洒敏,使得ATS偏離其初衷,形同虛設(shè)疙驾。開發(fā)者將無(wú)法再無(wú)腦地全局關(guān)閉ATS凶伙,并且添加例外時(shí)需要提供合理的解釋。
如此看來(lái)它碎,蘋果是想以這樣的形式教育和促進(jìn)https的普及函荣,但也沒有激進(jìn)到一刀切的地步。一句話總結(jié):
你仍然可以在17年之后使用http接口扳肛,但需要在ATS中添加例外傻挂,同時(shí)審核時(shí)多少說(shuō)兩句理由。更重要的是挖息,你要知道這個(gè)政策會(huì)越來(lái)越緊金拒。躲得過(guò)初一,躲不過(guò)十五套腹。早點(diǎn)開始考慮向HTTPS遷移吧绪抛!