Slide 1

Slide 1 text

&YQP&"4#VJMEͰ %FQMPZNFOUFOWJSPONFOUΛ࣮૷͢Δํ๏ !NSUSZ

Slide 2

Slide 2 text

© JMDC Inc. ࣗݾ঺հ w !NSUSZ@ w 4IJOOPTVLF:BNBNPUP w +.%$*OD w 4PGUXBSF&OHJOFFS .PCJMF &OHJOFFSJOH.BOBHFS w 3FBDU/BUJWF.BUTVSJ4UBGG🥳 2

Slide 3

Slide 3 text

© JMDC Inc. %FWFMPQNFOU4UBHJOH1SPEVDUJPO؀ڥΛͭ͘Δͧʂ 3 Develop API Production API Staging API jp.co.jmdc.pepup jp.co.jmdc.pepup.develop jp.co.jmdc.pepup.staging

Slide 4

Slide 4 text

© JMDC Inc. ΍Δ͜ͱ w ؀ڥ͝ͱʹΞϓϦͷ*%Λมߋ͢Δ w &"4#VJMEͰ؀ڥ͝ͱʹΞϓϦΛCVJMEͰ͖ΔΑ͏ʹ͢Δ w ؀ڥ͝ͱʹઃఆ஋Λ·ͱΊͯมߋ͢Δ 4

Slide 5

Slide 5 text

© JMDC Inc. ؀ڥ͝ͱʹ ΞϓϦͷ*%Λมߋ͢Δ

Slide 6

Slide 6 text

© JMDC Inc. ؀ڥ͝ͱʹΞϓϦͷ*%Λมߋ͢Δ ΞϓϦʹ͸*%͕͋Δ w"OESPJE"QQMJDBUJPO*% wJ04#VOEMF*% 6 jp.co.jmdc.pepup

Slide 7

Slide 7 text

© JMDC Inc. ؀ڥ͝ͱʹΞϓϦͷ*%Λมߋ͢Δ ಉ͡*%ͷΞϓϦΛෳ਺Πϯετʔϧ͢Δ͜ͱ͸Ͱ͖ͳ͍ 7 jp.co.jmdc.pepup jp.co.jmdc.pepup jp.co.jmdc.pepup

Slide 8

Slide 8 text

© JMDC Inc. ؀ڥ͝ͱʹΞϓϦͷ*%Λมߋ͢Δ ؀ڥ͝ͱʹݸผͷIDΛઃఆ͢Δඞཁ͕͋Δ 8 jp.co.jmdc.pepup jp.co.jmdc.pepup.develop jp.co.jmdc.pepup.staging

Slide 9

Slide 9 text

© JMDC Inc. ؀ڥ͝ͱʹΞϓϦͷ*%Λมߋ͢Δ BQQKTPOͷ୅ΘΓʹBQQDPOGJHΛར༻͢Δ w ؀ڥม਺Λࢀর͠ɺಈతʹॻ͖׵͑Δ͜ͱ͕Ͱ͖Δ 9

Slide 10

Slide 10 text

© JMDC Inc. ؀ڥ͝ͱʹΞϓϦͷ*%Λมߋ͢Δ CLI $ APP_VARIANT=staging npx expo start app.config.ts // APP_VARIANT is 'staging' 
 const APP_VARIANT = process.env.APP_VARIANT; 
 
 export default { 
 ..., 
 } 10

Slide 11

Slide 11 text

© JMDC Inc. ؀ڥ͝ͱʹΞϓϦͷ*%Λมߋ͢Δ BQQDPOGJHUTͷ࣮ྫ const APP_VARIANT = process.env.APP_VARIANT 
 
 const IS_PROD = APP_VARIANT === 'production' 
 const APP_NAME = IS_PROD ? 'PepUp' : `PepUp (${APP_VARIANT})` 
 const APP_ID = IS_PROD ? 'jp.co.jmdc.pepup' : `jp.co.jmdc.pepup.${APP_VARIANT}` 
 
 export default { 
 name: APP_NAME, 
 ios: { 
 bundleIdentifier: APP_ID, 
 }, 
 android: { 
 package: APP_ID, 
 }, 
 }; 11

Slide 12

Slide 12 text

© JMDC Inc. ؀ڥ͝ͱʹΞϓϦͷ*%Λมߋ͢Δ OQYFYQPDPOGJHͰઃఆ஋ͷ֬ೝ͕Ͱ͖Δ $ APP_VARIANT=staging npx expo config 
 
 { 
 name: 'PepUp (staging)', 
 ios: { 
 bundleIdentifier: 'jp.co.jmdc.pepup.staging', 
 ..., 
 }, 
 android: { 
 package: 'jp.co.jmdc.pepup.staging', 
 ..., 
 }, 
 } 12

Slide 13

Slide 13 text

© JMDC Inc. &"4#VJMEͰ؀ڥ͝ͱʹ ΞϓϦΛCVJMEͰ͖ΔΑ͏ʹ͢Δ

Slide 14

Slide 14 text

© JMDC Inc. &"4#VJMEͰ؀ڥ͝ͱʹΞϓϦΛCVJMEͰ͖ΔΑ͏ʹ͢Δ MPDBM։ൃ࣌͸ɺTIFMM্ʹ؀ڥม਺Λઃఆ͠ɺ؀ڥΛ੾Γସ͑ͨ 14 CLI͔Βઃఆ ؀ڥม਺ Build

Slide 15

Slide 15 text

© JMDC Inc. &"4#VJMEͰ؀ڥ͝ͱʹΞϓϦΛCVJMEͰ͖ΔΑ͏ʹ͢Δ &"4#VJME࣌͸ɺFBTKTPOʹ؀ڥม਺Λઃఆ͠ɺ؀ڥΛ੾Γସ͑Δ 15 eas.json ؀ڥม਺ Build

Slide 16

Slide 16 text

© JMDC Inc. &"4#VJMEͰ؀ڥ͝ͱʹΞϓϦΛCVJMEͰ͖ΔΑ͏ʹ͢Δ FBTKTPOͷ+40/TDIFNB { 
 "build": { 
 // ೚ҙͷ໊લͰBuild VariantΛ࡞ΕΔ
 "BUILD_PROFILE_NAME_1": { 
 // ؀ڥม਺
 "env": { 
 ..., 
 } 
 }, 
 "BUILD_PROFILE_NAME_2": { 
 ..., 
 }, 
 } 
 } 16

Slide 17

Slide 17 text

© JMDC Inc. &"4#VJMEͰ؀ڥ͝ͱʹΞϓϦΛCVJMEͰ͖ΔΑ͏ʹ͢Δ FBTKTPOͷ࣮ྫ { 
 "build": { 
 "staging": { 
 "env": { 
 "APP_VARIANT": “staging" 
 } 
 }, 
 "production": { 
 "env": { 
 "APP_VARIANT": “production" 
 } 
 }, 
 } 
 } 17

Slide 18

Slide 18 text

© JMDC Inc. &"4#VJMEͰ؀ڥ͝ͱʹΞϓϦΛCVJMEͰ͖ΔΑ͏ʹ͢Δ ProfileΛࢦఆͯ͠EAS Build͢Δ # Staging Build 
 $ npx eas build --platform android --profile staging 
 
 # Production Build 
 $ npx eas build --platform android --profile production 18

Slide 19

Slide 19 text

© JMDC Inc. ؀ڥ͝ͱʹ ઃఆ஋Λ·ͱΊͯมߋ͢Δ

Slide 20

Slide 20 text

© JMDC Inc. ؀ڥ͝ͱʹઃఆ஋Λ·ͱΊͯมߋ͢Δ ྫ؀ڥ͝ͱʹ"1*ͷ઀ଓઌΛ੾Γସ͍͑ͨ 20 Develop API Production API Staging API jp.co.jmdc.pepup jp.co.jmdc.pepup.develop jp.co.jmdc.pepup.staging

Slide 21

Slide 21 text

© JMDC Inc. ؀ڥ͝ͱʹઃఆ஋Λ·ͱΊͯมߋ͢Δ ΍Δ͜ͱ w ؀ڥ͝ͱʹFOWΛ࡞੒͢Δ w "11@7"3*"/5ΛݩʹFOWΛ੾Γସ͑Δ w &YQP$POTUBOUT͔ΒࢀরͰ͖ΔΑ͏ʹ͢Δ 21

Slide 22

Slide 22 text

© JMDC Inc. ؀ڥ͝ͱʹઃఆ஋Λ·ͱΊͯมߋ͢Δ ؀ڥ͝ͱʹFOWΛ࡞੒͢Δ w EPUFOWΛར༻͠ɺ؀ڥ͝ͱͷઃఆΛ੾Γସ͑Δ w ؀ڥ͝ͱͷઃఆΛFOWͱ໊෇͚ͨϑΝΠϧʹ·ͱΊͯࢀরͰ͖Δ͘Μ 22

Slide 23

Slide 23 text

© JMDC Inc. ؀ڥ͝ͱʹઃఆ஋Λ·ͱΊͯมߋ͢Δ ؀ڥ͝ͱʹ.envΛ࡞੒͢Δ env/.env.development API_ENDPOINT=https://development.pepup.jmdc.co.jp env/.env.production API_ENDPOINT=https://pepup.jmdc.co.jp 23

Slide 24

Slide 24 text

© JMDC Inc. ؀ڥ͝ͱʹઃఆ஋Λ·ͱΊͯมߋ͢Δ "11@7"3*"/5Ͱࢀর͢ΔFOWΛ੾Γସ͑Δ BQQDPOGJHUT import dotenv from 'dotenv'; 
 
 dotenv.config({ 
 // APP_VARIANTΛϕʔεʹࢀর͢Δ.envΛ੾Γସ͑Δ
 path: `env/.env.${process.env.APP_VARIANT ?? 'development'}`, 
 }); 
 
 // APP_VARIANT=developmentͩͱɺhttps://development.pepup.jmdc.co.jp ͕ฦͬͯ͘Δ
 console.log(`process.env.API_ENDPOINT: ${process.env.API_ENDPOINT}`) 24

Slide 25

Slide 25 text

© JMDC Inc. ؀ڥ͝ͱʹઃఆ஋Λ·ͱΊͯมߋ͢Δ &YQP$POTUBOUT͔ΒࢀরͰ͖ΔΑ͏ʹ͢Δ w &YQPͰఏڙ͍ͯ͠ΔγεςϜ৘ใΛఏڙͯ͘͠ΕΔNPEVMF w BQQKTPOͷ஋Λࢀর͢Δ͜ͱ͕Ͱ͖Δ 25

Slide 26

Slide 26 text

© JMDC Inc. ؀ڥ͝ͱʹઃఆ஋Λ·ͱΊͯมߋ͢Δ ࣮ྫ BQQDPOGJHUT dotenv.config({ ... }); 
 
 export default { 
 extra: { 
 // extraͷઃఆ஋͸ɺ Constants.expoConfig.extra ͔ΒࢀরͰ͖Δ
 apiEndpoint: process.env.API_ENDPOINT, 
 }, 
 }; useApi.ts import Constants from 'expo-constants'; 
 
 const useApi = () => { 
 const result = await fetch( // extra.apiEndPoint ͷ஋Λࢀর 
 Constants.expoConfig.extra.apiEndpoint 
 ) 
 } 26

Slide 27

Slide 27 text

© JMDC Inc. 3FGFSFODF w *OTUBMMJOHBQQWBSJBOUTPOUIFTBNFEFWJDF&YQP%PDVNFOUBUJPO w &OWJSPONFOUWBSJBCMFTJO&YQP&YQP%PDVNFOUBUJPO w #VJMETDIFNBGPSFBTKTPO&YQP%PDVNFOUBUJPO 27

Slide 28

Slide 28 text

© JMDC Inc. 8&"3&)*3*/( શํҐͰੵۃ࠾༻த ΧδϡΞϧ໘ஊ΋͍ͯ͠ΔͷͰɺ͓ؾܰʹ͝࿈བྷ͍ͩ͘͞ 28 ͦͷଞͷΤϯδχΞ IUUQTISNPTDPQBHFTKNEDKPCT DBUFHPSZ ϞόΠϧΞϓϦΤϯδχΞ IUUQTISNPTDPQBHFTKNED KPCT