Kotlin Multiplatform Academy · レッスン

iOS側のXcodeとCocoaPods

iOSアプリをビルドするためのMac側の前提条件を確認します

レッスン 2/413 ステップ

「iOS側のXcodeとCocoaPods」はCoddyKit上の無料Kotlin Multiplatform Academyレッスンです。 これはレッスン2/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これはKotlin Multiplatform Academy学習パスの一部であり、ウェブとCoddyKitアプリ全体で進捗が同期されます。 Kotlin Multiplatform Academyコースには全4レッスンが含まれています。

このレッスンの一部はまだ翻訳されておらず、英語で表示されています。

The iOS Half Needs a Mac

To build the iOS target of your KMP app, you need a Mac. Apple's build tools only run on macOS, so this side lives there. 🍎

Install Xcode

Get Xcode from the Mac App Store. It is Apple's IDE and it provides the compiler and simulators your iOS app needs.

Open Xcode Once

Launch Xcode at least once after installing. It finishes setup and accepts the license, which Gradle later relies on.

Command Line Tools

Xcode also brings command line tools, the compilers and utilities your KMP build calls behind the scenes to produce the iOS framework.

Pick the Active Toolchain

If you have several Xcode versions, point the system at the right one so builds use the toolchain you expect.

sudo xcode-select -s /Applications/Xcode.app

Meet CocoaPods

CocoaPods is a dependency manager for iOS. KMP can use it to wire your shared framework into the iOS app.

Install CocoaPods

Install CocoaPods from the terminal. Once it is on your machine, the KMP plugin can publish your shared module as a pod.

sudo gem install cocoapods

Confirm the Install

Check that CocoaPods is ready by asking for its version. A version number means the iOS dependency tooling is in place.

pod --version

Ruby Comes Into Play

CocoaPods runs on Ruby. macOS ships Ruby, though many teams use a version manager to avoid permission headaches.

Use the Simulator

Xcode includes the iOS Simulator, so you can run your shared-powered iOS app without a real iPhone connected.

Both Sides Are Ready

With Studio plus Xcode and CocoaPods set up, both platforms can now build from the same Kotlin codebase. You are ready to scaffold a project.

Quick Check

What role does CocoaPods play in a KMP setup?

Recap

You set up the Mac side: Xcode with its command line tools and the simulator, plus CocoaPods. The iOS half is now buildable. ✅

無料で開始

AI チューターと学ぶ Kotlin — 無料

ブラウザでリアルコードを書いて実行し、24/7 の AI チューターから瞬時にサポートを受け、ウェブまたはアプリで続きから学習できます。

コース
30
レッスン
120

よくある質問

「iOS側のXcodeとCocoaPods」レッスンは無料ですか?

はい。「iOS側のXcodeとCocoaPods」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、Kotlin Multiplatform Academyコースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 Kotlin Multiplatform Academyコースには全4レッスンが含まれています。

「iOS側のXcodeとCocoaPods」で何を学びますか?

iOSアプリをビルドするためのMac側の前提条件を確認します ブラウザで直接実行するハンズオンコードでKotlin Multiplatform Academyを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。

Kotlin Multiplatform Academyを始めるのに経験は必要ですか?

事前経験は必要ありません。CoddyKitのKotlin Multiplatform Academyは初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン2/4です。

「iOS側のXcodeとCocoaPods」レッスンにはどのくらい時間がかかりますか?

ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。

このKotlin Multiplatform Academyレッスンでコードを書いて実行できますか?

はい。すべてのKotlin Multiplatform Academyレッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。

このコースのすべてのレッスン

  1. JDK、Android Studio、KMP Plugin
  2. iOS側のXcodeとCocoaPods
  3. KMP Wizardでプロジェクトを生成する
  4. 生成されたフォルダーを見てみる
← Kotlin Multiplatform Academyに戻る