$30 off During Our Annual Pro Sale. View Details »

Contributing to Global Development Through Handling for the LINE iOS App

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
PRO

November 18, 2022
Tweet

More Decks by Tech-Verse2022

Other Decks in Technology

Transcript

  1. None
  2. What You Will Learn?

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

    to … - Apple Platform (Xcode Beta, Swift Compiler) - OSS Tools
  4. 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
  5. 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)
  6. Developer Experience Team - Improving Developer Experience of iOS/Android Development

    - 1 Android, 5 iOS members
  7. Example: Fast Build system - Build system management - Jung

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

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

    to Apple Platform - Solution: Contribution to OSS - Achievements and Future
  10. iOS16 and Xcode14 WWDC 2022 https://developer.apple.com/wwdc22/

  11. Changes of WWDC2022

  12. Changes of WWDC2022 Swift 5.7 - New compiler version with

    new features
  13. Changes of WWDC2022 - Build time improvement - Development environment

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

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

    Compiler Bug LINE with the new environment had issues Changes of WWDC2022
  16. 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
  17. 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
  18. With Xcode13 OSS Tools problem XcodeGen fastlane

  19. 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
  20. Apple Platform Contribution OSS Contribution Our Solution

  21. Agenda - Problem with Xcode 14 Beta - Solution: Contribution

    to Apple Platform - Solution: Contribution to OSS - Achievements and Future
  22. 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
  23. How to work for Apple Platform Report Pull Request (OSS

    only)
  24. How to work for Apple Platform Report Pull Request (OSS

    only)
  25. Report Compiler Issue - https://feedbackassistant.apple.com/ Feedback to Apple (Private) -

    https://github.com/apple/swift Issue on Github (Public)
  26. Example: Feedback Assistant

  27. Example: Feedback Assistant

  28. Example: Feedback Assistant

  29. Example: Github Issue

  30. Example: Github Issue

  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. Report Items Code • Minimum code to reproduce • DO

    NOT include private information Environment • Xcode version • swift --version Log • Stack trace • Error log • Expected behavior
  33. 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 } } }
  34. 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
  35. 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
  36. 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
  37. 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
  38. 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
  39. 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
  40. 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 } } }
  41. Report Items Code • Minimum code to reproduce • DO

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

    NOT include private information Environment • Xcode version • swift --version Log • Stack trace • Error log • Expected behavior
  43. 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 …
  44. Report Items Code • Minimum code to reproduce • DO

    NOT include private information Environment • Xcode version • swift --version Log • Stack trace • Error log • Expected behavior
  45. 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
  46. 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
  47. Report Items Code • Minimum code to reproduce • DO

    NOT include private information Environment • Xcode version • swift --version Log • Stack trace • Error log • Expected behavior
  48. Example: apple/swift Issue

  49. Minimum Code

  50. Log

  51. Environment

  52. 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
  53. Result Fixed: - https://github.com/apple/swift/issues/59294 - https://github.com/apple/swift/issues/59295

  54. How to work for Apple Platform Report Pull Request (OSS

    only)
  55. How to work for Apple Platform Report Pull Request (OSS

    only)
  56. Pull Request - Our team’s Next Challenge: Open a Pull

    Request - Swift Compiler is OSS (C++) - Feel free to open Pull Requests
  57. Pull Request to Compiler Example: - https://github.com/apple/swift/pull/33851

  58. - Problem with Xcode 14 Beta - Solution: Contribution to

    Apple Platform - Solution: Contribution to OSS - Achievements and Future Agenda
  59. OSS Tools in LINE XcodeGen fastlane

  60. 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
  61. 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.)
  62. … = { 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.)
  63. 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
  64. 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
  65. 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)
  66. Opened PR to XcodeGen Fixed (@mtj0928): - https://github.com/yonaskolb/XcodeGen/pull/1230

  67. OSS Tools in LINE XcodeGen fastlane "Twemoji" by Copyright 2022

    Twitter, Inc and other contributors is licensed under CC-BY 4.0 Deployment Issue
  68. Issue of fastlane Reported: - https://github.com/fastlane/fastlane/issues/20371

  69. Deployment Tools Bundled in Xcode + Xcode 13 iTMSTransporter Application

    Loader fastlane(pilot)
  70. 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
  71. 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
  72. - 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
  73. 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
  74. Fixed: - https://github.com/fastlane/fastlane/pull/20631 Opened PR to fastlane

  75. 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!
  76. Agenda - Problem with Xcode 14 Beta - Solution: Contribution

    to Apple Platform - Solution: Contribution to OSS - Achievements and Future
  77. 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…
  78. Let’s contribute world-wide Developer Experience! "Twemoji" by Copyright 2022 Twitter,

    Inc and other contributors is licensed under CC-BY 4.0
  79. Thank you