馃檲 濡備綍闅愯棌浣犵殑鐑洿鏂?bundle 鏂囦欢锛?/a>

Posted 鍗や唬鐑?,

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了馃檲 濡備綍闅愯棌浣犵殑鐑洿鏂?bundle 鏂囦欢锛?/a>相关的知识,希望对你有一定的参考价值。

濡傛灉浣犲枩娆㈡垜鐨勬枃绔狅紝甯屾湜鐐硅禐馃憤 鏀惰棌 馃搧 鍦ㄧ湅 馃専 涓夎繛鏀寔涓€涓嬶紒锛侊紒璋㈣阿浣狅紝杩欏鎴戠湡鐨勫緢閲嶈锛?/blockquote>

鍓嶆鏃堕棿鎴戜滑鍏徃鐨勪竴涓ぇ浣粠涓€浜涙笭閬撳緱鐭ヤ簡涓€浜涘皬閬撴秷鎭紝鏌愬浗姘戠骇 APP 鍥犱负 Apple App Store 瀹℃牳浜哄憳妫€娴嬪嚭 React Native 鐑洿鏂扮殑鍐呭锛岃鎷掑浜嗕笁涓湀銆傛垜浠殑鐑洿鏂板钩鍙板拰鍑轰簨鐨?APP 鍘熺悊鐩镐技锛屾墍浠ヤ篃瀛樺湪鐫€鎷掑鍗遍櫓銆傞偅涔堟垜浠氨瑕佹兂涓€浜涘姙娉曪紝闅愯棌鐑洿鏂?bundle锛屼笉琚鏍镐汉鍛樺彂鐜般€?/p>

鍏跺疄杩欎釜闂铔鏉傜殑锛屽洜涓哄畠涓嶅崟绾槸涓€涓妧鏈棶棰橈紝杩樻秹鍙婂埌鍚勭澶嶆潅鐨勫晢涓氬埄鐩婏紝鍦ㄨ澶氱殑闄愬埗鏉′欢涓嬶紝浣犲緢闅惧幓鎵惧埌涓€涓渶浼樿В銆傝€屼笖杩欎釜闂涔熸瘮杈冩晱鎰燂紝鎴戜篃鍙兘澶ц嚧璁蹭竴涓嬫垜鐨勬€濊矾锛屽叿浣撶殑浠g爜瀹炵幇鏈枃涔熶笉浼氭彁渚涖€?/p>

閮戦噸澹版槑 鈿狅笍锛氳嫢鏈変汉鎸夋湰鏂囨€濊矾闅愯棌鐑洿鏂版暟鎹鑷村簲鐢ㄦ嫆瀹℃垨涓嬫灦锛屾湰浜烘涓嶈礋璐?/blockquote>

<!--truncate-->

涓€銆佸晢涓氬埄鐩?/h2>

Apple 鍏徃瀵?iPhone 鐢熸€佹湁鐫€闈炲父涓ユ牸鐨勭鎺э細App 涓婃灦蹇呴』璧?App Store锛屽姩鎬侀摼鎺ュ簱瑕佸弬涓庣鍚嶏紝甯?JIT 鍔熻兘鐨勮櫄鎷熸満涓嶈兘鐢?.....

瀵逛簬鐑洿鏂版妧鏈紝Apple 鍦?2017 骞村皝鏉€杩囦竴娆? JSPatch 杩欎釜鐑洿鏂版鏋讹紝瀵艰嚧寰堝鐨?APP 琚嫆瀹★紝鏍规嵁 Apple 瀹樻柟缁欏嚭鐨勭悊鐢憋紝涓昏鏈変笁鐐癸細

  • 鐑洿鏂颁唬鐮佹病鏈夊仛濂藉姞瀵嗗拰鏍¢獙锛屾湁鍙兘琚涓夋柟鐮磋В鍔寔
  • JSPatch 鏉冮檺杩囬珮锛屽彲鑳戒細璋冪敤绉佹湁 API锛屾敼鍙樺師鏈夌殑 APP 鍔熻兘
  • 瀵逛簬 Apple 瀹樻柟鏉ヨ锛孞SPatch 鑷敱搴﹀お澶э紝浼氱粫杩?App Store 杩欎釜 iOS 涓婄殑鍞竴娴侀噺鍒嗗彂骞冲彴鏇存柊搴旂敤锛屽奖鍝嶅晢涓氬埄鐩?/li>

淇楄瘽璇村緱濂斤紝鏂汉璐㈣矾濡傛潃浜虹埗姣嶏紝杩欑娑夊強鍟嗕笟鍒╃泭鐨勪簨鎯呮棤璁烘斁鍦ㄨ皝閮藉ご涓婇兘蹇嶄笉浜嗭紝鑰屼笖寰堝搴旂敤鍙堜笉鏄井淇★紝鏈夊簽澶х殑鐢ㄦ埛鍩烘暟鍙互鍜?Apple 瀹樻柟璋堝垽锛堝井淇″皬绋嬪簭鐢熸€佸氨鏄皥鍑烘潵鐨勶紝浣嗘槸灏忕▼搴忔敮浠樻潈闄愬氨娌¤皥濡ワ級锛屾墍浠ヨ杩欎釜闂杩樻槸寰堝鏉傜殑銆?/p>


鍏跺疄瀵逛簬 Apple 瀹樻柟鏉ヨ锛屽涓庡姩鎬佸寲鐑洿鏂扮殑鎬佸害鍚戞潵鏄?strong>涓嶈禐鎴愪篃涓嶅弽瀵?/strong>锛屽拰 JSPatch 姣旇捣鏉ワ紝React Native 鍜屾父鎴忕儹鏇存柊杩欎袱绉嶅簲鐢ㄥ満鏅繕鏄鍏佽鐨勶紝涓昏杩樻槸浣撶幇鍦ㄤ笁鐐癸細

  • 缃戞父杩欑閲嶈繍钀ョ殑鍦烘櫙杩樻槸闇€瑕佺儹鏇存柊缁存寔娲诲姩鐑害鐨勶紝姣忓懆閮芥湁鏂版椿鍔紝璁╃敤鎴蜂富鍔ㄥ幓 App Store 涓嬭浇鏇存柊鍖呭緢涓嶅悎鐞嗭紝App 娲诲姩杩愯惀鍚岀悊
  • React Native/Lua 绛夌儹鏇存柊鎶€鏈槸鍦ㄤ竴涓鍣ㄩ噷杩涜鍔ㄦ€佸寲鐨勶紝涓嶅儚 JSPatch 鏈夐偅涔堝ぇ鐨勪慨鏀规潈闄?/li>
  • 鑻规灉瀹樻柟鍦ㄥ晢涓氬埄鐩婁笂鍜屾父鎴忓巶鍟?浜掕仈缃戝法澶磋揪鍒颁竴浜涘井濡欑殑骞宠 

璇村疄璇濊嫻鏋滃鏍镐竴鐩村緢杩凤紝鎷掑鏈夋椂鍊欏拰鎵撳お鏋佷竴鏍凤紝缁欏嚭鐨勮鑼冨悇璺В璇婚兘涓嶄竴鏍凤紝涓嶈繃涓轰簡淇濋櫓璧疯锛屾垜浠繕鏄鐮旂┒涓€涓嬬浉鍏崇殑骞冲彴瑙勮寖銆?/p>

浜屻€佽В璇昏鑼?/h2>

2015 骞磋嫻鏋滃彂杩囦竴绡囧崗璁€斺€?a href="https://link.segmentfault.com/?url=https%3A%2F%2Fdeveloper.apple.com%2Fprograms%2Fios%2Finformation%2F" rel="nofollow">銆夾pple Developer Program License Agreement銆?/a>锛屾枃涓 3.3.2 鑺傛湁涓€娈靛叧浜庣儹鏇存柊鐨勫唴瀹癸細

Except as set forth in the next paragraph, an Application may not download or install executable code. Interpreted code may only be used in an Application if all scripts, code and interpreters are packaged in the Application and not downloaded. The only exceptions to the foregoing are scripts and code downloaded and run by Apple\'s built-in WebKit framework or javascriptCore, provided that such scripts and code do not change the primary purpose of the Application by providing features or functionality that are inconsistent with the intended and advertised purpose of the Application as submitted to the App Store.

杩欎竴娈佃瘽澶ф灏辨槸璇?strong>闄や簡 Webkit 鍜?JavascriptCore 鍙互鍔ㄦ€佹墽琛屼笅鍙戠殑鑴氭湰鍜屾枃浠讹紝鍏跺畠鎵€鏈?/strong>鑴氭湰/浠g爜/瑙i噴鍣ㄩ兘蹇呴』鎵撳寘鍦?APP 鍐呴儴銆傝繖鍙ヨ瘽鍏跺疄灏辩粰 React Native 鐣欎簡涓€涓彛瀛愶細React Native 灏辨槸鐢?JavascriptCore 鎵ц JS 鑴氭湰鏂囦欢鐨勶紝閭d箞鍔ㄦ€佷笅鍙戜篃鏄悎鐞嗙殑銆?/p>


Interpreted code may be downloaded to an Application but only so long as such code: (a) does not change the primary purpose of the Application by providing features or functionality that are inconsistent with the intended and advertised purpose of the Application as submitted to the App Store, (b) does not create a store or storefront for other code or applications, and (c) does not bypass signing, sandbox, or other security features of the OS.

杩欎竴娈佃瘽澶ф灏辨槸璇达紝鎴戝厑璁镐綘鐑洿鏂帮紝浣嗘槸蹇呴』閬靛惊鎴戣繖涓夋潯瑙勫畾锛?/p>

  • 涓嶈兘澶х殑淇敼 APP 鍔熻兘锛屽鑷村簲鐢ㄥ疄闄呭姛鑳藉拰 APP Store 鐨勫浼犱笉绗︼紙杩欎釜鍦版柟灏卞緢鎵撳お鏋侊紝璇勫垽鏍囧噯鍏ㄩ潬瀹℃牳浜哄憳蹇冩儏锛?/li>
  • 涓嶈兘鍔ㄦ€佸垱寤哄簲鐢ㄥ晢搴楋紙搴旇鏄笉鑳界粫杩?IAP 鏀粯鐨勬剰鎬濓紝瑕佷笉鐒舵€庝箞鏀惰嫻鏋滅◣锛?/li>
  • 涓嶈兘缁曡繃绛惧悕/娌欑/OS 鐨勫畨鍏ㄥ姛鑳斤紙杩欎釜鍙互鐞嗚В锛岀淮鎶ょ郴缁熷拰鐢熸€佸畨鍏級


杩欐牱瑙h涓嬫潵锛岃矊浼煎彧瑕佹寜鐓ц鑼冨綋涓?strong>鑹皯灏卞彲浠ヨВ鍐抽棶棰樹簡銆備絾鏄瀹炶瘽锛屽姩鎬佸寲瑙勮寖鏇村鐨勬槸鍚涘瓙鍗忚锛屽鏋滃弻鏂归兘璁叉寰凤紝閭eぇ瀹跺叾涔愯瀺铻嶉兘鎸哄ソ锛涗竾涓€鍝釜浜鸿烦鍑烘潵瑕佸潖瑙勭煩锛岃瀹炶瘽澶у閮藉緢闅惧牚銆傚湪鏈潵锛岀儹鏇存柊鎶€鏈偗瀹氳繕鏄浠ュ井濡欑殑骞宠 鐘舵€佸瓨鍦ㄤ笅鍘汇€?/p>

涓夈€佹妧鏈疄鐜?/h2>

姣忔璁捐涓€浜涘伐绋嬫柟妗堟椂锛屾垜涓汉鐨勪範鎯兘鏄厛浠庣悊璁轰笂鎵剧瓟妗堛€傚氨鎷块殣钘忕儹鏇存柊 bundle 杩欎釜渚嬪瓙鏉ヨ锛屾垜浠富瑕佹槸鎯冲湪淇℃伅浼犺緭杩欓噷鎵惧埌绐佺牬鍙o紝瀹為檯涓婇鍐滆€佺埛瀛?1949 骞村氨鎻愬嚭浜嗕竴涓€?a href="https://link.segmentfault.com/?url=https%3A%2F%2Fwww.wikiwand.com%2Fen%2FShannon%25E2%2580%2593Weaver_model" rel="nofollow">棣欏啘涓€闊﹀紬閫氫俊妯″瀷銆嶃€傝繖涓ā鍨嬮噷鎶婇€氫俊鍒嗕负浜斾釜閮ㄥ垎锛?code>淇℃伅婧?/code>銆?code>鍙戝皠鍣?/code>銆?code>淇¢亾銆?code>鎺ユ敹鍣?/code>銆?code>淇℃伅鎺ュ彈鑰?/code> 鍜?鍣煶銆?/p>


閭d箞缁撳悎杩欎釜閫氫俊妯″瀷锛屾垜浠殣钘?鍔犲瘑閫氳淇℃伅鐨勭瓟妗堝氨鍛间箣娆插嚭浜嗭細

  • 瀵逛俊婧愬姞瀵?/strong>锛氬湪淇℃伅鐨勬敹鍙戠粓绔彂閫佹秷鎭椂鍔犲瘑锛屾帴鍙楁秷鎭椂瑙e瘑
  • 瀵逛俊閬撳姞瀵?/strong>锛氫俊鎭湪淇¢亾浼犺緭鏃讹紝缁忚繃淇¢亾鏃惰繘琛屽姞瀵?/li>

閭d箞鎴戜滑涓嬮潰灏卞杩欎袱涓ぇ鏂瑰悜杩涜鎵╁睍鍜屾帰璁ㄣ€?/p>


1.瀵规秷鎭湰韬姞瀵?娣锋穯

1.1 闅愬啓鏈€斺€斿綋浠g壒娲涗紛鏈ㄩ┈

闅愬啓鏈槸涓€涓潪甯搁潪甯稿彜鑰佺殑鎶€鏈紝杩欎釜鎶€鏈殑鍏抽敭灏辨槸鎶婃兂瑕佷紶閫掔殑鏁版嵁闅愯棌/浼涓€涓嬶紝涓嶈绗笁鏂圭湅鍑烘潵鐪熷疄鎯宠浼犻€掔殑鏁版嵁銆?/p>

闅愬啓鏈殑渚嬪瓙闈炲父澶氾紝姣斿璇寸壒娲涗紛鏈ㄩ┈锛屼綘浠庡闈㈢湅鏄釜鏈ㄩ┈锛屼絾杩愬埌鍩庨噷锛屽+鍏靛氨璺戝嚭鏉ヤ簡锛涙垜浠湅鐨勪竴浜涘奖瑙嗗墽閲岋紝涔熸湁绫讳技鍘熺悊鐨勬ˉ娈碉細涓昏鏀跺埌涓€浠芥棤瀛椾俊绾革紝鍦ㄨ湣鐑涗笂涓€鐑わ紝鏂囧瓧灏辨樉鐜板嚭鏉ャ€傚浠婄殑鏁板瓧鏃朵唬鑲畾涓嶄細鐢ㄦ棤瀛椾俊绾哥瀵嗕紶閫掓秷鎭紝鎴戜滑鑲畾鏈変簺鏇村姞璧涘崥鐨勬柟娉曪紝姣斿璇?strong>鍥剧鎶€鏈?/strong>鈥斺€?strong>鎶婃秷鎭殣鍐欏埌鍥剧墖鏂囦欢閲?/strong>銆?/p>

濡傛灉澶у鐜╄繃涓€娈垫椂闂磋创鍚э紝瀵瑰浘绉嶆妧鏈偗瀹氫笉浼氶檶鐢燂紝鏈変簺澶х浼氬彂涓创锛屾妸绉嶅瓙鏂囦欢闅愯棌鍦ㄥ浘鐗囬噷锛屽ぇ瀹舵妸鍥剧墖涓嬭浇涓嬫潵锛屾妸 .jpg 鐨勫悗缂€鏀逛负 .zip or .rar锛岀劧鍚庤В鍘嬫枃浠跺氨鑳藉緱鍒伴殣钘忕殑绉嶅瓙鏂囦欢锛岀劧鍚庡湪璐村惂鐣欎笅銆屾ゼ涓诲ソ浜恒€嶇殑缇庤獕銆?/p>

閭d箞鍥剧鎶€鏈殑鍘熺悊鏄暐锛熷叾瀹炲緢绠€鍗曪紝瀹冨彧鏄崟绾殑鎶婁竴涓?jpg 鏂囦欢鍜屼竴涓?rar 鏂囦欢鍚堝苟鍦ㄤ竴璧凤紝浣嗘槸鍥剧墖鏌ョ湅鍣ㄤ細蹇界暐闄勫姞鐨?rar 鏂囦欢鏁版嵁锛岃繖鏍峰湪鎰熷畼涓婅繖鏄竴寮犲浘鐗囷紝浣嗘槸浠庝簩杩涘埗鐨勮搴︾湅杩欎釜鍥剧墖鏂囦欢閲岄殣钘忎簡涓€浜涙暟鎹€?/p>

涓嬮潰鎴戜滑鐪嬬湅鍥剧鏂囦欢鐨勫師鐞嗐€?/p>


棣栧厛鎴戠敤鍥剧墖缂栬緫鍣ㄧ敓鎴愪竴涓?2x2 4 涓儚绱犲ぇ灏忕殑鍥剧墖鈥斺€?code>RGBY.jpg銆傞鑹叉垜鍙傝€?Google logo 閰嶄簡涓€涓嬶細

鐒跺悗鎴戜滑鐢ㄤ簩杩涘埗鏌ョ湅宸ュ叿锛堟垜杩欓噷鐢ㄧ殑鏄?Hex Fiend 杞欢锛夋煡鐪嬭繖涓浘鐗囩殑缂栫爜锛屽洜涓哄浘鐗囧彧鏈?4 涓儚绱狅紝鎵€浠ヤ簩杩涘埗鏁版嵁涔熶細姣旇緝灏忥紝娉ㄦ剰瑙傚療杩欎釜鏂囦欢鐨勪簩杩涘埗鏁版嵁锛屽畠鏄?FF D8 寮€澶达紝FF D9 缁撳熬鐨勩€?/p>

鍥剧墖鏌ョ湅鍣ㄥ姞杞戒竴寮犲浘鐗囨枃浠舵椂灏变細鍋氭娴嬶紝濡傛灉鏄?FF D8 寮€澶达紝灏变細璁や负杩欐槸涓€寮?jpg 鍥剧墖锛岀劧鍚庡氨浼氳繘鍏?jpg 鍥剧墖瑙g爜鐨勫垎鏀紝鍔犺浇浜岃繘鍒舵暟鎹亣鍒?FF D9 鍚庯紝灏变細璁や负杩欎釜鍥剧墖宸茬粡鍔犺浇瀹屾瘯锛?strong>鍚庨潰鐨勬暟鎹氨涓嶄細鍐嶇浜?/strong>銆?/p>


鍩轰簬鍥剧墖棰勮鍣ㄤ笉浼氬姞杞?FF D9 涔嬪悗鏁版嵁鐨勮繖涓壒鎬э紝鎴戜滑鍙互鎶婁竴浜涜闅愯棌鐨勬暟鎹檮鍔犲埌 jpg 鏂囦欢涔嬪悗銆?/p>

杩欓噷涓轰簡娴嬭瘯鏂逛究锛屾垜鏂板缓浜嗕竴涓唴瀹逛负 hello word 鐨?text.txt 鏂囦欢锛岀劧鍚庣敤 cat 鍛戒护鎶?RGBY.jpg 鍜?text.txt 鍚堝苟涓€涓嬶紝鐢熸垚 RGBY_text.jpg 鏂囦欢锛?/p>

cat RGBY.jpg text.txt > RGBY_text.jpg

杩欐椂鍊欑敤鍥剧墖娴忚鍣ㄦ煡鐪嬫枃浠讹紝鍙互鐪嬪嚭鏂囦欢杩樻槸姝e父棰勮鐨勶細

浣嗘槸鐢ㄤ簩杩涘埗鏌ョ湅宸ュ叿鏌ョ湅杩欏紶鍥剧墖锛屽氨浼氬彂鐜颁粬鍦ㄦ湯灏惧浜?11 涓瓧鑺傦紝姝f槸 text.txt 閲岀殑鍐呭鈥斺€?hello word 锛?/p>

杩欐牱鎴戜滑灏辫揪鍒颁簡闅愬啓鐨勭洰鐨勩€?/p>


澶у涓嶈瑙夊緱杩欎釜鏂规 low锛屽疄闄呬笂闃块噷鐨勪竴浜涘瘑閽ュ氨鏄€氳繃绫讳技鐨勫師鐞嗗啓鍒颁竴寮犲浘鐗囬噷鐨勶紙褰撶劧涓嶄細鍍忎互涓婃渚嬮偅涔堢畝鍗曪級銆傛垜浠湪浼犺緭鐑洿鏂?bundle 鏂囦欢鏃讹紝鍙互鎶?bundle 鏂囦欢闅愬啓鍦ㄤ竴寮犲浘鐗囬噷锛岃繖鏍峰鏍镐汉鍛樺湪鍋氭祦閲忕洃鎺х殑鏃跺€欙紝鎶撳寘鐪嬪埌鐨勬槸涓€寮犲浘鐗囷紝濡傛灉涓嶆鏌ュ浘鐗囩殑浜岃繘鍒剁紪鐮侊紝鏄笉浼氬彂鐜伴噷闈㈤殣钘忎簡鏁版嵁鐨勩€?/p>

閽堝杩欑鏂规锛屾湇鍔$鍜屽鎴风鐨勬敼鍔ㄩ兘姣旇緝灏忥紝鏈嶅姟绔彧闇€瑕佹瘡娆′笅鍙?bundle 鏃跺墠鍚堝苟涓€涓浘鐗囨枃浠讹紝瀹㈡埛绔鍙栭殣鍐欏浘鐗囧悗鍘绘帀澶氫綑鐨勫浘鐗囨暟鎹氨鍙互浜嗐€?/p>


褰撶劧闅愬啓鏈繕鏈夊緢澶氱锛屾瘮濡傝鍩轰簬 LSB 鐨勫浘鐗囬殣鍐欐妧鏈紝鎶婃暟鎹啓鍦?jpg png mp4 鐨勬墿鍏呮暟鎹瓧娈甸噷锛屽洜涓哄師鐞嗗ぇ鍚屽皬寮傦紝杩欓噷灏变笉澶氫粙缁嶄簡锛屾劅鍏磋叮鐨勫悓瀛﹀彲浠ヨ嚜琛屾悳绱㈠涔犮€?/p>


1.2 瀵圭О鍔犲瘑

瀵圭О鍔犲瘑涔熸槸涓€涓巻鍙叉偁涔呯殑鍔犲瘑鎶€鏈紝鍦ㄤ俊鎭妧鏈殑鍔犳寔浜嗕笅涔熼閫熷彂灞曪紝鎴戜妇涓渶绠€鍗曠殑瀵圭О鍔犲瘑绠楁硶鈥斺€?strong>寮傛垨绠楁硶鍔犲瘑銆?/p>

寮傛垨杩愮畻鎴戞兂姣忎竴涓▼搴忓憳閮戒笉闄岀敓锛屾垜浠厛绾﹀畾 0 涓?false锛?1 涓?true锛岄偅涔?XOR 杩愮畻鐨勭湡鍊艰〃濡備笅锛?/p>

ABA 鈯?B
000
011
101
110

浠庣湡鍊艰〃鍙互寰堝鏄撴帹鍑轰笅闈㈢殑杩愮畻娉曞垯锛?/p>

$$A \\oplus 0=A$$

$$A \\oplus A=0$$

$$(A \\oplus B) \\oplus C=A \\oplus(B \\oplus C)$$


杩愮敤涓婇潰鐨勮繍绠楄鍒欙紝鎴戜滑鍋囪 $A$ 鏄?strong>瀵嗛挜锛屽鍐呭 $B$ 鍔犲瘑锛岄偅涔堝緱鍒扮殑瀵嗘枃灏辨槸 $(B \\oplus A)$锛涙兂瀵瑰瘑鏂囪В瀵嗭紝鍙璁╁瘑鏂囧拰瀵嗛挜 $A$ 鍐嶈繘琛屼竴娆″紓鎴栬繍绠楀氨鍙互浜嗭細$(B \\oplus A) \\oplus A=B \\oplus 0=B$

鎴戜滑鍙互鐢ㄤ唬鐮佷妇渚嬪瓙楠岀畻涓€涓嬶細

// 鍔犲瘑锛?// 鍘熸枃       瀵嗛挜       绉樻枃
01010111 ^ 11110011 = 10100100

// 瑙e瘑锛?// 绉樻枃       瀵嗛挜       鍘熸枃 
10100100 ^ 11110011 = 01010111

浼楁墍鍛ㄧ煡锛屼綅杩愮畻閮芥槸闈炲父蹇殑锛屽鏋滆绠€鍗曞湴瀵?bundle 鍋氫釜娣锋穯锛岀洿鎺ョ敤寮傛垨鍔犲瘑锛屽熀鏈笂涓嶄細褰卞搷鎬ц兘銆?/p>

铏界劧寮傛垨杩愮畻寰堢畝鍗曪紝浣嗘槸瀵嗙爜瀛︽湁涓涓€鍑嗗垯锛?strong>姘歌繙涓嶈鑷繁瀹炵幇鍔犲瘑绠楁硶銆傛垜浠彲浠ョ敤宸茬粡闈炲父鎴愮啛鐨勫绉板姞瀵嗙畻娉曪紙渚嬪 AES 鍜?DES锛夊 bundle 杩涜鍔犲瘑锛氭€ц兘楂橈紝瀹夊叏鎬уソ锛屾渶閲嶈鐨勬槸寮€婧愮ぞ鍖洪兘鏈夌幇鎴愮殑搴擄紝鐩存帴璋冨寘灏卞彲浠ヤ簡銆?/p>

鎵€浠ュ鏋滅敤瀵圭О鍔犲瘑鐨勬柟妗堬紝鍙鏈嶅姟绔拰瀹㈡埛绔晢閲忓ソ涓€涓瘑閽ワ紝鐒跺悗鏈嶅姟绔敤瀵嗛挜鍔犲瘑 bundle锛屽鎴风鐢ㄥ悓涓€涓瘑閽ヨВ瀵嗭紝灏辫兘鍦ㄤ竴瀹氱▼搴︿笂缁曡繃 App Store 鐨勫紓甯告祦閲忔娴嬨€?/p>


1.3 闈炲绉板姞瀵?/h4>

闈炲绉板姞瀵嗘槸灞炰簬杩戜唬瀵嗙爜瀛︾殑鍐呭浜嗭紝闈炲父鐨勬柊锛屼絾鏄篃闈炲父鐨勫彲闈狅紝鍏蜂綋鍘熺悊澶鏉備簡锛屼竴鍙ヤ袱鍙ユ牴鏈涓嶆竻妤氾紝鎴戝氨涓嶅仛浠嬬粛浜嗐€?/p>

鍦ㄥ姞瀵嗙儹鏇存柊 bundle 杩欎釜鍦烘櫙涓嬶紝鍏跺疄鍜屽绉板姞瀵嗙殑鏁堟灉宸笉澶氾紝鍙笉杩囨崲鎴愮閽ュ姞瀵嗗叕閽ヨВ瀵嗕簡銆?/p>


1.4 鎬荤粨

涓€鑸潵璇达紝瀵?bundle 鍔犲瘑涓嶄細鍗曠函浣跨敤涓€绉嶆妧鏈紝姣斿璇存垜浠細鐢?strong>娣峰悎鍔犲瘑鐨勬柟寮忓 bundle 鏈韩鍔犲瘑锛岀敤娑堟伅璁よ瘉鐮?/strong>锛堜緥濡?HMAC锛夐槻绡℃敼锛屽姞鍏?strong>鏃堕棿鎴抽殢鏈烘暟闃查噸鏀撅紝鏈€鍚庡啀鎶婂姞瀵嗗悗鐨勬暟鎹繘琛?strong>闅愬啓......杩欓噷闈㈢殑缁勫悎瀹炲湪鏄お澶氫簡锛屼釜浜鸿涓哄弬鑰冧竴浜涚粡鍏哥殑鍔犲瘑缁勫悎杩涜涓氬姟瀹炶返鍗冲彲銆?/p>


2.瀵逛俊閬撳姞瀵?/h3>

淇¢亾鍔犲瘑鍦ㄦ湰鏂囩殑鍦烘櫙涓嬩篃姣旇緝鐩磋锛屽氨鏄娇鐢?HTTPS 鍗忚锛岀洰鐨勫氨鏄槻姝㈠鏍镐汉鍛橀€氳繃鎶撳寘鐨勬柟寮忔崟鑾峰埌鎴戜滑鐨勭儹鏇存柊娴侀噺銆傚綋鐒?HTTPS 涔熸湁寰堝鐨勬湁鎰忔€濈殑鐭ヨ瘑鐐癸紝涓嬮潰鎴戝氨绠€鍗曚粙缁嶄竴涓嬨€?/p>


2.1 浣跨敤 HTTPS

2021 骞翠簡锛屾垜鎯充簰鑱旂綉涓婂熀鏈病鏈夎8闇茬殑 HTTP 鏄庢枃娴侀噺浜嗗惂......鍓嶅嚑骞村彲鑳借繕浼氭湁浼佷笟鑰冭檻 HTTPS 鍔犲瘑甯︽潵鐨勬湇鍔″櫒鎴愭湰锛屼絾鍦ㄥ悇澶у钩鍙帮紙iOS/Android/Chrome锛夌殑瑕佹眰涓嬶紝闄や簡涓埆鏃犱汉缁存姢鐨勭綉绔欙紝鍩烘湰閮藉叏绔欎笂 HTTPS 浜嗭紝姣曠珶鐜板湪鏁版嵁鐨勪环鍊艰繙杩滈珮浜庢湇鍔$鐨勭數璐癸紝涓婁簡 HTTPS 鍚庯紝璧风爜琚腑闂翠汉鏀诲嚮琚姭鎸佺殑姒傜巼浼氶檷浣庝笉灏戙€?/p>

涓?HTTPS 灏遍珮鏋曟棤蹇т簡鍚楋紵閭h偗瀹氫笉鏄€傛垜鍘诲勾鍐欒繃涓€绡?Charles 鎶撳寘鐨勬枃绔狅紝閲岄潰鑺变簡澶ч噺鐨勭瘒骞呭幓浠嬬粛 HTTPS 鎶撳寘銆傛棦鐒朵竴涓?APP 寮€鍙戣€呭彲浠ュ€熷姪甯傚満涓婄殑宸ュ叿杩涜鎶撳寘锛岄偅涔堝鏍镐汉鍛樻洿鍙互浜嗐€傚湪鎶撳寘宸ュ叿涓嬶紝澶ч儴鍒?HTTPS 鏁版嵁閮藉彲浠ヨ鎹曡幏鍜屽姭鎸併€備笅闈㈡垜浠氨璇磋 HTTPS 鍗忚涓竴浜涙瘮杈冮珮闃剁殑鍐呭銆?/p>


2.2 HTTPS 璇佷功鍥哄畾

HTTPS 璇佷功鍥哄畾锛屽張鍙?HTTPS 璇佷功閿佸畾锛岃嫳鏂囧悕涓?Certificate Pinning锛屾寚鐨勬槸鎴戜滑鍦?APP 鍐呯疆浠呮帴鍙楁寚瀹氬煙鍚嶇殑璇佷功锛岃€屼笉鎺ュ彈鎿嶄綔绯荤粺鎴栨祻瑙堝櫒鍐呯疆鐨凜A鏍硅瘉涔﹀搴旂殑浠讳綍璇佷功銆?/p>

閫氳繃杩欑鎺堟潈鏂瑰紡锛屾垜浠彲浠ヤ繚闅?APP 涓庢湇鍔$閫氫俊鐨勫敮涓€鎬у拰瀹夊叏鎬с€傚鏋滃紑鍚簡鎶撳寘杞欢锛屼笉涓诲姩瀵煎叆鍥哄畾鐨勮瘉涔?/a>锛屽氨鏃犳硶鏈夋晥鐨勬姄鍖咃紙鍏蜂綋鍘熺悊鍙湅鎴戠殑鍗氭枃锛?a href="https://link.segmentfault.com/?url=https%3A%2F%2Fsupercodepower.com%2Fuse-charles%23%25E4%25B8%2580%25E3%2580%2581charles-%25E6%258A%2593%25E5%258C%2585%25E5%258E%259F%25E7%2590%2586" rel="nofollow">Charles 鎶撳寘鍘熺悊锛夈€傛垜鎯冲鏍镐汉鍛樿繕娌¢偅涓簿鍔涘幓鐮稿3浣犵殑 APP 鑾峰彇浣犵殑璇佷功锛屾墍浠ュ彲浠ラ€氳繃杩欑鏂瑰紡闅愯棌浣犵殑鐑洿鏂?bundle銆?/p>

褰撶劧锛岃瘉涔﹀浐瀹氫篃鏄湁涓€瀹氫唬浠风殑銆侰A 绛惧彂璇佷功閮藉瓨鍦ㄦ湁鏁堟湡闂锛屾墍浠ョ己鐐规槸鍦ㄨ瘉涔︾画鏈熷悗闇€瑕佸皢璇佷功閲嶆柊鍐呯疆鍒?APP 涓€?/p>


2.3 HTTPS 鍙屽悜璁よ瘉

鎴戜滑骞冲父浣跨敤 HTTPS 鏃讹紝涓€鑸彧鍋氫簡鍗曞悜璁よ瘉锛屽嵆瀹㈡埛绔璇佹湇鍔$鐨勭湡瀹炴€?/strong>銆傚叾瀹?HTTPS 鏀寔鍙屽悜璁よ瘉鐨勶紝鍗?strong>鏀寔鏈嶅姟绔璇佸鎴风鐨勭湡瀹炴€?/strong>锛堝叿浣撴祦绋嬪彲瑙佷笅鍥?* 閮ㄥ垎锛夈€?/p>

涓€鑸潵璇村紑鍚?HTTPS 鍙屽悜璁よ瘉鐨?APP 閮芥槸閭g瀹夊叏鎬ц姹傛瀬楂樼殑 APP锛屾瘮濡傝閲戣瀺绫?APP 鍜屽尶鍚嶇ぞ浜ょ被 APP銆傝€屼笖鎯宠瀹炵幇鍙屽悜璁よ瘉锛屽氨蹇呴』瑕佸湪瀹㈡埛绔唴缃竴浠藉叕閽ヨ瘉涔﹀拰绉侀挜锛屼絾 APP 鍙堟湁鐮稿3椋庨櫓锛屾墍浠ヨ繕寰楁兂鍔炴硶鎶婅繖涓や釜涓滆タ鍔犲瘑鍜岄殣鍐欙紙閮芥垚淇勭綏鏂濞冧簡锛夈€?/p>

缁煎悎鏉ョ湅锛屽疄鐜?HTTPS 鍙屽悜璁よ瘉鐨勬垚鏈繕鏄緢楂樼殑锛屼絾鏄竴鏃﹀疄鐜帮紝瀹夊叏绯绘暟杩樻槸闈炲父楂樼殑锛屼笉浠呬粎鏄粫杩囧鏍镐汉鍛樼殑娴侀噺妫€娴嬶紝缁煎悎鏉ョ湅鏁翠釜 APP 鐨勭綉缁滃畨鍏ㄩ兘寰楀埌浜嗘瀬澶х殑闃叉姢銆?/p>


鍥涖€佹€荤粨

瀵逛簬鐑洿鏂拌繖浠朵簨锛屾牴鎹?Apple 鐨勫簲鐢ㄨ鑼冿紝鍩轰簬 JavaScriptCore 鐨勭儹鏇存柊鏄畬鍏ㄥ彲琛岀殑锛屼絾鍓嶆彁鏄綘蹇呴』瀹堣鐭╋紝涓嶈兘鑴辩 Apple 鐨勬帉鎺ц寖鍥达紱浣嗘槸 App Store 鐨勫鏍歌鍒欏張鏋佸叾涓嶉€忔槑锛岃櫧鐒舵垜浠槸鑹皯锛屼絾鏄竴瀹氱▼搴︿笂杩樻槸瑕侀殣钘忎竴涓嬬儹鏇存柊 bundle锛岃閬夸笉蹇呰鐨勯夯鐑︼紱闅愯棌鐑洿鏂?bundle 鎴戜滑鍙互浠庝俊婧愬姞瀵嗗拰淇¢亾鍔犲瘑涓や釜瑙掑害鍘绘€濊€冿紝缁煎悎鏉ョ湅灏辨槸鐏垫椿鍒╃敤瀵嗙爜瀛︾煡璇嗭紝瀵圭綉缁滄暟鎹繘琛屽姞瀵嗭紝闃叉琚娴嬪嚭寮傚父娴侀噺锛岄殣钘?bundle 鐨勫悓鏃讹紝涔熶繚鎶や簡鐢ㄦ埛鐨勬暟鎹畨鍏紝闄嶄綆琚敾鍑荤殑鍙兘鎬с€?/p>

浜斻€佸弬鑰冮槄璇?/h2>

馃嵍 涓轰粈涔堜綘鐨?Charles 浼氭姄鍖呭け璐ワ紵


濡傛灉浣犲枩娆㈡垜鐨勬枃绔狅紝甯屾湜鐐硅禐馃憤 鏀惰棌 馃搧 鍦ㄧ湅 馃専 涓夎繛鏀寔涓€涓嬶紒锛侊紒璋㈣阿浣狅紝杩欏鎴戠湡鐨勫緢閲嶈锛?/blockquote>

娆㈣繋澶у鍏虫敞鎴戠殑寰俊鍏紬鍙凤細鍗よ泲瀹為獙瀹?/strong>锛岀洰鍓嶄笓娉ㄥ墠绔妧鏈紝瀵瑰浘褰㈠涔熸湁涓€浜涘井灏忕爺绌躲€?/p>

鍗氬鍘熸枃锛?a href="https://link.segmentfault.com/?url=https%3A%2F%2Fsupercodepower.com%2Fhow-to-hide-bundle" rel="nofollow">馃檲 濡備綍闅愯棌浣犵殑鐑洿鏂?bundle 鏂囦欢锛?/a>

以上是关于馃檲 濡備綍闅愯棌浣犵殑鐑洿鏂?bundle 鏂囦欢锛?/a>的主要内容,如果未能解决你的问题,请参考以下文章

銆岀26璁层€?濡備綍鐩戞帶鍜岃瘖鏂?JVM 鍫嗗唴鍜屽澶栧唴瀛樹娇鐢紵|瀛︿範绗旇

鐐瑰嚮椤甸潰鍏跺畠鍦版柟闅愯棌鏌愪釜div鐨勪袱绉嶆€濊矾

threejs灏勭嚎鎷惧彇锛堟ā鍨嬬偣鍑讳簨浠讹級浠ュ強鎺у埗妯″瀷闅愯棌

iOS 14闅愯棌褰╄泲锛佽交鐐规墜鏈鸿儗闈㈢珶鑳芥埅灞忥紒

鐢?Homebrew 甯﹂浣犵殑 Mac

涓€鏂囧甫浣犵帺杞璁℃ā寮忎箣銆岃矗浠婚摼銆?/a>