My Boundary As Much As I Experienced

RN) 신규앱 Applestore connect와 Play console에 출시하며 겪은 문제들... (Invalid MinimumOSVersion, Missing required icon file, Deprecated Gradle features were used in this build, 디버그 모드로 서명한 APK ) 본문

FrontEnd/React Native

RN) 신규앱 Applestore connect와 Play console에 출시하며 겪은 문제들... (Invalid MinimumOSVersion, Missing required icon file, Deprecated Gradle features were used in this build, 디버그 모드로 서명한 APK )

Bumang 2024. 9. 10. 21:59

오늘 신규앱을 내부 테스트로 임시 출시해봤는데.. 진짜 우당탕탕 문제의 연속이었다.

대충 어떤 이슈였고 어떻게 해결했는지를 나열식으로 정리해본다.

일단 일어난 현상만을 기록하는 느낌이고, 이 이슈들에 대한 깊은 이해도는 아직 없다는 점 참고 바란다.

 

iOS 빌드 후 Applestore connect에 Distribution 시 겪은 에러

× Asset validation failed
Invalid MinimumOSVersion. Apps that only support 64-bit devices must specify a deployment target of 8.0 or later. MinimumOSVersion in 'todaysdiary.app/Frameworks/hermes.framework' is ".
(ID: 485bef48-3b55-4699-0166-638f4421e4d0)

Asset validation failed
Missing Info.plist value. A value for the Info.plist key 'CFBundlelconName' is missing in the bundle
'org.reactjs.native.example.todaysdiary'. Apps built with iOS 11 or later SDK must supply app icons in an asset catalog and must also provide a value for this Into.plist key. For more information see http://help.apple.com/xcode/mac/current/#/dev10510b1f7. (ID: 22f0e3b8-a706-42d7-977d-c02984b22f2e)

& Asset validation failed
Missing required icon file. The bundle does not contain an app icon for iPhone / iPod Touch of exactly '120x120' pixels, in .png format for iOS versions >= 10.0. To support older versions of ios, the icon may be required in the bundle outside of an asset catalog. Make sure the Info. plist file includes appropriate entries referencing the file. See https://developer.apple.com/documentation/ bundleresources/information_property_list/user_interface (ID: 8bd3ed1c-b88c-4bc3-a46f-d3ed31e76aa1)

& Asset validation failed
Missing Info.plist value. A value for the key 'MinimumOSVersion' in bundle todaysdiary.app/ Frameworks/hermes.framework is required. (ID: f544afdd-Od7d-4efd-9d2b-1efa82b5e157)

× Asset validation failed
Invalid Bundle. The bundle todaysdiary.app/Frameworks/hermes.framework does not support the minimum OS Version specified in the Info.plist.

 

1. Invalid MinimumOSVersion 에러

에러메시지는 직관적이다. 최소 OS 버전이 안 맞는다는 얘기다.

그래서 1차 시도로 iOS앱의 메타데이터를 담당하는 파일인 info.plist에

최소버전의 key와 string을 기입해줬다.

<key>MinimumOSVersion</key>
<string>8.0</string> // your minimum version

 

그래서 이 이슈는 해결될지 알았는데.. 계속 발생해서 다른 방법을 찾던 결과..

XCode 상에서도 최소 OS버전을 info.plist와 똑같이 맞춰줘야한다는걸 깨달았고 2차 시도로 이를 고쳐줬다.

 

그러나 계속 이런 일이 일어나서 GPT에게 물어본 결과

hermes.framework 상에서도 이를 기입해줘야한다고 했다.

그런데 내가 사용하던 XCode 버전에선 hermes.framework라는 파일에 접근할 수 없었다..

그래서 그냥 hermes엔진을 사용하지 않도록 podfile에서 hermes_enabled를 false로 지정해주면 해결된다는 얘길 듣고

시도해본 결과, 에러는 사라졌다!

use_react_native!(
  :hermes_enabled => false
  ...
)

 

그런데 hermes엔진은 브릿지의 대안으로 성능 최적화에 도움을 주는 엔진이기 때문에..

최소버전 기입하라는 에러 하나 고치려고 이를 포기해야된다는게 상식적으로 이해가 가지 않았다.

딱 이 짤 같은 느낌..? 그냥 '어떤 엔진에서 에러가 나니까 안 써버리고 말지!'라는게 최선의 방법일지

의문이었다. 여기까지 해보고나서 사수님께 SOS를 요청했고 사수님과 같이 별의 것을 다 시도해본 결과

별다른 방도를 못 찾았었다. 최소버전을 이미 Xcode와 info.plist에 기입했고, hermes 파일에는 접근할 수 없는데

더 이상 뭘 더 할 수 있는가?...

 

이렇게 한참 헤메다가 사수님이 갑자기 나에게 RN 몇 버전이냐고 물었고,

나는 0.74.4라니까 "혹시 모르니 latest 버전으로 업데이트 해보세요"라고 하셨다.

그리고 최신 버전은 0.75.1로 업데이트를 하고나니 바로 이 에러는 사라졌다.

사수님이 말하길 '0.74버전이 역대급으로 잔버그가 많았다..

나도 안 잡히는 에러가 있었는데 0.74버전 안 쓰니까 해결된게 몇 개 있었다' 라고 하셨다..

 

아직도 이게 정말 해결법이 맞나? 싶다. 뭐.. 원리가 어떻고 간에 벌어진 현상이니 일단 받아들여야지..

 

2. Missing required icon file 에러

이건 앱아이콘이 없어서 appstore connect에 못 올린다는 의미다.

XCode에서 AppIcon을 설정해주자. 그럼 끝!!

 

 

 

안드로이드 빌드 후 Play Console에 출시하며 겪은 에러

1. Deprecated Gradle features were used in this build, making it incompatible with Gradle X.0.

사실 이건 그냥 경고인데, Deprecated될 gradle기능을 쓰고 있다고, 버전 올리라는 얘기다.

쉽게 말해 이제 업데이트될 9.0에선 안 쓰이니 퍼뜩 쓰지말란 얘기다.

버전 올렸을 때 다른 라이브러리와 충돌을 파악하기 힘들 땐 일단 그냥

'--warning-mode all'을 입력해서 이번 빌드는 정상적으로 진행할수도 있다.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.6/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

 

 

2. 디버그 모드로 서명한 APK 또는 Android App Bundle을 업로드했습니다. 출시 모드로 APK 또는 Android App Bundle에 서명해야 합니다.

이건 터미널에서 나는 에러가 아니라 play console에 aab 빌드한 파일을 올렸을 때 나는 에러이다.

디버그모드로 서명한 APK나 AAB를 올렸다? 무슨 소리지? 싶지만 말 그대로 디버그 모드인채로 올린거다.

어떻게 해결하나?

 

1. android/app/build.gradle 확인

일단 파일에 아래와 같은 서명이 다 잘 들어가 있는지 확인하자.

android {
    ...
    signingConfigs {
        release {
            storeFile file('path-to-your-keystore-file') // keystore 파일의 경로
            storePassword 'your-store-password' // keystore 비밀번호
            keyAlias 'your-key-alias' // 키의 별칭
            keyPassword 'your-key-password' // 키 비밀번호
        }
    }
    buildTypes {
        release {
            signingConfig signingConfigs.release
            minifyEnabled false // 또는 true, ProGuard를 사용하는지에 따라 다름
            shrinkResources false // 불필요한 리소스를 제거할지 여부
        }
    }
}

 

2. 키스토어 생성

만약 릴리스 키스토어가 없다면 새로 생성해야 한다. 아래 명령어를 사용해 키스토어를 생성할 수 있다.

생성된 your-release-key.keystore 파일을 안전한 곳에 보관하고, 이를 build.gradle에 등록하여 릴리스 빌드에 사용할 수 있도록 설정해야한다.

keytool -genkey -v -keystore your-release-key.keystore -keyalg RSA -keysize 2048 -validity 10000 -alias your-key-alias

 

 

 

3. Google Play에 업로드

./gradlew bundleRelease

생성된 릴리스 모드 AAB 파일을 Google Play Console에 다시 업로드한다.

 

 

여기서, your-release-key.keystore와 your-key-alias는 어떤 방식으로 지어야할까?

사실 자기 마음대로 지어도 괜찮다. 하지만 관례적으로 your-release-key.keystore를 지을 때

'.keystore'를 뒤에 붙이는 편이고, '.keystore' 부분을 없앤 걸 your-key-alias로 쓰면 된다.

 

*위치는 어디가 좋을까?

프로젝트 디렉토리 내에 두거나, 클라우드 저장소 또는 개인 컴퓨터의 안전한 위치에 저장하는 것이 좋다.

보통 android/app/ 폴더에 두는 편이다.

 

https://stackoverflow.com/questions/29736871/setting-the-minimum-ios-version-in-xcode