swift與OC用OpenSSL進行RSA加密遇到的坑

2018-4-21 總結

oc應該也可以用

屏幕快照 2018-04-21 上午10.42.28.png
報錯:
ld: '/Users/macos/Desktop/TTRsa/Pods/OpenSSL/lib/libcrypto.a(bio_lib.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
當你從cocopod下來 OpenSSL時/或者不管從什麼地方直接獲取到文件拖進工程的,可能在真機下會遇到此錯誤,當然只要你把 bitCode設置爲NO就可以通過
但我是強迫症,我不想這麼幹!!!!!!!!!!!!!!!!!!

原因 :libcrypto.a 這個文件太舊了,你必須想辦法弄個新的來代替。
最方便的就是直接從 支付寶最新支付Demo拿來用或者你自己整一個
當你從我Demo把文件拖進你工程時,還要添加一下路徑,不然會報錯:xxxx文件not fond
屏幕快照 2018-04-21 上午11.38.09.png
我這裏提供了Demo,不出意外,應該沒問題

https://gitee.com/null_913_7816/TTRSA
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章