본문 바로가기
2023년 부터/iOS&Swift

[iOS&Swift] 버그& 이슈 (BGTaskSchedulerPermittedIdentifiers )

by JeongUPark 2024. 3. 26.
반응형

 

이슈 상황

iOS에서 Notification 관련 작업을 해주기 위해 Background Fetch, Background processing 을 추가해주었는데, Archive를 하니 아래와 같은 에러가 나타났습니다.

Asset validation failed Missing Info.plist value. The Info.plist key 'BGTaskSchedulerPermittedIdentifiers' must contain a list of identifiers used to submit and handle tasks when 'UIBackgroundModes' has a value of 'processing'. For more information, refer to the Information Property List Key Reference at 

https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Introduction/Introduction.html
. (ID: 73617158-c993-4b41-9c81-a33c81515244)

번역을 해보면

자산 검증 실패, Info.plist 값이 누락되었습니다. 'UIBackgroundModes'의 값이 'processing'일 때 작업을 제출하고 처리하는 데 사용되는 식별자 목록을 포함해야 하는 Info.plist 키 'BGTaskSchedulerPermittedIdentifiers'가 필요합니다. 자세한 정보는 https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Introduction/Introduction.html에서 정보 속성 목록 키 참조를 참고하세요. (ID: 73617158-c993-4b41-9c81-a33c81515244)

원인 분석

위 에러에서 말하듯이 Background processing 작업을 위해 Info.plist에 BGTaskSchedulerPermittedIdentifiers를 추가해야합니다. (추가로 에러에서 나온 링크를 들어가면 About Info.plist Keys and Values는 제목의 문서를 볼 수 있습니다.)

해결방법

Info.plist에 BGTaskSchedulerPermittedIdentifiers을 추가하기 위해 

code로는

	<key>BGTaskSchedulerPermittedIdentifiers</key>
	<array>
		<string>패키지 네임</string>
	</array>

혹은 Info.plist에서 직접 입력하려면 아래 이미지처럼 추가해주면 해결 됩니다.

 

반응형