0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

iOSアプリ開発環境構築@M3Mac

Posted at

iOSアプリのプロジェクト一式をとりあえず落としてBuildしたらエラー
そういえば、このMacでビルドするの初めてだった

Unable to open base configuration reference file '/pj_name/Pods/Target Support Files/Pods-appname/Pods-appname.debug.xcconfig'.

どうもCocoaPodsが入ってなかった模様(...そりゃそうか)

CocoaPodsのインストール

% sudo gem install cocoapods
:
:
ERROR:  Error installing cocoapods:
	The last version of securerandom (>= 0.3) to support your Ruby & RubyGems was 0.3.2. Try installing it with `gem install securerandom -v 0.3.2` and then running the current command again
	securerandom requires Ruby version >= 3.1.0. The current ruby version is 2.6.10.210.

rubyのバージョンが古いんだよと怒られる

ruby入れる、前にrbenv入れる

% brew install rbenv ruby-build

バージョン確認して、とりあえずこの時点ではリリースされて間もないが、3.4をインストールして切り替える

% rbenv install --list
3.1.6
3.2.6
3.3.7
3.4.1
jruby-9.4.10.0
mruby-3.3.0
picoruby-3.0.0
truffleruby-24.1.1
truffleruby+graalvm-24.1.1

% rbenv install 3.4.1
:
NOTE: to activate this Ruby version as the new default, run: rbenv global 3.4.1
% rbenv global 3.4.1
% rbenv versions
  system
* 3.4.1 (set by /Users/xxx/.rbenv/version)
% ruby -v
ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin23]

...切り替わってない

% which ruby
/usr/bin/ruby

% source ~/.zshrc
% ruby -v
ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [arm64-darwin23]

OK

もう一回CocoaPodsのインストール

% sudo gem install cocoapods
:
:
Successfully installed cocoapods-core-1.16.2
Successfully installed cocoapods-1.16.2
34 gems installed

A new release of RubyGems is available: 3.6.2 → 3.6.3!
Run `gem update --system 3.6.3` to update your installation.

gemの新しいのがあるらしいが、一旦無視でsetupしてlockファイルから依存関係をインストール
(動作確認なので作られたプロジェクトをごっそり持ってきている)

% pod setup
Setup completed
% pod install

インストール後、Xcodeに戻って無事にBuild成功

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?