최근: iOS: 테스트플라이트가 곧 테스트용 앱이니까 따로 바꿔준건 없음
1. firebase GoogleService 어쩌구도 prod도 dev 바라보도록
2. 스플래시
3. 아이콘
4. 코드푸시 키
(4까지는 공통)
5. Android applicationId 변경
6. iOS: 왜인지 모르겠지만 스키마 하나 더 만들었음. build 하면 device 관련 에러났기 때문에.
1. 에러
Could not get GOOGLE_APP_ID in Google Services file from build environment
=>
target 새로 만들기
https://fluffy.es/multischeme/
Use multiple target / scheme for different server environment URL
Sometimes when you are working on an iOS app that connects to server, there might be multiple server environment like development, staging and production. (God bless you if you only have one server which is the production 😅) These servers has different
fluffy.es
2. firebase 나누기
https://coding-dahee.tistory.com/186
에러1
Details
This app could not be installed at this time.
Domain: IXUserPresentableErrorDomain
Code: 1
Failure Reason: Could not install at this time.
Recovery Suggestion: Could not hardlink copy /Users/daheeahn/Library/Developer/CoreSimulator/Devices/6E79B3B6-3DF7-449D-ACA8-C6E054445E08/data/Containers/Bundle/Application/F99B895C-929B-4A76-BA0B-5A9165C3C46D/루빗-테스트.app to /Users/daheeahn/Library/Developer/CoreSimulator/Devices/6E79B3B6-3DF7-449D-ACA8-C6E054445E08/data/Library/Caches/com.apple.mobile.installd.staging/temp.GXjEbl/extracted/Payload/루빗-테스트.app with manifest /Users/daheeahn/Library/Developer/CoreSimulator/Devices/6E79B3B6-3DF7-449D-ACA8-C6E054445E08/data/Library/Caches/com.apple.mobile.installd.staging/temp.GXjEbl/extracted/com.apple.deltainstallcommands.com.roubit.test
--
Could not hardlink copy /Users/daheeahn/Library/Developer/CoreSimulator/Devices/6E79B3B6-3DF7-449D-ACA8-C6E054445E08/data/Containers/Bundle/Application/F99B895C-929B-4A76-BA0B-5A9165C3C46D/루빗-테스트.app to /Users/daheeahn/Library/Developer/CoreSimulator/Devices/6E79B3B6-3DF7-449D-ACA8-C6E054445E08/data/Library/Caches/com.apple.mobile.installd.staging/temp.GXjEbl/extracted/Payload/루빗-테스트.app with manifest /Users/daheeahn/Library/Developer/CoreSimulator/Devices/6E79B3B6-3DF7-449D-ACA8-C6E054445E08/data/Library/Caches/com.apple.mobile.installd.staging/temp.GXjEbl/extracted/com.apple.deltainstallcommands.com.roubit.test
Domain: MIInstallerErrorDomain
Code: 8
User Info: {
FunctionName = "-[MIInstallableBundlePatch _applyDeltaPatchWithError:]";
LegacyErrorString = PackagePatchFailed;
SourceFileLine = 113;
}
--
System Information
macOS Version 10.15.4 (Build 19E266)
Xcode 11.4 (16134)
=> Device - Erase All ~ 시뮬레이터 초기화
에러2
Details
Failed to set icon promise for com.roubit.test
Domain: IXErrorDomain
Code: 2
Failure Reason: Failed to create promise.
User Info: {
FunctionName = "+[IXPlaceholder _placeholderForBundle:client:withParent:installType:metadata:error:]";
SourceFileLine = 387;
}
--
Placeholder did not exist for UUID 3D4A9F12-56D8-4F6C-A68A-629E0872B47F when called for -[IXSClientConnection _remote_IXSPlaceholder:setIconPromiseUUID:completion:] by client CoreSimulatorBridge (pid 25815)
Domain: IXErrorDomain
Code: 3
Failure Reason: Failed to locate promise.
User Info: {
FunctionName = "-[IXSClientConnection _fetchPlaceholderForUUID:method:andRunWithPromise:error:]";
SourceFileLine = 1136;
}
--
System Information
macOS Version 10.15.4 (Build 19E266)
Xcode 11.4 (16134)
구글링으로는 못찾았는데 아이콘 사진 바꾸니까 됐음
에러3
Terminating app due to uncaught exception 'com.firebase.core', reason: 'Options is nil. Please pass a valid options
Debug, Release로 나누는게 잘 안먹히나?
새로운 방법으로 시도해보자.
Google-Service-Info.plist 파일 여러개 사용하기
Xcode 11.3.1, Swift 5 기준
medium.com
case "${CONFIGURATION}" in
"Debug" )
cp -r "$SRCROOT/ProjectName/Resources/Firebase/GoogleService-Info-Dev.plist" "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/GoogleService-Info.plist" ;;
"Release" )
cp -r "$SRCROOT/ProjectName/Resources/Firebase/GoogleService-Info-Prod.plist" "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/GoogleService-Info.plist" ;;
*)
;;
esac
***Google-Service-Info.plist 추가할 때 주의
1. 추가할 때 downloads 파일에서 미리 이름 변경하지 말고 일단 xcode로 옮긴 뒤에 변경하기. 안그럼 경로가 downloads로 되어버림.
2. 추가할 때 target 해제 하고, copy bundle에는 꼭 추가해주기.
3. 아래 사진
그리고 AppDelegate.m 에서 이렇게만 써주면 됨!
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
...
[FIRApp configure];
...
}
rm -rf ~/Library/Developer/Xcode/DerivedData/*
실행하기
GoogleService-Info 는 다운받고 바로 옮기기 (다른 폴더로 옮기지 말고)
안되면 legacy build 처리.
그런데 에러 재발!
Cycle inside roubit-for-test; building could produce unreliable results.
Cycle details:
→ That command depends on command in Target 'roubit-for-test': script phase “[CP] Copy Pods Resources”
→ Target 'roubit-for-test' has copy command from '/Users/daheeahn/Library/Developer/Xcode/DerivedData/roubit-fynjdldkbiwgbbgtnlzmvemoteac/Build/Products/Debug-iphonesimulator/루빗-테스트.app' to '/Users/daheeahn/Library/Developer/Xcode/DerivedData/roubit-fynjdldkbiwgbbgtnlzmvemoteac/Build/Products/Debug-iphonesimulator/루빗-테스트.app/루빗-테스트.app'
Crashlytics 에 script 쓰는거 있었던거 같은데
에러
'/Users/daheeahn/Library/Developer/Xcode/DerivedData/roubit-fynjdldkbiwgbbgtnlzmvemoteac/Build/Products/Debug-iphonesimulator/루빗-테스트.app/루빗-테스트.app/루빗-테스트.app/루빗-테스트.app/루빗-테스트.app/루빗-테스트.app/루빗-테스트.app/루빗-테스트.app/루빗-테스트.app/루빗-테스트.app/루빗-테스트.app/루빗-테스트.app/루빗-테스트.app/루빗-테스트.app/루빗-테스트.app/루빗-테스트.app/루빗-테스트.app/루빗-테스트.app/루빗-테스트.app/루빗-테스트.app/루빗-테스트.app/루빗-테스트.app/루빗-테스트.app/루빗-테스트.app' is longer than filepath buffer size (1025). (in target 'roubit-for-test' from project 'roubit')
https://stackoverflow.com/questions/35619276/pbxcp-error-is-longer-than-filepath-buffer-size-1025
쓸데없는 것을 추가해서 그렇다.
여기 동그라미를 체크했더니 copy bundle resources 에 추가돼서 recursive 된듯
다시 원점
info: Exec FirebaseCrashlytics Run from Pods
error: Could not get GOOGLE_APP_ID in Google Services file from build environment
Pods를 삭제하고 다시 실행해보자.
에러
React/RCTBridgeDelegate.h' file not found
github.com/facebook/react-native/issues/25838#issuecomment-611676716
드디어 됐다!
에러
Unrecognized font family 'Material Design Icons'
info.plist가 resource로 등록 안돼서 그런 것인지 추정
하지만 되진 않는다.
원래 info.plist도 안되고..
둘다 삭제했음.
github.com/oblador/react-native-vector-icons/issues/965#issuecomment-542936883
github.com/oblador/react-native-vector-icons/issues/965#issuecomment-547649424
이 두가지 모두 해결법은 아님.
이게 새로만든 roubit-for-test target에는 없었다.
그렇지만 역시나 안됨.
Podfile 수정
target 'roubit-for-test' do
맞는 타켓 이름으로.
그리고 다시 ios/Pods 삭제 후 pod install 하고 다시 빌드.
해결!!
새로운 타켓용 plist도 Copy Bundle Resourcces에다 혹시 모르니 추가한다.
참고용 링크
https://zamcom.tistory.com/157
XCode Build Clean
XCode의 Menu > Project > Clean 동작을 크게 의심없이 썼었다. 구글링하다가 Clean을 해도 남아있는 찌꺼기가 있다는 사실을 알게 되었다. 위치는 ~/Library/Developer/Xcode/DerivedData/ 이다. 지금까지 몇년..
zamcom.tistory.com
Xcode - Product - Clean Build
만약 안되면
1.
rm -rf ~/Library/Developer/Xcode/DerivedData/*
2.
Xcode - Product - Clean Build
3.
yarn pod && npm install
실행
// 변경해야 할 것들
bundleId
소셜로그인 키
파이어베이스 생성, 연결, 프로젝트 내 SHA, 여러 키들
Crashlytics 연결
앱아이콘과 스플래시 화면
그리하여 변경한 것들
1. 서버 url 테섭 바라보도록
2. Icon: 초록루빗으로
3. 앱이름 변경 -> 루빗-테스트
4. 파이어베이스 새로 생성, dev/release 환경 나눠서 (AppDelegate 코드가 바뀜 슈퍼-간결하게) & 크래시 연결 완료
5. 소셜로그인: 안드로이드만 카카오, 구글 테스트 완료
6. New Target: iOS roubit-for-test 타켓, Info plist도 새로(노파심에 기존 info도 같이 수정함..). 이걸 바라보도록!
7. 안드로이드 keystone 다르게
8. bundleId 다르게
9. Podfile target 다르게
10. Pod install
11. CodePush key 다르게 (테스트는 안함)
12. iOS 스플래시 -test 붙임
13. View Only For test: 다크모드 버튼 (테)로 바꿈. 여전히 다크모드 On/off 기능은 있음 & 해시 태그 보고서
'Solve Problem > React Native' 카테고리의 다른 글
[React Native] Deep Link 딥링크 (0) | 2020.08.24 |
---|---|
[React Native] 앱 화면 캡쳐 후 공유 및 갤러리에 저장하기 (Capture ScreenShot and Share) (0) | 2020.08.18 |
[React Native] Firebase Crashlytics 참고 블로그 (0) | 2020.08.12 |
[React Native] react-navigation 화면이 포커스되었을 때를 감지하기 & 특정 화면에서 돌아왔을 때 api 호출하기 (4) | 2020.07.01 |
[React Native] react native android apk 뽑기 (2) | 2020.06.06 |