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

dSYMのアップロードで
SPMを活用する/use_spm_with_upload_dsyms

249b3122eee454c0a818bfe7851418e4?s=47 fromkk
June 03, 2021

 dSYMのアップロードで
SPMを活用する/use_spm_with_upload_dsyms

Bitrise User Group Japan #5 にて登壇してきた内容の資料です。

249b3122eee454c0a818bfe7851418e4?s=128

fromkk

June 03, 2021
Tweet

Transcript

  1. dSYMͷΞοϓϩʔυͰ 
 SPMΛ׆༻͢Δ Bitrise User Group Japan #5 1

  2. struct Profile { let name = "Kazuya Ueoka" let company

    = " note inc." let twitter = " @fromkk" let github = " fromkk" let qiita = " fromkk" let note = " fromkk" } 2
  3. ৼΓฦΓ 3

  4. https://note.com/fromkk/n/n064299093064 4

  5. ͪΐͬͱࡶͳ࣮૷͕͋Γ·ͨ͠😅 5

  6. ࡶͳ࣮૷ • # TypeͰ͸ϥΠϒϥϦͷ؅ཧΛSwift Package Managerͷ Έʹ೚͍ͤͯͨ • Crashlyticsͷupload-symbolsίϚϯυΛୟͨ͘Ί͚ͩ ʹҰ࣌྇͗ͰCocoaPodsΛར༻

    
 
 • ϥΠϒϥϦͷΩϟογϡແࢹ 6 use_frameworks! target 'Type' do pod 'FirebaseCrashlytics' end
  7. ͔ͤͬ͘ͳͷͰͪΌΜͱSPMΛ׆༻͍ͨ͠ 7

  8. SPMΛclone͢ΔσΟϨΫτϦͷܾఆ 8

  9. ύοέʔδΛclone͢ΔσΟϨΫτϦΛมߋ • ௨ৗXcodeͰSPMΛར༻͢Δͱclone͢Δύοέʔδ͸ 
 ~/Library/Developer/Xcode/DerivedData/ ${PRODUCT_NAME}-${HASH}/SourcePackages/ 
 ҎԼʹࣗಈతʹ഑ஔ͞ΕΔ • खಈͰࢦఆ͍ͨ͠৔߹͸

    xcodebuild ίϚϯυͷ 
 -clonedSourcePackagesDirPath ΦϓγϣϯΛར༻͢Δ͜ͱͰ มߋՄೳ 9
  10. ύοέʔδͷґଘؔ܎͚ͩղܾ͍ͨ͠ • xcodebuild -resolvePackageDependencies -project $BITRISE_PROJECT_PATH -scheme $BITRISE_SCHEME -configuration Debug

    -clonedSourcePackagesDirPath $PACKAGES_PATH 
 ্هΛSPMܦ༝Ͱར༻͍ͨ͠ίϚϯυΛୟ͘લʹ࣮ߦ͓ͯ͘͠ ʢxcworkspaceΛར༻͍ͯ͠Δ৔߹͸ -project Λ -workspace ʹมߋʣ 10
  11. ࠷ऴతͳεΫϦϓτ 11 bundle install export FASTLANE_USER=$APPLE_ID export FASTLANE_PASSWORD=$APPLE_PW export SPACESHIP_2FA_SMS_DEFAULT_PHONE_NUMBER=$APP_PHONE_NUMBER

    export DOWNLOAD_DSYMS_TEAM_ID=$APPLE_TEAM_ID fastlane udpate_session DSYMS_PATH=$(pwd)/dsyms/ mkdir $DSYMS_PATH fastlane dsyms dest:$DSYMS_PATH envman add --key DSYMS_PATH --value $DSYMS_PATH xcodebuild -resolvePackageDependencies -project $BITRISE_PROJECT_PATH -scheme $BITRISE_SCHEME -configuration Debug -clonedSourcePackagesDirPath $PACKAGES_PATH +
  12. upload-symbolsͷύεΛมߋ 12

  13. ΩϟογϡΛ׆༻͍ͨ͠ 13

  14. Ωϟογϡͷ׆༻ • xcodebuild -resolvePackageDependencies Λୟ͘લʹ Bitrise.io Cache:Pull εςοϓΛ௥Ճ 14

  15. Ωϟογϡͷ׆༻ • xcodebuild -resolvePackageDependencies Λୟ͍ͨޙͰ Bitrise.io Cache:Push εςοϓΛ௥Ճ 
 


    • Cache pathsΛԼهͷΑ͏ʹมߋ 
 $PACKAGES_PATH -> $BITRISE_PROJECT_PATH/project.xcworkspace/ xcshareddata/swiftpm/Package.resolved 15
  16. ࠷ऴ݁Ռ 16 εΫϦϓτͷલޙʹΩϟογϡΛ௥Ճ

  17. ·ͱΊ • લճ΍Γ࢒͍ͯͨ͠SPMͷ՝୊Λղܾ͢Δ͜ͱ͕Ͱ͖ͨ🎉 • SPMͰ΋ΩϟογϡΛར༻͢Δ͜ͱͰ࣮ߦ࣌ؒ୹ॖ⏰ • ͜ΕͰεοΩϦͱͨ͠ؾ෼ͰdSYMͷΞοϓϩʔυΛCIʹ೚ͤ ΒΕΔ👍 17

  18. None