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

快適なUIを持つアプリを作るために
できること

 快適なUIを持つアプリを作るために
できること

Muukii

May 15, 2018
Tweet

More Decks by Muukii

Other Decks in Programming

Transcript

  1. About Me • Muukii <Hiroshi Kimura> • iOS Engineer at

    eureka, Inc. • Pairs Global Team • GitHub : @muukii • https://muukii.me ☕ ⌚
  2. 4PVUI,PSFB Japan Taiwan No.1 2017 release No.1 !5 1BJSTʹ͍ͭͯ ల։ࠃ

    ̐ͭͷϓϥοτϑΥʔϜ CONFIDENTIAL INFORMATION: Not for Public Distribution - Do Not Copy
  3. Agenda • Pairs Global iOS νʔϜɾϓϩδΣΫτͱͯ͠ • շదͳUIΛ࣋ͭΞϓϦΛ࡞ΔͨΊʹ΍͍ͬͯΔ͜ͱ • ߈Ί

    - Improve • ߴ଎ʹಈ࡞͢ΔUI ɾ ҆ఆͨ͠UI • कΓ - Maintain • ߈ΊʹΑ࣮ͬͯݱͨ͠UIͷ඼࣭Λܧଓͤ͞Δ
  4. UI࣮૷ͷΞϓϩʔν • InterfaceBuilder͸Ұ੾࢖༻ͤͣίʔυϨΠΞ΢τ • AutoLayout͸EasyPeasyͱ͍͏ϥΠϒϥϦΛ࢖༻த • UIͷಈ࡞ύϑΥʔϚϯεʹ͓͚ΔϘτϧωοΫ͸AutoLayoutؔ࿈Ͱൃੜ͢Δ͜ͱ΋͋Δ • TextureGroup/TextureΛ࢖༻ (Pinterest͕։ൃ͠ɺ൴ΒͷϓϩμΫτͰશ໘తʹ࢖༻͍ͯ͠Δ)

    • పఈతʹඇಉظॲཧԽ͠ɺUI͕ඇৗʹߴ଎ʹͳΔେ͖ͳϥΠϒϥϦ • AutoLayoutͱͦͷ୅ସखஈʹ͍ͭͯൃදࢿྉ͕͋ΔͷͰΑ͚Ε͹͝ཡ͍ͩ͘͞ 
 https://speakerdeck.com/muukii0803/autolayoutyi-wai-falsexuan-ze-zhi
  5. UIͷෆ۩߹ͱݺ΂Δ΋ͷ • ظ଴௨Γಈ͍͍ͯͳ͍ (͜Ε͸౰વ) • ॲཧʹ͕͔͔࣌ؒΓUI͕ݻ·ͬͯ͠·͏ • UI͕ॠ࣌ʹԿ౓͔੾ΓସΘͬͯ͠·͏Α͏ͳνϥπΩ • σβΠϯ่Ε

    • ࢹೝੑɾ৘ใઃܭΛߟ͑ͯͷσβΠϯͰ͋ΔͨΊɺ่Ε͍ͯΕ͹UIͱͯ͠ຊདྷͷػೳΛఏڙͰ͖ͯ ͍ͳ͍ͱݴ͑Δ • ը૾ͷΞεϖΫτൺ͕ؒҧ͍ͬͯΔ • Not ϐΫηϧύʔϑΣΫτ • ΞΠίϯͷҰ෦͕͚ܽͯදࣔ͞Ε͍ͯΔ
  6. ઀ଓ͢ΔαʔόʔΛબ୒ • ຊ൪αʔόʔ ؖࠃɾ୆࿷ • ։ൃ༻αʔόʔ ؖࠃɾ୆࿷ • ϩʔΧϧ (localhost:8000ͳͲ)

    • ϚϧνϩάΠϯՄೳͳΞϓϦઃܭʹ͍ͯ͠ΔͨΊɺෳ਺Ϣʔβʔͷϩ άΠϯঢ়ଶΛอ࣋Մೳ & ϥϯλΠϜͰ੾Γସ͑Մೳ • ؀ڥมߋͷͨͼʹϏϧυ͠௚͢ඞཁ͸ͳ͠
  7. • ΞϓϦΛར༻͠ͳ͕ΒαʔόʔͷϏδωεϩδοΫΛݺͼग़͢ (։ൃ؀ڥͷΈ) • ϢʔβʔΛ௕ԡ͠ -> Ϣʔβʔ(૬ख)ʹؔ͢ΔϝχϡʔΛදࣔ • ࣗ෼ʹʮ͍͍ͶʂʯΛૹ৴ •

    ࣗ෼ʹϝοηʔδΛૹ৴ • σόΠεΛγΣΠΫ -> Ϣʔβʔ(ࣗ෼)ʹؔ͢ΔϝχϡʔΛදࣔ • ձһঢ়ଶͷมߋ (ແྉɾ༗ྉ) • ͦͷଞ ঢ়ଶมߋ ։ൃऀϝχϡʔ ϏδωεϩδοΫαΠυ
  8. GitHub PRʹ.appΛΞοϓϩʔυ • GitHubʹPR͕࡞੒͞ΕΔͱCI͕γϛϡϨʔλ༻ͷappΛϏϧυ • PRʹappϑΝΠϧͷμ΢ϯϩʔυϦϯΫ͕షΓ෇͚ΒΕΔ • μ΢ϯϩʔυͨ͠appϑΝΠϧ͸γϛϡϨʔλʹυϥοά&υϩοϓͰΠϯετʔϧՄೳ • ίʔυϨϏϡʔͰ͸Θ͔Βͳ͍࣮ࡍͷಈ࡞΍ݟͨ໨Λ֬ೝ͢Δ·Ͱͷૢ࡞͕୹ॖͰ͖Δ

    • γϛϡϨʔλ͸ෳ਺ىಈՄೳʹͳ͍ͬͯΔͷͰσόΠε͝ͱͷ֬ೝ΋؆୯ʹ • ؔ࿈هࣄ : https://bit.ly/2IhHOgl • CI͸ϏϧυΛ଎͘ߦ͍͍ͨͷͰࣾ಺ͷmac proͰಈ͔͍ͯ͠Δ • JenkinsͰ΋Α͔͚ͬͨͲɺڵຯຊҐͰ࡞ͬͨSwift੡ͷCIΛ࢖༻த… • https://github.com/eure/tower • (Jenkins, Travis, Bitrise, CircleCIͱ͔Ͱ͍͍ͱࢥ͏)
  9. γϛϡϨʔλ༻appϑΝΠϧΛ࡞Δ lane :simulator_build do base_path = `xcodebuild -workspace ../pairs-global.xcworkspace -scheme

    Pairs - arch x86_64 -sdk iphonesimulator -configuration Debug -showBuildSettings | grep - m 1 "CONFIGURATION_BUILD_DIR" | grep -oEi "\/.*"`.chomp() result = xcbuild( workspace: 'pairs-global.xcworkspace', scheme: 'Pairs', xcargs: '-arch x86_64 -sdk iphonesimulator -configuration Debug' ) File.join(base_path, "Pairs.app") end FastlaneΛ࢖ͬͨྫ ϏϧυΛߦ͍ɺ.appͷύε͕ฦ٫͞ΕΔlane
  10. GitHubͷPRΛ୳͢Query query FindPullRequest( $owner: String!, $name: String!, $branch: String!) {

    repository(owner:$owner, name:$name) { pullRequests(first: 1, headRefName:$branch) { nodes { id, number }, totalCount, } } } { "owner" : "eure", "name" : "pairs-gl-ios", "branch" : "#{branch_name}" } GitHub API v4 GraphQL
  11. CrashlyticsʹNon-Fatal-Errorͱͯ͠ΫϥογϡܥҎ֎ͷΤ ϥʔΛૹ৴͢Δ func log(error: Error) { Crashlytics.sharedInstance().recordError(error, withAdditionalUserInfo: nil) }

    CrashlyticsʹNon-Fatal-Errorͱͯ͠ΠϕϯτΛૹ৴͢Δίʔυྫ Crashlytics͸ࣗಈͰΫϥογϡϩάΛૹ৴͢ΔSDK͕ͩɺ։ൃऀ͕ࢦఆͨ͠ΠϕϯτΛΫϦςΟΧϧ Ͱ͸ͳ͍͕໰୊ͷ͋ΔΤϥʔ(Non-Fatal-Error)ͱͯ͠ૹ৴͢Δػೳ΋͍࣋ͬͯΔ