Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Setting] #113 - xcconfigs로 개발 환경 분기 #139

Merged
merged 33 commits into from
Apr 6, 2023

Conversation

L-j-h-c
Copy link
Contributor

@L-j-h-c L-j-h-c commented Apr 5, 2023

🌴 PR 요약

🌱 작업한 브랜치

1.xcconfigs로 개발 환경을 분기했습니다

image

DEV : 실제 프로덕트 BaseURL을 사용하는 debug scheme
TEST : 테스트 BaseURL을 사용하는 debug scheme
QA : 테스트 BaseURL을 사용하는 release scheme
RELEASE : 실제 프로덕트 BaseURL을 사용하는 release scheme

서버에 요청을 날려 본 결과 분기별로 잘 작동합니다.

2. 전처리문 사용 BaseURL 분기

모든 xcconfig이 import하는 shared.xcconfig은 아래와 같은 swift flags를 정의합니다.

OTHER_SWIFT_FLAGS[config=Development][sdk=*] = $(inherited) -DDEV
OTHER_SWIFT_FLAGS[config=Test][sdk=*] = $(inherited) -DTEST
OTHER_SWIFT_FLAGS[config=QA][sdk=*] = $(inherited) -DQA
OTHER_SWIFT_FLAGS[config=PROD][sdk=*] = $(inherited) -DPROD

따라서 해당 전처리문을 이용하여 baseURL을 분기할 수 있습니다.

image

📮 관련 이슈

lsj8706 and others added 27 commits April 1, 2023 00:01
@L-j-h-c L-j-h-c self-assigned this Apr 5, 2023
@L-j-h-c L-j-h-c requested a review from a team April 5, 2023 09:31
@L-j-h-c L-j-h-c requested review from elesahich, 0inn, lsj8706 and devxsby and removed request for a team April 5, 2023 09:31
lsj8706 and others added 5 commits April 5, 2023 18:49
…erge

# Conflicts:
#	SOPT-Stamp-iOS/Projects/Modules/DSKit/Sources/Components/ChartRectangleView.swift
#	SOPT-Stamp-iOS/Projects/Modules/DSKit/Sources/Components/CustomButton.swift
#	SOPT-Stamp-iOS/Projects/Modules/DSKit/Sources/Components/CustomNavigationBar.swift
#	SOPT-Stamp-iOS/Projects/Modules/DSKit/Sources/Components/CustomTextFieldView.swift
#	SOPT-Stamp-iOS/Projects/Modules/DSKit/Sources/Components/SpeechBalloonView.swift
#	SOPT-Stamp-iOS/Projects/Modules/DSKit/Sources/Components/StarView.swift
#	SOPT-iOS/Projects/Features/StampFeature/Sources/Components/STChartRectangleView.swift
#	SOPT-iOS/Projects/Features/StampFeature/Sources/Components/STSpeechBalloonView.swift
#	SOPT-iOS/Projects/Features/StampFeature/Sources/Components/STStarView.swift
#	SOPT-iOS/Projects/Modules/DSKit/Sources/Components/ChartRectangleView.swift
#	SOPT-iOS/Projects/Modules/DSKit/Sources/Components/CustomButton.swift
#	SOPT-iOS/Projects/Modules/DSKit/Sources/Components/CustomNavigationBar.swift
#	SOPT-iOS/Projects/Modules/DSKit/Sources/Components/CustomTextFieldView.swift
#	SOPT-iOS/Projects/Modules/DSKit/Sources/Components/SoptampComponents/STCustomButton.swift
#	SOPT-iOS/Projects/Modules/DSKit/Sources/Components/SoptampComponents/STNavigationBar.swift
#	SOPT-iOS/Projects/Modules/DSKit/Sources/Components/SoptampComponents/STTextFieldView.swift
#	SOPT-iOS/Projects/Modules/DSKit/Sources/Components/SpeechBalloonView.swift
#	SOPT-iOS/Projects/Modules/DSKit/Sources/Components/StarView.swift
Copy link
Member

@devxsby devxsby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다 👍🏻
근데 밑에 엄청난 컨플릭트는 먼가여...? 🫥

Copy link
Member

@lsj8706 lsj8706 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

폴더명 바꾸는 작업을 하면서 Files Changed가 엄청 커졌네요 ㅋㅋㅋㅋㅋ 너무 수고하셨습니다.
깃허브가 렉이 걸리는 현상....😮
개발 환경 분리가 필요했었는데 덕분에 편하게 작업 할 수 있겠네요!! 👍

궁금한 것이 있어요! DEV 환경에서도 실제 프로덕트 BaseURL를 사용하는 debug scheme을 사용한다고 하셨는데 DEV로 놓고 개발하다가 잘못된 데이터가 들어가지는 않을까요..?

@L-j-h-c
Copy link
Contributor Author

L-j-h-c commented Apr 6, 2023

@lsj8706 데이터가 추가를 테스트해야 한다면 TEST 스킴에서 해주시면 됩니다!

@L-j-h-c L-j-h-c merged commit ccdef7a into sopt-makers:develop Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feat] XC Config으로 개발 환경 분기
3 participants