Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
The history of entry-point in iOS app Development
Search
417.72KI
October 27, 2023
Technology
0
360
The history of entry-point in iOS app Development
https://testnight.connpass.com/event/295913
417.72KI
October 27, 2023
Tweet
Share
More Decks by 417.72KI
See All by 417.72KI
iTunes・おぼえていますか〜ScriptingBridge今昔物語〜
417_72ki
1
23
R.swift to Asset Symbols
417_72ki
0
250
Refactor with using `available` and `deprecated`
417_72ki
3
600
CLIツールにSwift Concurrencyを適用させようとしている話
417_72ki
3
390
CI with Danger-Swift
417_72ki
1
200
Graduation from Playground beginner
417_72ki
3
890
Trap Questions in Java and Obj-C
417_72ki
1
270
ダックタイピングとidでUserDefaultsをモック化する
417_72ki
2
2.5k
Mockable UserDefaults with Duck typing
417_72ki
0
830
Other Decks in Technology
See All in Technology
rootlessコンテナのすゝめ - 研究室サーバーでもできる安全なコンテナ管理
kitsuya0828
3
390
安心してください、日本語使えますよ―Ubuntu日本語Remix提供休止に寄せて― 2024-11-17
nobutomurata
1
1k
OS 標準のデザインシステムを超えて - より柔軟な Flutter テーマ管理 | FlutterKaigi 2024
ronnnnn
0
160
ISUCONに強くなるかもしれない日々の過ごしかた/Findy ISUCON 2024-11-14
fujiwara3
8
870
Terraform CI/CD パイプラインにおける AWS CodeCommit の代替手段
hiyanger
1
240
開発生産性を上げながらビジネスも30倍成長させてきたチームの姿
kamina_zzz
2
1.7k
VideoMamba: State Space Model for Efficient Video Understanding
chou500
0
190
RubyのWebアプリケーションを50倍速くする方法 / How to Make a Ruby Web Application 50 Times Faster
hogelog
3
940
Evangelismo técnico: ¿qué, cómo y por qué?
trishagee
0
360
[CV勉強会@関東 ECCV2024 読み会] オンラインマッピング x トラッキング MapTracker: Tracking with Strided Memory Fusion for Consistent Vector HD Mapping (Chen+, ECCV24)
abemii
0
220
ノーコードデータ分析ツールで体験する時系列データ分析超入門
negi111111
0
410
組織成長を加速させるオンボーディングの取り組み
sudoakiy
2
180
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Agile that works and the tools we love
rasmusluckow
327
21k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Ruby is Unlike a Banana
tanoku
97
11k
10 Git Anti Patterns You Should be Aware of
lemiorhan
655
59k
It's Worth the Effort
3n
183
27k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Transcript
!@LJ J04։ൃʹ͓͚Δ ΤϯτϦʔϙΠϯτͷྺ࢙ J045FTU/JHIU
.FTXJGU let name = "Takuhiro Muta" let twitter = "417_72ki"
let github = "417-72KI" let company = "(redacted)" var products = [ "MockUserDefaults", "MultipartFormDataParser", "BuildConfig.swift", "R2ACConverter", "SSGH", ] var contributing = [ "Danger-Swift", "octokit.swift", "etc..." ]
͓ॻ͖ w ΤϯτϦʔϙΠϯτͱ w J04։ൃʹ͓͚ΔΤϯτϦʔϙΠϯτ w ςετͱΤϯτϦʔϙΠϯτ
ΤϯτϦʔϙΠϯτͱ
ΤϯτϦʔϙΠϯτͱ w ΞϓϦέʔγϣϯͷϓϩάϥϜΛ࣮ߦ͢Δࡍ࠷ॳʹݺͼग़͞ΕΔॲཧؔ ͷ͜ͱ w $JOUNBJO w +BWBQVCMJDTUBUJDWPJENBJO 4USJOHBSHT
w FUD
J04ΞϓϦ։ൃʹ͓͚ΔΤϯτϦʔϙΠϯτ
J04ΞϓϦ։ൃʹ͓͚ΔΤϯτϦʔϙΠϯτ J04ΞϓϦ։ൃͱΤϯτϦʔϙΠϯτͷมભ ࣌ظ ओͳग़དྷࣄ ݴޠ 'SBNFXPSLT ΤϯτϦʔϙΠϯτ ʙ 0CKFDUJWF$ Ћ
6*,JU NBJON 88%$Ͱ4XJGUൃද 9DPEF4XJGUϦϦʔε 0CKFDUJWF$ Ћ 4XJGU Ћ 6*,JU NBJON "QQ%FMFHBUFTXJGU 88%$Ͱ4XJGU6*ൃද 9DPEF4XJGU6*ϦϦʔε 0CKFDUJWF$ Ћ 4XJGU 6*,JU 4XJGU6* NBJON "QQ%FMFHBUFTXJGU 4DFOF%FMFHBUF 4XJGU6*ϦϦʔε 0CKFDUJWF$ Ћ 4XJGU 6*,JU 4XJGU6* NBJON "QQ%FMFHBUFTXJGU 4DFOF%FMFHBUF "QQTXJGU
J04ΞϓϦ։ൃʹ͓͚ΔΤϯτϦʔϙΠϯτ 0CKFDUJWF$ w NBJON #import <UIKit/UIKit.h> #import "AppDelegate.h" int main(int
argc, char * argv[]) { NSString * appDelegateClassName; @autoreleasepool { appDelegateClassName = NSStringFromClass([AppDelegate class]); } return UIApplicationMain(argc, argv, nil, appDelegateClassName); }
J04ΞϓϦ։ൃʹ͓͚ΔΤϯτϦʔϙΠϯτ 4XJGU w NBJOTXJGU UIApplicationMain(CommandLine.argc, CommandLine.unsafeArgv, nil, NSStringFromClass(AppDelegate.self)) 🙅
J04ΞϓϦ։ൃʹ͓͚ΔΤϯτϦʔϙΠϯτ 4XJGUXJUI6*,JU w "QQ%FMFHBUFTXJGU @UIApplicationMain // deprecated and will be
error in Swift 6 final class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Initialize app return true } }
J04ΞϓϦ։ൃʹ͓͚ΔΤϯτϦʔϙΠϯτ !6*"QQMJDBUJPO.BJO w NBJOTXJGUΛ҉తʹੜ͢Δ w 4XJGUͰඇਪɺ4XJGUͰഇࢭ༧ఆ UIApplicationMain(CommandLine.argc, CommandLine.unsafeArgv, nil, NSStringFromClass(AppDelegate.self))
IUUQTHJUIVCDPNBQQMFTXJGUCMPCGFCBEDFEDGDFBFFEE$)"/(&-0(NE QMBJO-- IUUQTHJUIVCDPNBQQMFTXJGUDPNNJUDDCDDGDBC
J04ΞϓϦ։ൃʹ͓͚ΔΤϯτϦʔϙΠϯτ ༨ஊɿ!6*"QQMJDBUJPO.BJOͷࠟ IUUQTHJUIVCDPNTFBSDI RSFQP"BQQMF'TXJGU 6*"QQMJDBUJPO.BJOUZQFDPEF
J04ΞϓϦ։ൃʹ͓͚ΔΤϯτϦʔϙΠϯτ 4XJGUXJUI6*,JU w "QQ%FMFHBUFTXJGU @UIApplicationMain // deprecated and will be
error in Swift 6 final class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Initialize app return true } }
J04ΞϓϦ։ൃʹ͓͚ΔΤϯτϦʔϙΠϯτ 4XJGU d XJUI6*,JU w "QQ%FMFHBUFTXJGU @main final class AppDelegate:
UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Initialize app return true } }
J04ΞϓϦ։ൃʹ͓͚ΔΤϯτϦʔϙΠϯτ !NBJO w 4XJGUʹ͓͚ΔΤϯτϦʔϙΠϯτΛࣔ͢BUUSJCVUF w 4XJGUͰՃ w !NBJO͕͍ͨDMBTTTUSVDUFOVNQVCMJDTUBUJDGVODNBJO ͷ࣮ ͕ඞਢ
J04ΞϓϦ։ൃʹ͓͚ΔΤϯτϦʔϙΠϯτ !NBJO
J04ΞϓϦ։ൃʹ͓͚ΔΤϯτϦʔϙΠϯτ 4XJGU6*Y w "QQ%FMFHBUFTXJGU @UIApplicationMain // deprecated and will be
error in Swift 6 final class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Initialize SceneDelegate if needed return true } }
J04ΞϓϦ։ൃʹ͓͚ΔΤϯτϦʔϙΠϯτ 4XJGU6*Y w 4DFOF%FMFHBUFTXJGU final class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow? func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { guard let windowScene = (scene as? UIWindowScene) else { return } let window = UIWindow(windowScene: windowScene) window.rootViewController = UIHostingController(rootView: RootView()) self.window = window window.makeKeyAndVisible() }
J04ΞϓϦ։ൃʹ͓͚ΔΤϯτϦʔϙΠϯτ 4XJGU6*d w "QQTXJGU @main struct EntrypointSample_SwiftUIApp: App { var
body: some Scene { WindowGroup { ContentView() } } }
4XJGU6*d J04ΞϓϦ։ൃʹ͓͚ΔΤϯτϦʔϙΠϯτ
ςετͱΤϯτϦʔϙΠϯτ
ςετͱΤϯτϦʔϙΠϯτ J04ͷςετʹ͓͚Δ՝ w J04ͷςετ)PTU"QQMJDBUJPO্Ͱ࣮ߦ͞ΕΔ w )PTU"QQMJDBUJPO͕ىಈ͢Δ w ىಈ·Ͱͷ͕࣌ؒϘτϧωοΫʹͳΔ w ىಈ࣌ʹ௨৴6TFS%FGBVMUTͷॻ͖ࠐΈΛ͍ͯ͠ΔͱɺͦΕ͕ࢥ
Θ͵෭࡞༻ΛҾ͖ىͯ͜͠ςετʹӨڹ͢Δ߹͕͋Δ
ςετͱΤϯτϦʔϙΠϯτ ىಈ·Ͱͷ͕࣌ؒϘτϧωοΫʹͳΔ
ςετͱΤϯτϦʔϙΠϯτ εϓϥογϡը໘ͰͷॲཧʹΑΔ෭࡞༻ ྫ w γϛϡϨʔλͰಈ࡞֬ೝ͢Δ ϩάΠϯͨ͠ঢ়ଶ w ಉҰγϛϡϨʔλͰςετ࣮ߦ w
γϛϡϨʔλͷ6TFS%FGBVMUTʹ͍ͬͯͨτʔΫϯΛ)PTU"QQMJDBUJPO্ͷ TJOHMFUPOPCKFDU͕र্͍͛Δ w ςετରͷதͰͦͷTJOHMFUPOΛݟΔॲཧ͕τʔΫϯΛͬͯॲཧͯ͠͠·͏ w ఆͱҟͳΔ࣮ߦ݁Ռ͕ग़ྗ͞Ε֘ςετ͕'BJMFEʹ😱
ςετͱΤϯτϦʔϙΠϯτ ରࡦ w #FTU w ϓϩμΫτίʔυΛ4XJGU1BDLBHFʹ͢Δ w 1BDLBHFଆͰςετΛΒͤΔͱ)PTU"QQMJDBUJPOΛΘͳ͍ w YDGSBNFXPSLඇରԠϥΠϒϥϦ͕͋ͬͨΓ͢ΔͱෆՄ
w #FUUFS w "QQ%FMFHBUFΛ࣮ߦ͠ͳ͍Α͏ʹ͢Δ w ىಈॲཧΛεΩοϓͰ͖Δ w /PU#BE w ProcessInfo.processInfo.environment["XCTestConfigurationFilePath"]ͷ༗ແͰஅ͢Δ w ϓϩμΫτίʔυ͕ԚΕΔ
"QQ%FMFHBUFΛ࣮ߦ͠ͳ͍Α͏ʹ͢Δ w ςετλʔήοτʹ.PDL"QQ%FMFHBUFΛ༻ҙ͢Δ w "QQ%FMFHBUF͔Β@mainΛফ͢ w NBJOTXJGUΛ༻ҙ͢Δ w ςετ࣌.PDL"QQ%FMFHBUFΛݟΔΑ͏ʹࡉ͢Δ
"QQ%FMFHBUFΛ࣮ߦ͠ͳ͍Α͏ʹ͢Δ ςετλʔήοτʹ.PDL"QQ%FMFHBUFΛ༻ҙ͢Δ import UIKit @objc(MockAppDelegate) final class MockAppDelegate: UIResponder, UIApplicationDelegate
{ func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { print("This is MockAppDelegate") return true } }
"QQ%FMFHBUFΛ࣮ߦ͠ͳ͍Α͏ʹ͢Δ w ςετλʔήοτʹ.PDL"QQ%FMFHBUFΛ༻ҙ͢Δ w "QQ%FMFHBUF͔Β@mainΛফ͢ w NBJOTXJGUΛ༻ҙ͢Δ w ςετ࣌.PDL"QQ%FMFHBUFΛݟΔΑ͏ʹࡉ͢Δ
"QQ%FMFHBUFΛ࣮ߦ͠ͳ͍Α͏ʹ͢Δ "QQ%FMFHBUF͔Β!NBJOΛফ͢ @main final class AppDelegate: UIResponder, UIApplicationDelegate { func
application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { print("This is AppDelegate") return true } ɾ ɾ ɾ
"QQ%FMFHBUFΛ࣮ߦ͠ͳ͍Α͏ʹ͢Δ "QQ%FMFHBUF͔Β!NBJOΛফ͢ final class AppDelegate: UIResponder, UIApplicationDelegate { func application(_
application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { print("This is AppDelegate") return true } ɾ ɾ ɾ
"QQ%FMFHBUFΛ࣮ߦ͠ͳ͍Α͏ʹ͢Δ w ςετλʔήοτʹ.PDL"QQ%FMFHBUFΛ༻ҙ͢Δ w "QQ%FMFHBUF͔Β@mainΛফ͢ w NBJOTXJGUΛ༻ҙ͢Δ w ςετ࣌.PDL"QQ%FMFHBUFΛݟΔΑ͏ʹࡉ͢Δ
"QQ%FMFHBUFΛ࣮ߦ͠ͳ͍Α͏ʹ͢Δ NBJOTXJGUΛ༻ҙͯ͠ςετ࣌.PDL"QQ%FMFHBUFΛݟΔΑ͏ʹࡉ͢Δ UIApplicationMain( CommandLine.argc, CommandLine.unsafeArgv, nil, NSStringFromClass(AppDelegate.self) )
"QQ%FMFHBUFΛ࣮ߦ͠ͳ͍Α͏ʹ͢Δ NBJOTXJGUΛ༻ҙͯ͠ςετ࣌.PDL"QQ%FMFHBUFΛݟΔΑ͏ʹࡉ͢Δ let appDelegateClass: AnyClass = NSClassFromString("MockAppDelegate") ?? AppDelegate.self UIApplicationMain(
CommandLine.argc, CommandLine.unsafeArgv, nil, NSStringFromClass(appDelegateClass) )
"QQ%FMFHBUFΛ࣮ߦ͠ͳ͍Α͏ʹ͢Δ
"QQ%FMFHBUFΛ࣮ߦ͠ͳ͍Α͏ʹ͢Δ #JUSJTF্Ͱͷςετ࣮ߦ࣌ؒൺֱ ͬ͘͟Γ w #FGPSF w ฏۉN w "GUFS w
ฏۉN
1VSF4XJGU6*"QQͷ߹ .PDL"QQΛ/40CKFDUʹ͢Δ @objc(MockApp) final class MockApp: NSObject, App { override
init() { super.init() print("This is MockApp.") } var body: some Scene { WindowGroup { EmptyView() } } }
1VSF4XJGU6*"QQͷ߹ BOZ"QQ5ZQFͰΩϟετ͢Δ͜ͱͰNBJO ͕ݺͼग़ͤΔ if let clazz = NSClassFromString("MockApp") as? any
App.Type { clazz.main() } else { EntrypointSample_SwiftUIApp.main() }
·ͱΊ
·ͱΊ w J04։ൃͷྺ࢙ͷதͰΤϯτϦʔϙΠϯτෳճมΘ͍ͬͯΔ w ΤϯτϦʔϙΠϯτͱࠇຐज़Λͬͯςετ࣌ͷ)PTU"QQMJDBUJPOͷىಈॲ ཧΛճආͰ͖Δ w ςετͷ࣮ߦ͕࣌ؒॖͰ͖Δ w αϯϓϧίʔυ
w IUUQTHJUIVCDPN,*&OUSZQPJOU4BNQMF
'JO