三亚房产网站开发,手机应用下载网站源码,网站开发专业简历模板,wordpress显示时间插件下载文章目录 一、前言二、xcode-select 命令三、拓展阅读 一、前言
项目初期#xff0c;需要搭建项目基本框架#xff0c;为此离不开辅助工具#xff0c;即脚手架。当然#xff0c;IDE也可以实现新建空白项目#xff0c;但是其新建后的项目结构可能不符合预期设计#xff0… 文章目录 一、前言二、xcode-select 命令三、拓展阅读 一、前言
项目初期需要搭建项目基本框架为此离不开辅助工具即脚手架。当然IDE也可以实现新建空白项目但是其新建后的项目结构可能不符合预期设计故需要通过脚手架创建项目方式统一项目开发规范对于开发管理至关重要。
脚手架shell文本命令(createiOS.sh)如下
git clone http://88.66.99.83/BPPlatform/vast_app_template.git
cd vast_app_template
/usr/local/cocoapods/bundle/bin/bundle-env ruby create_xcode_project.rb ../ TestSC com.boc.test
open ../其中create_xcode_project.rb文件内容如下: require File.expand_path(../proj_creator, __FILE__)
require File.expand_path(../file_migration, __FILE__)
require File.expand_path(../conf_substitution, __FILE__)
require File.expand_path(../create_main_workspace, __FILE__)# # create program
# puts \033[32mSTART\033[0m\n
# creator ProCreator.new
# creator.start
#
# # migrate files
# puts \033[32mfiles setting...\033[0m\n
# mig FileMigration.new
# mig.migration
#
# # replace key words
# puts \033[32mcontent setting...\033[0m\n
# subOp ConfSubsitution.new
# subOp.start
#
# puts \033[32mpod install...\033[0m\n
# puts \033[32m#{pod install}\033[0m\n
#
#rootpath ARGV.shiftprojName ARGV[0]bundleid ARGV[1]widgets ARGV[2]generator WorkspaceGenerator.new(rootpath, projName, bundleid, widgets)generator.create
执行shell脚本
./createiOS.sh生成后的项目结构如下图所示 由项目结构可知脚手架中对项目做了很好的分层处理便于项目解耦。
二、xcode-select 命令 Print or change the path to the active developer directory. This directory controls which tools are used for the Xcode command line tools (for example, xcodebuild) as well as the BSD development commands (such as cc and make). 用-help可查看xcode-select存在哪些命令 当安装多个xcode的版本使用该工具使用指定的版本。
-p 或者 --print-path 查看当前开发者目录也即是xcode的版本目录。-s path 或 --switch path 选择xcode版本。--install 安装--version 查看版本--reset 恢复默认sudo rm -rf /Library/Developer/CommandLineTools 强制删除安装目录下的文件
sudo xcode-select --switch Xcode.app三、拓展阅读
《iOS 进阶专栏》