Invalid date
外で働いてる時に、2016MacbookProが限界を迎えつつあったので、会社にM1チップのMacBookAirを買ってもらった。(7コア / 16GB / 256GB)
2/25に注文して、3/18に郵送された。
毎回新しいPCが来たら、下記のBrewfileから使っているソフトを自動で入れる様にしている。
下記の3つを入れる際に、下記のエラーが表示されて入れられなかったので、sudo softwareupdate --install-rosetta
をしてから入れ直した。
adoptopenjdk/openjdk
google-cloud-sdk
google-japanese-ime
==> Running installer for google-japanese-ime; your password may be necessary.
Package installers may write to any location; options such as `--appdir` are ignored.
installer: This package requires Rosetta 2 to be installed.
Please install Rosetta 2 and then try again.
`sudo softwareupdate --install-rosetta`
セキュリティの許可が必要なファイル(karabiner_grabber)が見つからなかったので、下記を参考に直した。
Karabiner-Elements/issues/1867
bundler: failed to load command: pod (/usr/local/bin/pod)
LoadError: dlsym(0x7fde8851a620, Init_ffi_c): symbol not found - /Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1/lib/ffi_c.bundle
/Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1/lib/ffi.rb:6:in `require'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1/lib/ffi.rb:6:in `rescue in <top (required)>'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1/lib/ffi.rb:3:in `<top (required)>'
/Library/Ruby/Gems/2.6.0/gems/ethon-0.12.0/lib/ethon.rb:2:in `require'
/Library/Ruby/Gems/2.6.0/gems/ethon-0.12.0/lib/ethon.rb:2:in `<top (required)>'
/Library/Ruby/Gems/2.6.0/gems/typhoeus-1.4.0/lib/typhoeus.rb:2:in `require'
/Library/Ruby/Gems/2.6.0/gems/typhoeus-1.4.0/lib/typhoeus.rb:2:in `<top (required)>'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/sources_manager.rb:5:in `require'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/sources_manager.rb:5:in `<top (required)>'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/core_overrides.rb:1:in `require'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/core_overrides.rb:1:in `<top (required)>'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods.rb:75:in `require'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods.rb:75:in `<module:Pod>'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods.rb:17:in `<top (required)>'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/bin/pod:36:in `require'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/bin/pod:36:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<top (required)>'
error Command failed with exit code 1.
Finderでターミナルを右クリック、「情報を見る」から、「ロゼッタで開く」へ✔️を入れて起動する。
起動後下記のコマンドで動いた。
# pod を入れなおす
$ sudo arch -x86_64 gem install cocoapods -n /usr/local/bin
# Install ffi
$ sudo arch -x86_64 gem install ffi
# Re-install dependency
$ arch -x86_64 pod install
bundlerを使っている場合には、bundlerでffiを追加して、installし直す。
$ bundle add ffi
$ bundle install --path vendor/bundle
$ bundle exec pod install
configure: WARNING: 'missing' script is too old or missing
configure: error: in `/Users/tt/Library/Caches/CocoaPods/Pods/Release/Flipper-Glog/0.3.6-1dfd6':
configure: error: C compiler cannot create executables
facebook/react-native#25561 (comment)を参考に、下記コマンドで修正
$ sudo xcode-select --switch /Applications/Xcode.app
$ cd ios && pod install
Pods ProjectName.debug.xcconfig unable to open file. Wrong directory
$ pod deintegrate
$ pod install
stackoverflow/xcode-pods-projectname-debug-xcconfig-unable-to-open-file-wrong-directory
XcodeでDebugBuildしようとした際に、下記のエラーで怒られる。
(ONLY_ACTIVE_ARCH=YES, active arch=arm64, VALID_ARCHS=arm64 arm64e i386 x86_64, EXCLUDED_ARCHS=(
arm64
)).
BuildSettingsへVALID_ARCHS
を追加。
値にarm64 arm64e armv7 armv7s x86_64
を追加。
Build Settings の Build Active Architecture Only
を No
へ