Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion DevLog/Resource/DevLog.entitlements
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
<dict>
<key>aps-environment</key>
<string>development</string>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

aps-environment 값이 development로 하드코딩되어 있습니다. 이 경우, Ad-Hoc 또는 App Store 배포를 위한 릴리즈 빌드에서 푸시 알림이 동작하지 않게 됩니다.

프로젝트 설정(.pbxproj)을 확인해보니 Debug와 Release 빌드 모두 동일한 .entitlements 파일을 사용하고 있습니다.

이 문제를 해결하기 위해 빌드 구성(Debug, Release)에 따라 다른 값을 사용하도록 설정하는 것이 좋습니다. 예를 들어, 다음과 같이 Xcode 빌드 설정 변수를 사용할 수 있습니다.

<key>aps-environment</key>
<string>$(APS_ENVIRONMENT)</string>

그런 다음 Xcode 빌드 설정의 'User-Defined' 섹션에서 APS_ENVIRONMENT 변수를 추가하고, Debug 구성에는 development, Release 구성에는 production 값을 설정해야 합니다.

또 다른 방법은 Debug.entitlementsRelease.entitlements 파일을 분리하여 각 빌드 구성에 맞는 파일을 사용하도록 설정하는 것입니다.

이 변경이 적용되지 않으면 프로덕션 환경에서 푸시 알림 기능이 제대로 작동하지 않으므로 반드시 수정이 필요합니다.

	<string>$(APS_ENVIRONMENT)</string>

<key>com.apple.developer.applesignin</key>
<array>
<string>Default</string>
</array>
</dict>
</plist>