
純代碼項目
新建工程
- File ---> New ---> Project ---> Single View App
| 左側(cè) | 解釋 |
|---|---|
| Product Name | 產(chǎn)品名稱、項目名稱、軟件名稱 |
| Team | 開發(fā)團(tuán)隊(可不填) |
| Organization Name | 公司名稱、組織名稱 |
| Organization Identifier | 公司的唯一標(biāo)識 |
| Bundle Identifier | 軟件的唯一標(biāo)識(一般是Organization Identifier + Product Name) |
| Language | Objective-C / Swift |
| Use Core Data | 框架:以對象的方式調(diào)用對應(yīng)的數(shù)據(jù)存取接口來存取數(shù)據(jù) |
| Include Unit Tests | 收錄單元測試 |
| Include UI Tests | 自動測試UI交互的自動化測試框架 |
- 刪除不必要的類
ViewController.h
ViewController.m
Main.storyboard
- 點擊項目 ---> General
Identity
| 左側(cè) | 解釋 |
|---|---|
| Display Name | 手機(jī)屏幕上的應(yīng)用名字 |
| Bundle Identifier | 軟件的唯一標(biāo)識 |
| Version | App Store以及iTunes中顯示的版本號 |
| Build | 開發(fā)人員的版本號(測試用) |
Deployment Info
| 左側(cè) | 解釋 |
|---|---|
| Deployment Target | 調(diào)整支持版本 |
| Devices | 選擇開發(fā)設(shè)備( Universal / iPhone / Ipad ) |
| Main interface | 主界面(如果執(zhí)行了2:刪除不必要的類,刪除選項并且回車) |
| Device Orientation | 設(shè)備方向( Portrait:默認(rèn) / Upside Down:上下翻轉(zhuǎn) / Landscape Left:左側(cè)翻轉(zhuǎn) / Landscape Right:右側(cè)翻轉(zhuǎn) ) |
| Status Bar Style | 狀態(tài)欄樣式( Default:默認(rèn)黑色 / Light:高亮白色 ) |
| Hide status bar | 隱藏狀態(tài)欄 |
| Requires full screen | 是否全屏 |
-
點擊項目 ---> Build Settings ---> Build Options --->Enable Bitcode 改為NO。BitCode功能詳解
對應(yīng)iOS,bitcode是可選的。
對于watchOS,bitcode是必須的。
Mac OS不支持bitcode。 info.plist中添加 App Transport Security Settings的Allow Arbitrary Loads 設(shè)置為YES,開啟http。
添加應(yīng)用白名單:在info.plist增加key:LSApplicationQueriesSchemes,類型為NSArray
配置項目
導(dǎo)入第三方庫
手動拖進(jìn)去,需要根據(jù)官方文檔安裝
常用的庫
AFNetworking:網(wǎng)絡(luò)請求組件
常用的第三方服務(wù)
編寫代碼
創(chuàng)建接口文件
寫代碼