티스토리 뷰
반응형
FirebaseApp.configure()
Firebase Project를 두개 생성하고 이렇게 두개 생성하고
둘다 앱 등록후 GoogleService-Info.json 파일을 받고

dev에서 받은 파일은 파일명을 GoogleService-Info-dev.json으로 변경후

이렇게 프로젝트 폴더에 추가해준다.
그리고 AppDelegate.swift 파일을 열고
FirebaseApp.configure()
이렇게 되어있던 소스를 다음과 같이 수정한다.
var fileName = "GoogleService-Info"
#if DEBUG
fileName = fileName + "-dev"
#endif
let filePath = Bundle.main.path(forResource: fileName, ofType: "plist")!
let options: FirebaseOptions? = FirebaseOptions.init(contentsOfFile: filePath)
FirebaseApp.configure(options: options!)
그리고
info.plist 파일을 열어 Bulid Settings에서 other swift flag를 검색후
Debug의 값에 -D DEBUG를 추가후

빌드를 하면 된다.

스키마 설정에서 Build Configuration 값이 Debug인 경우 GoogleService-Info-dev.plist를 바라보게 되고
Release인 경우 GoogleService-Info.plist를 바라보게 된다.
개발버전으로 배포하고 싶다면 위 사진에서 Archive를 클릭하고 Build Configuration 값을 Debug로 변경후 배포하면 개발버전을 바라본 상태로 배포가 된다.
반응형
'IT > 프로그래밍' 카테고리의 다른 글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- ios 앱 심사상태
- NSPrivacyAccessedAPICategorySystemBootTime
- 리눅스 python3 설치
- aws python3.12
- ios pod install error
- Flutter
- flutter build ipa
- NSPrivacyAccessedAPICategoryUserDefaults
- MySQL
- EC2
- PlatformException(sign_in_failed
- 수경재배키트
- Failed to launch iOS Simulator: Error: Emulator didn't connect within 60 seconds
- NSPrivacyAccessedAPICategoryDiskSpace
- ITMS-91053: Missing API declaration
- NSPrivacyAccessedAPICategoryFileTimestamp
- CDN: trunk URL couldn't be downloaded
- com.google.android.gms.common.api.ApiException: 10:
- 해결방법
- ios
- 슬랙으로 보내기
- 아이폰
- Firebase
- python3.12 설치
- but linking in object file
- Error (Xcode): Target release_unpack_ios failed: Exception: Binary
- Response: Failure when receiving data from the peer
- google play appcheck
- Xcode
- 베란다 수경재배
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
글 보관함