티스토리 뷰
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
- NSPrivacyAccessedAPICategoryDiskSpace
- python3.12 설치
- NSPrivacyAccessedAPICategoryUserDefaults
- NSPrivacyAccessedAPICategorySystemBootTime
- EC2
- PlatformException(sign_in_failed
- but linking in object file
- 아이폰
- 수경재배키트
- Xcode
- google play appcheck
- 베란다 수경재배
- ITMS-91053: Missing API declaration
- flutter build ipa
- Flutter
- Response: Failure when receiving data from the peer
- Firebase
- /ios/Pods/MLImage/Frameworks/MLImage.framework/MLImage[arm64][2](GMLImage.o)) built for 'iOS'
- 리눅스 python3 설치
- aws python3.12
- Failed to launch iOS Simulator: Error: Emulator didn't connect within 60 seconds
- ios pod install error
- NSPrivacyAccessedAPICategoryFileTimestamp
- ios
- Error (Xcode): Building for 'iOS-simulator'
- CDN: trunk URL couldn't be downloaded
- 해결방법
- Error (Xcode): Target release_unpack_ios failed: Exception: Binary
- com.google.android.gms.common.api.ApiException: 10:
- MySQL
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
글 보관함