Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aps-environment값이development로 하드코딩되어 있습니다. 이 경우, Ad-Hoc 또는 App Store 배포를 위한 릴리즈 빌드에서 푸시 알림이 동작하지 않게 됩니다.프로젝트 설정(.pbxproj)을 확인해보니 Debug와 Release 빌드 모두 동일한 .entitlements 파일을 사용하고 있습니다.
이 문제를 해결하기 위해 빌드 구성(Debug, Release)에 따라 다른 값을 사용하도록 설정하는 것이 좋습니다. 예를 들어, 다음과 같이 Xcode 빌드 설정 변수를 사용할 수 있습니다.
그런 다음 Xcode 빌드 설정의 'User-Defined' 섹션에서
APS_ENVIRONMENT변수를 추가하고, Debug 구성에는development, Release 구성에는production값을 설정해야 합니다.또 다른 방법은
Debug.entitlements와Release.entitlements파일을 분리하여 각 빌드 구성에 맞는 파일을 사용하도록 설정하는 것입니다.이 변경이 적용되지 않으면 프로덕션 환경에서 푸시 알림 기능이 제대로 작동하지 않으므로 반드시 수정이 필요합니다.