1奕纫、新建項(xiàng)目“AliDemo”
2提陶、引入sdk、資源文件匹层、openssl隙笆、util锌蓄、order文件
3、引入系統(tǒng)框架
4撑柔、在觸發(fā)事件中寫入代碼瘸爽,如ViewController.m按鈕的點(diǎn)擊事件- (IBAction)payBtnClick:(id)sender {}
5、注冊(cè)Schemes,加入白名單铅忿,Info --> URL Types?
6剪决、運(yùn)行發(fā)現(xiàn)剩余問題
6.1 Cannot find interface declaration for 'NSObject', superclass of 'Base64'
創(chuàng)建pct文件-->引入<Foundation/Foundation.h>-->Build Settings-->搜索prefix -->Prefix Header --> 輸入$(SRCROOT)/項(xiàng)目名/.pch文件名
6.2 ?'openssl/asn1.h' file not found
Build Setting --> Search Path --> Header Search Paths --> 輸入openssl文件的上一級(jí)路徑
6.3 "_BIO_free_all", referenced from:
? ? ? "_BIO_new", referenced from:
? ? ? "_BIO_s_file", referenced from:
如果出現(xiàn)6.3錯(cuò)誤,是因?yàn)榈诙酵藢?dǎo)入.a文件?
6.4? base64.h和base64.m出錯(cuò)檀训,建立pct文件柑潦,引入Foundation系統(tǒng)框架.