Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Contributing to Global Development Through Hand...

Contributing to Global Development Through Handling for the LINE iOS App

Yuki Aki (freddi) (LINE / Developer Experience Dev Team / Software Engineer)

https://tech-verse.me/ja/sessions/22
https://tech-verse.me/en/sessions/22
https://tech-verse.me/ko/sessions/22

Tech-Verse2022

November 18, 2022
Tweet

More Decks by Tech-Verse2022

Other Decks in Technology

Transcript

  1. What You Will Learn? - How we solved and contributed

    to … - Apple Platform (Xcode Beta, Swift Compiler) - OSS Tools
  2. What You Will Learn? - How we solved and contributed

    to … - Apple Platform (Xcode Beta, Swift Compiler) - OSS Tools How you can be world-wide engineer
  3. Yuki Aki (freddi) Software Engineer at Developer Experience team, Mobile

    Experience dept - Joined LINE Fukuoka (2019) - Joined LINE (2022) - OSS Contributor - International Speaker - ὑ 2 Cats (Haruko and Tom)
  4. Example: Fast Build system - Build system management - Jung

    talked about Bazel in LINE - Ref: iOSDC Japan 2022
  5. Agenda - Problem with Xcode 14 Beta - Solution: Contribution

    to Apple Platform - Solution: Contribution to OSS - Achievements and Future
  6. Agenda - Problem with Xcode 14 Beta - Solution: Contribution

    to Apple Platform - Solution: Contribution to OSS - Achievements and Future
  7. Changes of WWDC2022 - Build time improvement - Development environment

    for iOS16 Xcode 14 Swift 5.7 - New compiler version with new features
  8. new Xcode/iOS → (Especially for BETA) "Twemoji" by Copyright 2022

    Twitter, Inc and other contributors is licensed under CC-BY 4.0
  9. Xcode 14 Beta - OSS Tools problem Swift 5.7 -

    Compiler Bug LINE with the new environment had issues Changes of WWDC2022
  10. Compiler Bug class Test { static func test() { return

    [0, 1, 2].compactMap { _ in @SomeWrapper var value: Bool? = false if value != nil { return false } return value ?? false } } } Xcode 13 with Swift 5.6 "Twemoji" by Copyright 2022 Twitter, Inc and other contributors is licensed under CC-BY 4.0
  11. Compiler Bug class Test { static func test() { return

    [0, 1, 2].compactMap { _ in @SomeWrapper var value: Bool? = false if value != nil { return false } return value ?? false } } } Xcode 13 with Swift 5.6 Xcode 14 Beta with Swift 5.7 "Twemoji" by Copyright 2022 Twitter, Inc and other contributors is licensed under CC-BY 4.0
  12. Deploy to AppStore Connect Project Generation for iOS16 XcodeGen OSS

    Tools problem With Xcode14 Beta fastlane "Twemoji" by Copyright 2022 Twitter, Inc and other contributors is licensed under CC-BY 4.0
  13. Agenda - Problem with Xcode 14 Beta - Solution: Contribution

    to Apple Platform - Solution: Contribution to OSS - Achievements and Future
  14. Compiler Bug class Test { static func test() { return

    [0, 1, 2].compactMap { _ in @SomeWrapper var value: Bool? = false if value != nil { return false } return value ?? false } } } Xcode 14 Beta with Swift 5.7 "Twemoji" by Copyright 2022 Twitter, Inc and other contributors is licensed under CC-BY 4.0
  15. Report Items Code • Minimum code to reproduce • DO

    NOT include private information Environment • Xcode version • swift --version Log • Stack trace • Error log • Expected behavior
  16. Report Items Code • Minimum code to reproduce • DO

    NOT include private information Environment • Xcode version • swift --version Log • Stack trace • Error log • Expected behavior
  17. Remove Code’s Context class SomeViewController { public override func viewDidLoad()

    { … viewModel.fetchMessage() dataStore.compactMap { _ in @UserDefault var flag: Bool? = false if flag != nil { return false } return flag ?? false } } }
  18. Remove Code’s Context class SomeViewController { public override func viewDidLoad()

    { … viewModel.fetchMessage() dataStore.compactMap { _ in @UserDefault var flag: Bool? = false if flag != nil { return false } return flag ?? false } } } Remove iOS Context
  19. Remove Code’s Context class Test { public override func viewDidLoad()

    { … viewModel.fetchMessage() dataStore.compactMap { _ in @UserDefault var flag: Bool? = false if flag != nil { return false } return flag ?? false } } } Remove iOS Context
  20. Remove Code’s Context class Test { public override func viewDidLoad()

    { … viewModel.fetchMessage() dataStore.compactMap { _ in @UserDefault var flag: Bool? = false if flag != nil { return false } return flag ?? false } } } Remove iOS Context
  21. Remove Code’s Context class Test { static func test() {

    … viewModel.fetchMessage() dataStore.compactMap { _ in @UserDefault var flag: Bool? = false if flag != nil { return false } return flag ?? false } } } Remove iOS Context
  22. Remove Code’s Context class Test { static func test() {

    … viewModel.fetchMessage() dataStore.compactMap { _ in @UserDefault var flag: Bool? = false if flag != nil { return false } return flag ?? false } } } Reduce Business Logic
  23. Remove Code’s Context class Test { static func test() {

    ɹɹɹɹɹɹɹɹɹɹɹɹ ɹɹɹɹɹɹɹɹɹɹɹɹ return [0, 1, 2].compactMap { _ in @SomeWrapper var flag: Bool? = false if flag != nil { return false } return flag ?? false } } } Reduce Business Logic
  24. class Test { static func test() { return [0, 1,

    2].compactMap { _ in @SomeWrapper var flag: Bool? = false if flag != nil { return false } return flag ?? false } } } Minimum Code class SomeViewController { public override func viewDidLoad() { … viewModel.fetchMessage() dataStore.compactMap { _ in @UserDefault var flag: Bool? = false if flag != nil { return false } return flag ?? false } } }
  25. Report Items Code • Minimum code to reproduce • DO

    NOT include private information Environment • Xcode version • swift --version Log • Stack trace • Error log • Expected behavior
  26. Report Items Code • Minimum code to reproduce • DO

    NOT include private information Environment • Xcode version • swift --version Log • Stack trace • Error log • Expected behavior
  27. Environment Xcode 14 Swift 5.7 $ swift --version swift-driver version:

    1.62.8 Apple Swift version 5.7 (swiftlang-5.7.0.127.4 …
  28. Report Items Code • Minimum code to reproduce • DO

    NOT include private information Environment • Xcode version • swift --version Log • Stack trace • Error log • Expected behavior
  29. Xcode 14 Beta with Swift 5.7 Crash Compiler error: compile

    command failed due to signal 4 (use -v to see invocation) Please submit a bug report (https://swift.org/contributing/#reporting-bugs) .… Stack dump: 0. Program arguments: "/Applications/Xcode-14 beta.app/… 1. Apple Swift version 5.7 (swiftlang-5.7.0.113.202 clang-1400.0.16.2) 2. Compiling with the current language version 3. While evaluating request TypeCheckSourceFileRequest(source_file … 4. While evaluating request TypeCheckFunctionBodyRequest … 5. While type-checking statement at [testtest.swift:30:22 - line:39:3] … return [0, 1, 2].compactMap { _ in … Compiler crash with stack trace "Twemoji" by Copyright 2022 Twitter, Inc and other contributors is licensed under CC-BY 4.0
  30. Log (Stack Trace) error: compile command failed due to signal

    4 (use -v to see invocation) Please submit a bug report (https://swift.org/contributing/#reporting-bugs) .… Stack dump: 0. Program arguments: "/Applications/Xcode-14 beta.app/… 1. Apple Swift version 5.7 (swiftlang-5.7.0.113.202 clang-1400.0.16.2) 2. Compiling with the current language version 3. While evaluating request TypeCheckSourceFileRequest(source_file "testtest.swift") 4. While evaluating request TypeCheckFunctionBodyRequest … 5. While type-checking statement at [testtest.swift:30:22 - line:39:3] RangeText="{ return [0, 1, 2].compactMap { _ in … "Twemoji" by Copyright 2022 Twitter, Inc and other contributors is licensed under CC-BY 4.0
  31. Report Items Code • Minimum code to reproduce • DO

    NOT include private information Environment • Xcode version • swift --version Log • Stack trace • Error log • Expected behavior
  32. Log

  33. Process for Fixing Bugs Feedback Github Issue Change feedback status

    Pull Request opened Pull Request Reply to feedback 2 ~ 3 Later Xcode version Investigation Fix Release Report
  34. Pull Request - Our team’s Next Challenge: Open a Pull

    Request - Swift Compiler is OSS (C++) - Feel free to open Pull Requests
  35. - Problem with Xcode 14 Beta - Solution: Contribution to

    Apple Platform - Solution: Contribution to OSS - Achievements and Future Agenda
  36. OSS Tools in LINE XcodeGen fastlane New Extension Issue "Twemoji"

    by Copyright 2022 Twitter, Inc and other contributors is licensed under CC-BY 4.0
  37. Difference of Extension .pbxproj .pbxproj … = { isa =

    PBXNativeTarget; … productType = "com.apple.product-type.app-extension"; }; … = { isa = PBXNativeTarget; … productType = "com.apple.product-type.extensionkit-extension"; }; AS-IS Extension (Notification Service Extension etc.) iOS 16 New Extension (App Intents etc.)
  38. … = { isa = PBXNativeTarget; … productType = "com.apple.product-type.extensionkit-extension";

    }; … = { isa = PBXNativeTarget; … productType = "com.apple.product-type.app-extension"; }; Difference of Extension .pbxproj .pbxproj AS-IS Extension (Notification Service Extension etc.) iOS 16 New Extension (App Intents etc.)
  39. App/ExtensionKit Extension App Extension - Product type: app-extension - Example:

    Notification Service, Share Extension ExtensionKit Extension (Xcode 14) - Product type: extensionkit-extension - Example: App Intents
  40. Difference of Extension .pbxproj .pbxproj … = { isa =

    PBXNativeTarget; … productType = "com.apple.product-type.app-extension"; }; … = { isa = PBXNativeTarget; … productType = "com.apple.product-type.extensionkit-extension"; }; AS-IS Extension (Notification Service Extension etc.) iOS 16 New Extension (App Intents etc.) XcodeGen: Not supporting
  41. Motivation to XcodeGen - Good impact to other engineers if

    fixed - Easy and fast to check new features of Xcode 14 - Our team has 2 Core Committers (@giginet, @freddi-kit)
  42. OSS Tools in LINE XcodeGen fastlane "Twemoji" by Copyright 2022

    Twitter, Inc and other contributors is licensed under CC-BY 4.0 Deployment Issue
  43. Bundled Tools of Xcode for Deployment Xcode 14 Application Loader

    + iTMSTransporter fastlane(pilot) "Twemoji" by Copyright 2022 Twitter, Inc and other contributors is licensed under CC-BY 4.0 REMOVED
  44. Problems - No-investigation for the issue - Intended changes of

    Xcode 14 "Twemoji" by Copyright 2022 Twitter, Inc and other contributors is licensed under CC-BY 4.0
  45. - No-investigation for the issue Catch it as our team

    task! - Intended changes of Xcode 14 Interact with Apple in Feedback (and Intended changes) Solution "Twemoji" by Copyright 2022 Twitter, Inc and other contributors is licensed under CC-BY 4.0
  46. Impact of issue - All iOS engineer in the world

    cannot deploy with Xcode 14 "Twemoji" by Copyright 2022 Twitter, Inc and other contributors is licensed under CC-BY 4.0
  47. Result (OSS) - LINE with Xcode 14 was success! -

    LINE (app version: 12.16.0) in App Store - Our team took the initiative for many world-wide problems!
  48. Agenda - Problem with Xcode 14 Beta - Solution: Contribution

    to Apple Platform - Solution: Contribution to OSS - Achievements and Future
  49. Achievements and Future - Contribution to World-wide problems - XcodeGen,

    fastlane, Swift Compiler … - LINE with Xcode 14.0 now released - 12.16.0 ~ - Next: Take ownership of More difficult World-wide problems - Swift Compiler, Build System etc…