01. 環境構築 - tsutsumikeiichi/test-i-wiki GitHub Wiki
Welcome to the test wiki!
Developerアカウントの作成
App Store Connect に Developer アカウントを作成します。
管理者権限を持っている人にお願いしてください。
参考 (ポケアンwiki。UIが古い)
iOS プロジェクトの準備
https://github.com/MarketingApplications/otonari-iOS
こちらのプロジェクトをgit clone
してください。
関連ツールのインストール
- Ruby インストール
rbenv などでインストールしてください。手順は省略。
- Bundler インストール
$ gem install bundler
- Bundler で Gemfile に記載した CocoaPods と Fastlane をインストール
$ bundle install
- Carthage インストール
$ brew install carthage
- SwiftLint インストール
$ brew install swiftlint
- Swiftgen インストール(開発者のみ)
$ brew install swiftgen
iOS 外部ライブラリのインストール
プロジェクトディレクトリに移動。
- CocoaPods で Podfile に記載したライブラリをインストール
$ bundle exec pod setup
$ bundle exec pod install
- Carthage で Cartfile に記載したライブラリをインストール
$ carthage bootstrap --platform iOS --cache-builds --use-xcframeworks
# Xcode で Debug ビルド時に RxSwift のエラーが出る場合はこちらを実行してください
$ carthage bootstrap --platform iOS --no-use-binaries --cache-builds --configuration Debug
証明書インストール
以下Googleドライブに Development, Distribution の証明書のp12ファイルが置いてあります。
ファイルをダブルクリックして各自のMacのKeychainにインストールしてください(パスワードは空で入力)。
https://drive.google.com/open?id=0ByJS7f-rgHSVeTBfZlRiRDBuZ2c
https://drive.google.com/drive/folders/1wOh_dX6OURbKNleMg9bwoYA7da1JSXAM
Xcodeの準備
- Xcode 10.1 インストール
AppStore からインストール、またはこちらからXcodeをダウンロード可能 - Xcode を起動して
Marketing Applications, Inc.
チームに登録したアカウントを設定する- Xcode -> Preferences -> Account から Apple ID 追加
アプリのビルド
- Xcode で
otonari-iOS.xcworkspace
を開く - Scheme を Debug にして、ビルド実行
iOS Project setup
https://github.com/MarketingApplications/otonari-iOS
Clone this repository to your local env.
Dependency tools installation
-
Install Ruby
-
Install Bundler
$ gem install bundler
- Install CocaPods, Faslane etc defined in Gemfile by Bundler
$ bundle install --path=~/vendor/bundle
- Install Carthage
$ brew install carthage
- Install Swiftgen
$ brew install swiftgen
Install iOS libraries
Move to the folder of project repository
- Install libraries by CocoaPods
$ bundle exec pod setup
$ bundle exec pod install
- Install libraries by Carthage
$ carthage bootstrap --platform iOS --no-use-binaries --cache-builds --new-resolver
Install certification
- Download p12 files for Development and Distribution env from here
- Double click p12 files to install Keychain. (No password, just press return when password is requested)
Prepare Xcode
- Install Xcode (>= 10.1)
- Launch Xcode and login with the account under team
Marketing Applications, Inc.
- Add Apple ID at Xcode -> Preferences -> Account
How to Build
- Open
otonari-iOS.xcworkspace
in Xcode - Set Scheme to Debug then build