Closed64

もくまっち開発 Week 6

光岡 高宏光岡 高宏

Job の定義はこんな感じ

  build-ios:
    name: Build for iOS
    runs-on: macos-latest

    steps:
      - name: Checks-out my repository
        uses: actions/checkout@v2

      - name: Install Flutter
        run: git clone https://github.com/flutter/flutter.git

      - name: Add path
        run: echo "$(pwd)/flutter/bin" >> $GITHUB_PATH

      - name: Download Flutter packages
        run: flutter pub get

      - name: Build iOS
        run: flutter build ios
光岡 高宏光岡 高宏

flutter build iosで落ちた

Run flutter build ios
  flutter build ios
  shell: /bin/bash -e {0}
  
Downloading ios tools...                                           10.7s
Downloading ios-profile tools...                                    8.0s
Downloading ios-release tools...                                    6.8s
Building com.mycompany.mochmatch for device (ios-release)...
Upgrading contents.xcworkspacedata
Updating project for Xcode compatibility.
Upgrading project.pbxproj
Upgrading Runner.xcscheme
Upgrading Info.plist
Removing script build phase dependency analysis.
Adding input path to Thin Binary build phase.
════════════════════════════════════════════════════════════════════════════════
No valid code signing certificates were found
You can connect to your Apple Developer account by signing in with your Apple ID
in Xcode and create an iOS Development Certificate as well as a Provisioning 
Profile for your project by:
  1- Open the Flutter project's Xcode target with
       open ios/Runner.xcworkspace
  2- Select the 'Runner' project in the navigator then the 'Runner' target
     in the project settings
  3- Make sure a 'Development Team' is selected under Signing & Capabilities > Team. 
     You may need to:
         - Log in with your Apple ID in Xcode first
         - Ensure you have a valid unique Bundle ID
         - Register your device with your Apple Developer Account
         - Let Xcode automatically provision a profile for your app
  4- Build or run your project again
  5- Trust your newly created Development Certificate on your iOS device
     via Settings > General > Device Management > [your new certificate] > Trust

For more information, please visit:
  https://developer.apple.com/library/content/documentation/IDEs/Conceptual/
  AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html

Or run on an iOS simulator without code signing
════════════════════════════════════════════════════════════════════════════════
No development certificates available to code sign app for device deployment
Error: Process completed with exit code 1.
光岡 高宏光岡 高宏

Xcode のインストール
macOS が古くて最新版をインストールできないので、 OS のアップデートから。
そんな古い OS 使ってたのか...

光岡 高宏光岡 高宏

メジャーアップデートすると環境壊れそうなので、マイナーアップデートのみにする

光岡 高宏光岡 高宏
  • OS アップデート
  • Xcode インストール
  • CocoaPods インストール
  • Flutter SDK インストール
  • Xcode の設定
  • シミュレーターの設定
  • flutter doctor 実行
光岡 高宏光岡 高宏
$ flutter doctor

だいぶ埋まってきてる
あとは Android toolchain のみ

┌─────────────────────────────────────────────────────────┐
│ A new version of Flutter is available!                  │
│                                                         │
│ To update to the latest version, run "flutter upgrade". │
└─────────────────────────────────────────────────────────┘
Doctor summary (to see all details, run flutter doctor -v):
[] Flutter (Channel stable, 3.16.7, on macOS 13.6.3 22G436 darwin-arm64, locale ja-JP)
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[] Xcode - develop for iOS and macOS (Xcode 15.2)
[] Chrome - develop for the web
[] Android Studio (version 2021.3)
[] VS Code (version 1.85.2)
[] Connected device (2 available)
[] Network resources

! Doctor found issues in 1 category.
光岡 高宏光岡 高宏
$ flutter doctor

メッセージ変わった
次は flutter doctor --android-licenses 実行してみる

Doctor summary (to see all details, run flutter doctor -v):
[] Flutter (Channel stable, 3.16.7, on macOS 13.6.3 22G436 darwin-arm64, locale ja-JP)
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[] Xcode - develop for iOS and macOS (Xcode 15.2)
[] Chrome - develop for the web
[] Android Studio (version 2023.1)
[] Android Studio (version 2021.3)
[] VS Code (version 1.85.2)
[] Connected device (2 available)
[] Network resources

! Doctor found issues in 1 category.
光岡 高宏光岡 高宏
$ flutter doctor --android-licenses

いろいろ聞かれるので y を入力する

(略)
All SDK package licenses accepted

アクセプトされた

光岡 高宏光岡 高宏
$ flutter doctor

OK !

Doctor summary (to see all details, run flutter doctor -v):
[] Flutter (Channel stable, 3.16.7, on macOS 13.6.3 22G436 darwin-arm64, locale ja-JP)
[] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[] Xcode - develop for iOS and macOS (Xcode 15.2)
[] Chrome - develop for the web
[] Android Studio (version 2023.1)
[] Android Studio (version 2021.3)
[] VS Code (version 1.85.2)
[] Connected device (2 available)
[] Network resources

• No issues found!
光岡 高宏光岡 高宏

これで Flutter 周りのセットアップが終わったので、 iOS のビルドに戻る

  • OS アップデート
  • Xcode インストール
  • CocoaPods インストール
  • Flutter SDK インストール
  • Xcode の設定
  • シミュレーターの設定
  • flutter doctor 実行
光岡 高宏光岡 高宏
$ flutter build ios

GitHub Actions でのビルドと同じメッセージが表示された
ローカルで解消していく

Downloading ios tools...                                            5.7s
Downloading ios-profile tools...                                    4.9s
Downloading ios-release tools...                                    5.0s
Building com.mycompany.mochmatch for device (ios-release)...
Upgrading contents.xcworkspacedata
Updating project for Xcode compatibility.
Upgrading project.pbxproj
Upgrading Runner.xcscheme
Upgrading Info.plist
Removing script build phase dependency analysis.
Adding input path to Thin Binary build phase.
════════════════════════════════════════════════════════════════════════════════
No valid code signing certificates were found
You can connect to your Apple Developer account by signing in with your Apple ID
in Xcode and create an iOS Development Certificate as well as a Provisioning
Profile for your project by:
  1- Open the Flutter project's Xcode target with
       open ios/Runner.xcworkspace
  2- Select the 'Runner' project in the navigator then the 'Runner' target
     in the project settings
  3- Make sure a 'Development Team' is selected under Signing & Capabilities > Team.
     You may need to:
         - Log in with your Apple ID in Xcode first
         - Ensure you have a valid unique Bundle ID
         - Register your device with your Apple Developer Account
         - Let Xcode automatically provision a profile for your app
  4- Build or run your project again
  5- Trust your newly created Development Certificate on your iOS device
     via Settings > General > Device Management > [your new certificate] > Trust

For more information, please visit:
  https://developer.apple.com/library/content/documentation/IDEs/Conceptual/
  AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html

Or run on an iOS simulator without code signing
════════════════════════════════════════════════════════════════════════════════
No development certificates available to code sign app for device deployment
光岡 高宏光岡 高宏

4- Build or run your project again

で、下記のエラーが発生した

could not find included file 'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths
光岡 高宏光岡 高宏

Flutter プロジェクトの ios ディレクトリで pod install を実行したら解消した

$ pwd

/Users/nix/ghq/github.com/protoout/mochmatch/ios
$ pod install

Analyzing dependencies
cloud_firestore: Using Firebase SDK version '10.18.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '10.18.0' defined in 'firebase_core'
firebase_performance: Using Firebase SDK version '10.18.0' defined in 'firebase_core'
Adding spec repo `trunk` with CDN `https://cdn.cocoapods.org/`
Downloading dependencies
Installing BoringSSL-GRPC (0.0.24)
Installing FMDB (2.7.5)
Installing Firebase (10.18.0)
Installing FirebaseABTesting (10.20.0)
Installing FirebaseAppCheckInterop (10.20.0)
Installing FirebaseCore (10.18.0)
Installing FirebaseCoreExtension (10.20.0)
Installing FirebaseCoreInternal (10.20.0)
Installing FirebaseFirestore (10.18.0)
Installing FirebaseFirestoreInternal (10.20.0)
Installing FirebaseInstallations (10.20.0)
Installing FirebasePerformance (10.18.0)
Installing FirebaseRemoteConfig (10.20.0)
Installing FirebaseSessions (10.20.0)
Installing FirebaseSharedSwift (10.20.0)
Installing Flutter (1.0.0)
Installing GoogleDataTransport (9.3.0)
Installing GoogleUtilities (7.12.0)
Installing PromisesObjC (2.3.1)
Installing PromisesSwift (2.3.1)
Installing abseil (1.20220623.0)
Installing cloud_firestore (4.13.1)
Installing firebase_core (2.24.2)
Installing firebase_performance (0.9.3-8)
Installing gRPC-C++ (1.49.1)
Installing gRPC-Core (1.49.1)
Installing geolocator_apple (1.2.0)
Installing leveldb-library (1.22.2)
Installing nanopb (2.30909.1)
Installing package_info_plus (0.4.5)
Installing path_provider_foundation (0.0.1)
Installing shared_preferences_foundation (0.0.1)
Installing sqflite (0.0.2)
Installing url_launcher_ios (0.0.1)
Generating Pods project
Integrating client project
Pod installation complete! There are 10 dependencies from the Podfile and 34 total pods installed.

[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `Runner` to `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` or include the `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` in your build configuration (`Flutter/Release.xcconfig`).

[!] The `Runner [Debug]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

[!] The `Runner [Release]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

[!] The `Runner [Profile]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.
光岡 高宏光岡 高宏

その前に 3 ができてなかった

  3- Make sure a 'Development Team' is selected under Signing & Capabilities > Team.
     You may need to:
         - Log in with your Apple ID in Xcode first
         - Ensure you have a valid unique Bundle ID
         - Register your device with your Apple Developer Account
         - Let Xcode automatically provision a profile for your app
光岡 高宏光岡 高宏

ワーニングが 2 つ出てる

  • Unable to process request - PLA Update available

You currently don't have access to this membership resource. To resolve this issue, agree to the latest Program License Agreement in your developer account.

  • No profiles for 'com.mycompany.mochmatch' were found

Xcode couldn't find any iOS App Development provisioning profiles matching 'com.mycompany.mochmatch'.

光岡 高宏光岡 高宏

1 つ解消したら新しいのが出てきた

  • Unable to process request - PLA Update available

You currently don't have access to this membership resource. To resolve this issue, agree to the latest Program License Agreement in your developer account.

  • Communication with Apple failed

Your team has no devices from which to generate a provisioning profile. Connect a device to use or manually add device IDs in Certificates, Identifiers & Profiles. https://developer.apple.com/account/

  • No profiles for 'studio.protoout.miliconvalley.mochmatch' were found

Xcode couldn't find any iOS App Development provisioning profiles matching 'studio.protoout.miliconvalley.mochmatch'.

光岡 高宏光岡 高宏

Xcode 周りの設定めんどいな
スクリプト作るとかで再現性持たせたい
(次やるときには動かなくなってそうだけどw)

光岡 高宏光岡 高宏

下記をやると Xcode の Devices and Simulators に自分の iPhone が登録される

  • Mac に iPhone をつなぐ
  • iPhone の 設定 > プライバシーとセキュリティ > デベロッパーモードON にする
  • Xcode > Window > Devices and Simulators を開く
光岡 高宏光岡 高宏

いくつか質問されるので答えていったら設定ファイルみたいなものがダウンロードできるようになった
ダウンロードしてダブルクリックで実行するとインストールされるっぽい。

光岡 高宏光岡 高宏

お、 2 つとも解消した!

  • Unable to process request - PLA Update available

You currently don't have access to this membership resource. To resolve this issue, agree to the latest Program License Agreement in your developer account.

  • Communication with Apple failed

Your team has no devices from which to generate a provisioning profile. Connect a device to use or manually add device IDs in Certificates, Identifiers & Profiles. https://developer.apple.com/account/

  • No profiles for 'studio.protoout.miliconvalley.mochmatch' were found

Xcode couldn't find any iOS App Development provisioning profiles matching 'studio.protoout.miliconvalley.mochmatch'.

光岡 高宏光岡 高宏

エラーになった :(

$ flutter build ios

Building studio.protoout.miliconvalley.mochmatch for device (ios-release)...
Updating project for Xcode compatibility.
Upgrading project.pbxproj
Upgrading Runner.xcscheme
Automatically signing iOS for device deployment using specified development team in Xcode
project: 9Z99MR8XP3
Running pod install...                                              9.5s
Running Xcode build...
Xcode build done.                                           204.4s
Failed to build iOS app
Error (Xcode): Sandbox: rsync(2840) deny(1) file-write-create /Users/nix/ghq/github.com/protoout/mochmatch/build/ios/Release-iphoneos/Runner.app/Frameworks/openssl_grpc.framework/.Info.plist.1PIX8C


Error (Xcode): Sandbox: rsync(2840) deny(1) file-write-create
/Users/nix/ghq/github.com/protoout/mochmatch/build/ios/Release-iphoneos/Runner.app/Frameworks/openssl_grpc.framework/.openssl_grpc.EMVF9u


Encountered error while building for device.
光岡 高宏光岡 高宏

とりあえず sudo つけて再実行(良くない)

$ sudo flutter build ios

Password:
   Woah! You appear to be trying to run flutter as root.
   We strongly recommend running the flutter tool without superuser privileges.
  /
📎
Building studio.protoout.miliconvalley.mochmatch for device (ios-release)...
Automatically signing iOS for device deployment using specified development team in Xcode project: 9Z99MR8XP3
Running Xcode build...
Xcode build done.                                            6.6s
Failed to build iOS app
Error (Xcode): No profiles for 'studio.protoout.miliconvalley.mochmatch' were found: Xcode couldn't find any iOS App Development provisioning profiles matching
'studio.protoout.miliconvalley.mochmatch'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.
/Users/nix/ghq/github.com/protoout/mochmatch/ios/Runner.xcodeproj



It appears that there was a problem signing your application prior to installation on the device.

Verify that the Bundle Identifier in your project is your signing id in Xcode
  open ios/Runner.xcworkspace

Also try selecting 'Product > Build' to fix the problem.
Encountered error while building for device.
光岡 高宏光岡 高宏

Xcode > Product > Build 実行して問題を解決しろって書いてあるので実行してみる

光岡 高宏光岡 高宏

エラーになった。内容は前とおなじ。
Xcode だと sudo で実行することもできないので、一旦ターミナルで頑張ってみる

Sandbox: rsync(6853) deny(1) file-write-create /Users/nix/Library/Developer/Xcode/DerivedData/Runner-deqhhqehlygqroffxvhyawzjphra/Build/Products/Debug-iphonesimulator/Runner.app/Frameworks/openssl_grpc.framework/_CodeSignature

Sandbox: rsync(6854) deny(1) file-write-create /Users/nix/Library/Developer/Xcode/DerivedData/Runner-deqhhqehlygqroffxvhyawzjphra/Build/Products/Debug-iphonesimulator/Runner.app/Frameworks/openssl_grpc.framework/.Info.plist.AaBt3W

Sandbox: rsync(6854) deny(1) file-write-create /Users/nix/Library/Developer/Xcode/DerivedData/Runner-deqhhqehlygqroffxvhyawzjphra/Build/Products/Debug-iphonesimulator/Runner.app/Frameworks/openssl_grpc.framework/.openssl_grpc.iKMsDM
光岡 高宏光岡 高宏

Xcode couldn't find any iOS App Development provisioning profiles matching

でググると、 Xcode の設定を変えると解消するっぽい

https://program-life.com/928

Xcode > Runner > TARGETS/Runner > Build Settings > Signing > Code Signing Identity を全部 iOS Developer に変更

光岡 高宏光岡 高宏

CocoaPods がインストールされてないか使えない状態になってる様子

$ sudo flutter build ios

Password:
   Woah! You appear to be trying to run flutter as root.
   We strongly recommend running the flutter tool without superuser privileges.
  /
📎
Building studio.protoout.miliconvalley.mochmatch for device (ios-release)...
Automatically signing iOS for device deployment using specified development team in Xcode project: 9Z99MR8XP3
Warning: CocoaPods is installed but broken. Skipping pod install.
  You appear to have CocoaPods installed but it is not working.
  This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it.
  This can usually be fixed by re-installing CocoaPods.
To re-install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.



CocoaPods not installed or not in valid state.
光岡 高宏光岡 高宏

エラーになった

$ sudo arch -x86_64 gem install ffi

Fetching ffi-1.16.3.gem
Building native extensions. This could take a while...
ERROR:  Error installing ffi:
	ERROR: Failed to build gem native extension.

    current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.16.3/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20240121-8659-1u8wq6z.rb extconf.rb
checking for ffi.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
	--with-opt-dir
	--without-opt-dir
	--with-opt-include
	--without-opt-include=${opt-dir}/include
	--with-opt-lib
	--without-opt-lib=${opt-dir}/lib
	--with-make-prog
	--without-make-prog
	--srcdir=.
	--curdir
	--ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)
	--with-ffi_c-dir
	--without-ffi_c-dir
	--with-ffi_c-include
	--without-ffi_c-include=${ffi_c-dir}/include
	--with-ffi_c-lib
	--without-ffi_c-lib=${ffi_c-dir}/lib
	--enable-debug
	--disable-debug
	--enable-system-libffi
	--disable-system-libffi
	--with-libffi-config
	--without-libffi-config
	--with-pkg-config
	--without-pkg-config
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in `block in try_compile'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:534:in `with_werror'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in `try_compile'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1109:in `block in have_header'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in `block in checking_for'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block (2 levels) in postpone'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block in postpone'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in `postpone'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in `checking_for'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1108:in `have_header'
	from extconf.rb:10:in `system_libffi_usable?'
	from extconf.rb:46:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-22/2.6.0/ffi-1.16.3/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/ffi-1.16.3 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-22/2.6.0/ffi-1.16.3/gem_make.out
光岡 高宏光岡 高宏
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options

とのことなので、ライブラリが足りてないっぽい。
何が足りてないんだろ

光岡 高宏光岡 高宏

あ、エラーログにめっちゃ書いてあった

To see why this extension failed to compile, please check the mkmf.log which can be found here:

/Library/Ruby/Gems/2.6.0/extensions/universal-darwin-22/2.6.0/ffi-1.16.3/mkmf.log

光岡 高宏光岡 高宏

mkmf.log を見たら libffi がないとのこと。

package configuration for libffi is not found

光岡 高宏光岡 高宏

なんか CocoaPods を再インストールしてるっぽいのでやってみる

sudo gem install -n /usr/local/bin cocoapods

光岡 高宏光岡 高宏
$ sudo gem install -n /usr/local/bin cocoapods

Password:
Fetching colored2-3.1.2.gem
Fetching fourflusher-2.3.1.gem
Fetching public_suffix-4.0.7.gem
Fetching addressable-2.8.6.gem
Fetching ruby-macho-2.5.1.gem
Fetching gh_inspector-1.1.3.gem
Fetching nap-1.1.0.gem
Fetching escape-0.0.4.gem
Fetching rexml-3.2.6.gem
Fetching nanaimo-0.3.0.gem
Fetching claide-1.1.0.gem
Fetching atomos-0.1.3.gem
Fetching xcodeproj-1.23.0.gem
Fetching molinillo-0.8.0.gem
Fetching cocoapods-try-1.2.0.gem
Fetching netrc-0.11.0.gem
Fetching cocoapods-trunk-1.6.0.gem
Fetching cocoapods-search-1.0.1.gem
Fetching cocoapods-plugins-1.0.0.gem
Fetching cocoapods-downloader-2.1.gem
Fetching cocoapods-deintegrate-1.0.5.gem
Fetching ethon-0.16.0.gem
Fetching typhoeus-1.4.1.gem
Fetching concurrent-ruby-1.2.3.gem
Fetching httpclient-2.8.3.gem
Fetching algoliasearch-1.27.5.gem
Fetching fuzzy_match-2.0.4.gem
Fetching ruby2_keywords-0.0.5.gem
Fetching drb-2.2.0.gem
Fetching base64-0.2.0.gem
Fetching connection_pool-2.4.1.gem
Fetching tzinfo-2.0.6.gem
Fetching i18n-1.14.1.gem
Fetching activesupport-7.1.3.gem
Fetching cocoapods-core-1.14.3.gem
Fetching cocoapods-1.14.3.gem
Successfully installed public_suffix-4.0.7
Successfully installed addressable-2.8.6
Successfully installed ruby-macho-2.5.1
Successfully installed nap-1.1.0
Successfully installed gh_inspector-1.1.3
Successfully installed fourflusher-2.3.1
Successfully installed escape-0.0.4
Successfully installed colored2-3.1.2
Successfully installed rexml-3.2.6
Successfully installed nanaimo-0.3.0
Successfully installed claide-1.1.0
Successfully installed atomos-0.1.3
Successfully installed xcodeproj-1.23.0
Successfully installed molinillo-0.8.0
Successfully installed cocoapods-try-1.2.0
Successfully installed netrc-0.11.0
Successfully installed cocoapods-trunk-1.6.0
Successfully installed cocoapods-search-1.0.1
Successfully installed cocoapods-plugins-1.0.0
Successfully installed cocoapods-downloader-2.1
Successfully installed cocoapods-deintegrate-1.0.5
Building native extensions. This could take a while...
ERROR:  Error installing cocoapods:
	ERROR: Failed to build gem native extension.

    current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.16.3/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20240121-9438-14w6iw8.rb extconf.rb
checking for ffi.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
	--with-opt-dir
	--without-opt-dir
	--with-opt-include
	--without-opt-include=${opt-dir}/include
	--with-opt-lib
	--without-opt-lib=${opt-dir}/lib
	--with-make-prog
	--without-make-prog
	--srcdir=.
	--curdir
	--ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)
	--with-ffi_c-dir
	--without-ffi_c-dir
	--with-ffi_c-include
	--without-ffi_c-include=${ffi_c-dir}/include
	--with-ffi_c-lib
	--without-ffi_c-lib=${ffi_c-dir}/lib
	--enable-debug
	--disable-debug
	--enable-system-libffi
	--disable-system-libffi
	--with-libffi-config
	--without-libffi-config
	--with-pkg-config
	--without-pkg-config
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in `block in try_compile'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:534:in `with_werror'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in `try_compile'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1109:in `block in have_header'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in `block in checking_for'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block (2 levels) in postpone'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block in postpone'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in `postpone'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in `checking_for'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1108:in `have_header'
	from extconf.rb:10:in `system_libffi_usable?'
	from extconf.rb:46:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-22/2.6.0/ffi-1.16.3/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/ffi-1.16.3 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-22/2.6.0/ffi-1.16.3/gem_make.out
光岡 高宏光岡 高宏
  • iOS のビルド
    • 7~8 割くらいできてる感覚
    • flutter build ios を実行すると CocoaPods の途中で落ちるのが解決できず
  • 写真の before/after 確認
  • 写真が横になってるのを縦にする
  • HEIF フォーマットの写真のアップロード
  • Play ストアの開発者アカウント開設
このスクラップは3ヶ月前にクローズされました