0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【SwiftUI】自分用初学者メモ

Posted at

この年末年始に今まで触れたことのないiosアプリ開発について興味が湧いたので、そこで詰まった点を備忘録として残していく。

ライブラリの適用手順

そもそもライブラリ管理には、「CocoaPods」と「SPM(Swift Package Manager)」の大きく2種類存在する。

今回は、 Apple公式かつ推奨のSPMの導入手順を記載する。

  1. 使用したいプロジェクトをxcodeで開く
  2. xcodeの左上のFile > Add Package Dependencies...を選択する
  3. 右上のSerchから使用したいライブラリのURLを入力する
    githubのreadmeにインストール方法でSPMのURLが記載されている事が多い
    例:https://github.com/hoge/huga.git
  4. 入力したら追加したいライブラリが表示されるので、「Dependency Rule」と「Add to Project」を選択して、右下のAdd Packageを押下する
  5. xcodeの左のフォルダエリアのPackage Dependenciesに追加されていることを確認する
  6. プロジェクトの設定ファイルを開く
  7. Frameworks, Libraries, and Embedded Contentに使用したいライブラリを追加する

以上

0
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?