SlideShare a Scribd company logo
1 of 36
Download to read offline
Cookpad Summer Internship 2021
Mobile App
<アイスブレイク>
今日のおやつはなんですか
好きなエディタは何ですか
</アイスブレイク>
自己紹介
市川 勝 (@masaichi)
● 買物プロダクト開発部
● iPhone3Gの頃からアプリ作ってます
● コーヒーとビールが燃料
● 千葉で妻と娘(2歳)と暮らしてます
● 好き: Swift, Objective-C, Flutter
平山 裕也 (@hiragram)
● モバイル基盤部
● Swiftは1.0から触っています
● 高専卒
● 静岡出身
● 猫2
後藤 哲志 (@mtgto)
● メディアプロダクト開発部
● iPhone 3GS時代からiPhone開発を始める
● 趣味ではmacOSアプリを作ってます
よろしくお願いします!
今日やること
MiniMartを
iOSアプリに
してみる
MiniMartをiOSアプリにしてみる
● SwiftUIを使ってつくる!
● レイアウトの仕方、画面遷移の組み方、状態管理などの、SwiftUIによるア
プリの開発の基礎を一通り学ぶ
タイムテーブル
● 10:00-10:40 󰞹 自己紹介と基礎知識
● 10:40-12:00 󰳕 ハンズオン前半
● 12:00-13:00 🍔 ランチ
● 13:00-14:20 󰳕 ハンズオン後半
● 14:20-17:55 󰠁 基本課題, 応用課題
○ 16:00頃に基本課題の回答例を投下します
● 17:55-18:00 󰞹 ラップアップ
進め方
● わからないこと・知りたいことがあればいつでもSlackで聞い
てください
● 講義中でも随時聞いてください
● 個人ごとに理解度の差があるかもしれませんが気にせず聞
いてください
● 画面越しで困ってる様子に気づけ無いかもしれないので積
極的に聞いてください
iOSアプリ開発の基礎知識
基礎知識
- iOSアプリ
- Swift
- SwiftUI
- UIKit
iOSアプリ
- iOSが動く端末(iPhone)で動作するアプリケーションのこ
と。
- macOS上で動作するXcodeという統合開発環境を使い、
SwiftまたはObjective-Cというプログラミング言語を用い
て開発することができる。
- UIを構築するために、UIKitとSwiftUIの2種の仕組みが
Appleから提供されており、開発者はどちらかまたは両方
を用いて開発を行う
Swift
- Appleが開発し2014年に公開されたプログラミング言語。
- 現在は5.5までバージョンが上がっている。現在において
Swiftを用いてiOSアプリケーションを開発することがスタン
ダードとなっている
Swiftの特徴
- マルチパラダイム言語
- オブジェクト指向、関数型、など多くのスタイルを持つ
- モダン, 安全, インタラクティブ
- モダン:
- 名前付きパラメータ, 型推論, noセミコロン, etc..
- 安全:
- オプショナル, 静的型付け, etc..
- インタラクティブ
- Playground
ざっくりSwift入門
- 今日使う範囲の内容をざっくりと一緒に見ていきます
- Swift 5.4時点の内容です
- すべては説明しきれないので、より詳しくは公式サイトを見てください
- https://swift.org/
- 説明にはPlaygroundを利用します。これは皆さんの手元でも試すことが
できます。ハンズオンの合間に困ったら試してみてください
SwiftUI
- iOSアプリの構築をするためのUIのフレー
ムワーク
- 2019年のwwdcで発表された
- Reactのような宣言型の構文でUIを構築す
ることができる
UIKit
- iOSアプリの構築をするためのUIフレームワーク
- iOSアプリの開発が一般の開発者に開放されたiOS3の頃か
らあるもの
- 従来のiOS開発ではこちらが使われていた。
- SwiftUI登場以後も発展を続け使われている
SwiftUIとUIKit
SwiftUIとUIKit
- どちらも「どこに何を表示するのか」の処理を担うフレーム
ワーク
- すごく雑にいうと、HTMLのタグみたいなもの
- 大きな違いはその書き方
- SwiftUIは宣言的
- UIKitは命令的
SwiftUIとUIKitのコードの比較
UIKit
class CounterView: UIView {
let countLabel = UILabel()
private var count: Int = 0
override init(frame: CGRect) {
super.init(frame: frame)
backgroundColor = .white
let button = UIButton()
button.setTitle("Increment", for: .normal)
button.addTarget(self, action: #selector(increment), for: .touchUpInside)
button.setTitleColor(.blue, for: .normal)
let stackView = UIStackView(arrangedSubviews: [countLabel, button])
addSubview(stackView)
stackView.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
stackView.centerXAnchor.constraint(equalTo: centerXAnchor),
stackView.centerYAnchor.constraint(equalTo: centerYAnchor),
])
stackView.axis = .vertical
stackView.alignment = .center
countLabel.font = UIFont.boldSystemFont(ofSize: 24)
countLabel.text = "(count)"
}
@objc
func increment() {
count += 1
countLabel.text = "(count)"
}
}
UIKit
● ラベルとボタンを作ってViewに貼って画面の中心に置く・・
のような処理が手続き的に書かれている
● データをViewに設定する処理を明示的に書いている
SwiftUI
struct ContentView: View {
@State var count: Int = 0
var body: some View {
VStack {
Text("(count)")
.font(.title)
Button(action: { self.count += 1 }) {
Text("Increment")
}
}
}
}
SwiftUI
● HTMLのタグのような記述でViewの構造が書かれている
● データをViewに明示的に代入する処理は書いていない
SwiftUI - メリット
- 構造、レイアウト、状態が1まとまりになっており、コードも短
く見通しが良い
- データの更新をフレームワークがサポートしてくれる
- Xcode Previewという機能でリアルタイムにコードによるデ
ザインの変更を確認できる
SwiftUI - デメリット
● まだ不安定なところがある
● UIKitに比べると機能が不足している
○ UIKitをSwiftUIから使う仕組みがあり、頑張ることはでき
る
● 不得意なこともある
○ インタラクティブなアニメーション等
● 知見を持つエンジニアが限られている
いまSwiftUIを使う理由
- iOS14になり、標準のパーツ、安定性、知見が増し実戦にも
耐えられるようになってきた
- 「UIの構築が圧倒的にやりやすい」というメリットがデメリット
よりも大きい
クックパッドの中のSwiftUI
SwiftUIやっていくぞ!

More Related Content

Similar to Cookpad summer internship 2021 mobile app

Iphone Presentation
Iphone PresentationIphone Presentation
Iphone Presentationkneelabh
 
You can do it with new images
You can do it   with new imagesYou can do it   with new images
You can do it with new imagesalexjohn769
 
Raghavendra
RaghavendraRaghavendra
RaghavendraRagh P
 
Mobile Photography for Brands - A Case Study
Mobile Photography for Brands - A Case Study Mobile Photography for Brands - A Case Study
Mobile Photography for Brands - A Case Study Michoel Ogince
 
You can do it
You can do itYou can do it
You can do itpauleddy2
 
Application Stores and Mobile Social Media : Presentation @ Marketing 2.0 Con...
Application Stores and Mobile Social Media : Presentation @ Marketing 2.0 Con...Application Stores and Mobile Social Media : Presentation @ Marketing 2.0 Con...
Application Stores and Mobile Social Media : Presentation @ Marketing 2.0 Con...Cedric Giorgi
 
Tecno presentació copia
Tecno presentació copiaTecno presentació copia
Tecno presentació copiamarti2802
 
How To Create An App In 2022
How To Create An App In 2022How To Create An App In 2022
How To Create An App In 2022ForceBolt
 
Deepak_iOSDeveloper_3.5Exp
Deepak_iOSDeveloper_3.5ExpDeepak_iOSDeveloper_3.5Exp
Deepak_iOSDeveloper_3.5ExpDeepak Bachu
 
What Glass Ceiling? How to kick Ass in the Mobile Industry by just producing ...
What Glass Ceiling? How to kick Ass in the Mobile Industry by just producing ...What Glass Ceiling? How to kick Ass in the Mobile Industry by just producing ...
What Glass Ceiling? How to kick Ass in the Mobile Industry by just producing ...Lynette Hundermark
 
Peakode - Company Presentation
Peakode - Company PresentationPeakode - Company Presentation
Peakode - Company PresentationPeakode
 
Peakode Company Presentation
Peakode Company PresentationPeakode Company Presentation
Peakode Company PresentationPeakode
 

Similar to Cookpad summer internship 2021 mobile app (20)

Resume_iOSDev
Resume_iOSDevResume_iOSDev
Resume_iOSDev
 
You can do it 1
You can do it  1You can do it  1
You can do it 1
 
Iphone Presentation
Iphone PresentationIphone Presentation
Iphone Presentation
 
Resume_4years_Exp_update
Resume_4years_Exp_updateResume_4years_Exp_update
Resume_4years_Exp_update
 
Top fiv app
Top fiv appTop fiv app
Top fiv app
 
You can do it with new images
You can do it   with new imagesYou can do it   with new images
You can do it with new images
 
Raghavendra
RaghavendraRaghavendra
Raghavendra
 
AgentSolid
AgentSolidAgentSolid
AgentSolid
 
Mobile Photography for Brands - A Case Study
Mobile Photography for Brands - A Case Study Mobile Photography for Brands - A Case Study
Mobile Photography for Brands - A Case Study
 
Designing mobile apps
Designing mobile appsDesigning mobile apps
Designing mobile apps
 
You can do it
You can do itYou can do it
You can do it
 
Application Stores and Mobile Social Media : Presentation @ Marketing 2.0 Con...
Application Stores and Mobile Social Media : Presentation @ Marketing 2.0 Con...Application Stores and Mobile Social Media : Presentation @ Marketing 2.0 Con...
Application Stores and Mobile Social Media : Presentation @ Marketing 2.0 Con...
 
Tecno presentació copia
Tecno presentació copiaTecno presentació copia
Tecno presentació copia
 
ResumeMobileApp2016 1
ResumeMobileApp2016 1ResumeMobileApp2016 1
ResumeMobileApp2016 1
 
How To Create An App In 2022
How To Create An App In 2022How To Create An App In 2022
How To Create An App In 2022
 
Deepak_iOSDeveloper_3.5Exp
Deepak_iOSDeveloper_3.5ExpDeepak_iOSDeveloper_3.5Exp
Deepak_iOSDeveloper_3.5Exp
 
Kuldeep_IOS
Kuldeep_IOSKuldeep_IOS
Kuldeep_IOS
 
What Glass Ceiling? How to kick Ass in the Mobile Industry by just producing ...
What Glass Ceiling? How to kick Ass in the Mobile Industry by just producing ...What Glass Ceiling? How to kick Ass in the Mobile Industry by just producing ...
What Glass Ceiling? How to kick Ass in the Mobile Industry by just producing ...
 
Peakode - Company Presentation
Peakode - Company PresentationPeakode - Company Presentation
Peakode - Company Presentation
 
Peakode Company Presentation
Peakode Company PresentationPeakode Company Presentation
Peakode Company Presentation
 

Recently uploaded

GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 

Recently uploaded (20)

GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 

Cookpad summer internship 2021 mobile app