UFO ET IT

번들 식별자 및 푸시 인증서… aps-environment 자격 오류

ufoet 2020. 11. 7. 18:15
반응형

번들 식별자 및 푸시 인증서… aps-environment 자격 오류


내가 읽은 어디 엑스 코드 걸릴 응용 프로그램의 식별자에서합니까? , {PRODUCT_NAME}에서 XCode 번들 식별자 형식을 지정 하고 더로드하지만 ...

나는 푸시 알림을 받고 두려워하고

"오류 도메인 = NSCocoaErrorDomain 코드 = 3000"응용 프로그램에 대한 유효한 'aps-environment'자격 문자열을 찾을 수 없음 "UserInfo = 0x15b200 {NSLocalizedDescription = 응용 프로그램에 대한 유효한 'aps-environment'자격 문자열을 찾을 수 없음}"오류.

다음을 포함하여 모든 단계를 올바르게 수행했다고 확신합니다.

  • 프로비저닝 인증서보다 먼저 푸시 인증서를 작성했습니다.
  • 'Entitlements.plist'를 만들었습니다.
  • get-task-allow 부울을 추가하고 true로 설정 (임시 릴리스)

내 머리를 잘 이해하지 못하는 유일한 생각은 번들 식별자입니다.

푸시 인증서는

XXXXXXXXXX.com.julianbaker.pwcnewsuk

PwCNewUK-Info.plist의 번들 식별자는

com.julianbaker.${PRODUCT_NAME:rfc1034identifier}

수동으로 변경하면

com.julianbaker.pwcnewsuk

앱이 PwCNewsUK로 표시되므로 UDID 불일치 오류가 발생합니다.

내가 이것을 구글 검색했을 때 문제에 대해 약간의 혼란이있는 것 같지만 일치해야하는 것 같습니까?

질문:

번들 Indentifer는
XXXXXXXXXX.com.julianbaker.pwcnewsuk 의 푸시 인증서와 일치해야 합니까?

질문:

프로비저닝 프로파일에 "aps-environment"인 타이틀먼트를 추가해야합니까? 그렇다면 어디에서 어떻게해야합니까? ( 특히 http://www.airplaysdk.com/node/3174 참조 )

iPhone 개발을 좋아하지만 때로는 헤드 뱅어가 될 수 있습니다!


개발 환경에서 작업중인 애플리케이션의 프로덕션 환경으로 이동할 때이 질문을 발견했습니다. 이 프로세스에는 새 프로필, 새 앱 ID 등의 생성이 포함되었습니다. 앱 ID와 프로필을 만들었지 만 팀 에이전트가 푸시 알림을 구성해야했습니다. 새 프로필로 테스트를 재개하려고 할 때 (앱이 푸시 알림 용으로 구성된 후) "애플리케이션에 유효한 'aps-environment'자격 문자열이 없습니다"라는 문제가 발생했습니다. 그런 다음 문서에서 약간의주의 사항을 읽은 것을 기억했습니다.

"포털이 새 프로비저닝 프로필을 생성하려면 어떤 방식 으로든 (예 : 옵션 토글) 프로필을 수정해야합니다. 프로필이 그렇게"더럽혀지지 "않은 경우 푸시 권한이없는 프로필이 제공됩니다. "

출처 : 로컬 및 푸시 알림 프로그래밍 가이드

저에게는 프로비저닝 프로파일을 "더럽 히고"다시 설치하는 것이 문제를 해결하는 데 필요한 전부였습니다. 문서에 따르면 이는 앱이 푸시 알림에 대해 구성되기 전에 프로비저닝 프로파일이 생성 되었기 때문에 필요했습니다. 이것은 누구에게나 도움이 될 수도 있고 아닐 수도 있지만 프로비저닝 프로파일에 수동으로 추가해야 할 필요성을 설명하고 제거합니다.


동일한 "응용 프로그램에 대해 유효한 'aps-environment'자격 문자열을 찾을 수 없음"문제가 발생했지만 위의 솔루션이 저에게 적합하지 않았습니다.

이 오류에 대한 좋은 문서 나 "aps-environment"키만 찾을 수 없습니다.

몇 가지 땜질을 한 후 문제를 해결 한 방법은 다음과 같습니다.

텍스트 편집기로 개발 프로비저닝 인증서 "Appname.mobileprovision"을 열고 "Entitlements"키를 찾은 다음 여기에있는 모든 값을 Code Signing Entitlements 설정에서 참조하는 Entitlements 파일에 추가합니다.

다음은 내부에서 찾을 수있는 키 / 값의 예입니다.

<key>application-identifier</key>
<string>xyz.com.xyz.xyz</string>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.ubiquity-container-identifiers</key>
<array>
<string>xyz.*</string>
</array>
<key>com.apple.developer.ubiquity-kvstore-identifier</key>
<string>xyz.*</string>
<key>get-task-allow</key>
<true/>
<key>keychain-access-groups</key>
<array>
<string>xyz.*</string>
</array>

이러한 모든 값을 내 Entitlements 파일에 추가하면 내 앱이 성공적으로 빌드되고 마침내 푸시 알림 작업으로 돌아갈 수 있습니다.

이 값이 XCode에 의해 자격 파일에 자동으로 추가되어야하는지 확실하지 않지만 확실히 내 프로젝트에서 저를 위해 생성되지 않았습니다.


설정:

Mac OS X 10.8 + Xcode 4.4

내 간단한 솔루션 :

  1. 앱 ID에 대한 푸시 알림을 설정하고 Xcode로 가져온 후 Ad Hoc 프로비저닝 프로파일을 재발급하십시오.
  2. .xcodeproj 폴더를 살펴보고 (오른쪽 클릭-> 패키지 내용 표시) xcuserdata폴더를 삭제 합니다.
  3. 그게 다야;)

그 문제에 대한 몇 가지 힌트 :

내 앱에 대한 푸시 알림을 활성화 한 후 갑자기 더 이상 임시 파일을 만들 수 없습니다. 다음과 같은 내 앱을 설치하는 동안 내 iPhone의 콘솔 로그에서 오류가 발생했습니다.

Apr  1 20:56:10 unknown installd[384] <Error>: entitlement 'keychain-access-groups' has value not permitted by a provisioning profile
Apr  1 20:56:10 unknown installd[384] <Error>: entitlement 'get-task-allow' has value not permitted by a provisioning profile
Apr  1 20:56:10 unknown installd[384] <Error>: entitlement 'application-identifier' has value not permitted by a provisioning profile
Apr  1 20:56:10 unknown installd[384] <Error>: 2ff66000 verify_signer_identity: Could not copy validate signature: -402620394
Apr  1 20:56:11 unknown installd[384] <Error>: 2ff66000 preflight_application_install: Could not verify executable at /var/tmp/install_staging.44jV0O/foo_extracted/Payload/PersonalTrainer-Tester-iPhone.app
Apr  1 20:56:11 unknown com.apple.itunesstored[392] <Notice>: MobileInstallationInstall: failed with -1
Apr  1 20:56:11 unknown installd[384] <Error>: 2ff66000 install_application: Could not preflight application install
Apr  1 20:56:11 unknown installd[384] <Error>: 2ff66000 handle_install: API failed
Apr  1 20:56:11 unknown installd[384] <Error>: 2ff66000 send_message: failed to send mach message of 71 bytes: 10000003
Apr  1 20:56:11 unknown installd[384] <Error>: 2ff66000 send_error: Could not send error response to client

앱이 Apple 푸시 알림에 대해 올바르게 서명되었는지 확인하는 데 사용 하도록 권장하는 몇 가지 기술 정보 가 있습니다 codesign -d --entitlements - <YourAppName>.app. codesign 명령의 출력에 프로덕션 또는 개발로 설정된 aps-environment가없는 경우 뭔가 수상한 것이 있습니다!

지금까지 내가 아는 한 임시 프로비저닝 프로필로 서명 된 내 앱은 항상 다음 과 같은 특정 부분이 포함 된 폴더 embedded.mobileprovision내부 <YourAppName>.app에 있습니다.

<key>Entitlements</key>
<dict>
    <key>application-identifier</key>
    <string>ABCDEFGH.com.myappname.tester</string>
    <key>aps-environment</key>
    <string>production</string>
    <key>get-task-allow</key>
    <false/>
    <key>keychain-access-groups</key>
    <array>
        <string>ABCDEFGH.*</string>
    </array>
</dict>

codesign을 사용한 후 실제 바이너리에 <YourAppName>.app일부 XML이 포함되어 있다는 것을 깨달았습니다 . 이것은 내 embedded.mobileprovision파일과 매우 다른 내용을 말합니다 .

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>application-identifier</key>
    <string>ABCDEFGH.com.myappname.tester</string>
    <key>get-task-allow</key>
    <true/>
    <key>keychain-access-groups</key>
    <array>
        <string>ABCDEFGH.com.myappname.tester</string>
    </array>
</dict>
</plist>

이것이 우리 모두가 경험하는 오류 메시지의 원인이라고 가정합니다. (이 오류는 stackoverflow의 다른 게시물뿐만 아니라 다른 뿌리를 가질 수 있지만)

The executable was signed with invalid entitlements.
The entitlements specified in your application's Code Signing Entitlements
file do not match those specified in your provisioning profile. (0xE8008016).

내 생각 엔 Xcode에 버그가있어서 plist의 설정이 스키마에서 업데이트되지 않도록하여 결국 잘못된 프로비저닝 프로필로 앱에 서명하게됩니다. 따라서 xcuserdata 폴더를 삭제하면 모든 구성표가 삭제됩니다. 따라서 Xcode는 다음 번에 적절한 설정으로 다시 생성하고 다시 만족합니다.


본질적으로 대답은 다른 사람들이 말하는 똑같은 모호한 것입니다.

  • "Entitlements.plist"가 추가되었는지 확인합니다 (새 파일 / 코드 서명 / 권한).
  • Entitlements.plist에 "get-task-allow"(Boolean Off)를 추가합니다.
  • Entitlements.plist에 "aps-environment" "프로덕션"쌍 추가-이 마지막 단계는 불필요 할 수 있지만 작동하기 직전에 수행 한 단계 중 하나였습니다.
  • iPhone / iPod에서 오래된 mobileprovision 파일 삭제 (설정 / 일반에서),
  • XCode Organizer에서 오래된 mobileprovision 파일 삭제
  • iPhone / iPod에서 앱 삭제
  • XCode 종료
  • 프로비저닝 인증서의 새 사본 다운로드
  • 텍스트 편집기로 인증서에서 "aps-environment" "production"쌍을 확인하십시오.
  • XCode 시작
  • XCode Doc 아이콘으로 드래그하여 새로운 mobileprovision 파일 추가
  • Target Info : Code Signing : Code Signing Identity에서 올바른 인증서를 재 할당 / 할당했는지 확인하십시오.
  • 빌드 결과가 올바른 프로필을 사용하고 있고 올바르게 서명되었는지 다시 확인하십시오.

작동 할 때까지이 단계를 침착하게 반복하고 다양한 조합을 5 번 정도 걸렸습니다. 나는 또한 분명히 필요하지는 않지만 새로운 mobileprovision 파일을 보장하는 Ad-hoc으로 개발에서 전환했습니다.


XCode4를 사용하고 동일한 "응용 프로그램에 대해 유효한 'aps-environment'자격 문자열을 찾을 수 없음"을 받으면 다음을 수행해야했습니다.

  • 오거나이저의 라이브러리 + 장치 패널에서 이전 프로비저닝 프로필을 삭제합니다.
  • 개발자 포털 웹 사이트에서 활성화 된 APN dev로 새 프로필 재생성
  • 오거나이저의 라이브러리 + 장치 패널에 새 프로필이 추가되었는지 확인합니다.
  • 내 기기에서 내 앱을 수동으로 삭제합니다 (떨릴 때까지 누르고 X를 누름).
  • CMD + OPT + SHIFT + K (빌드 폴더 정리) 및 CMD + SHIFT + K (정리)
  • 프로젝트> 빌드 설정> 코드 서명에서 적절한 프로필을 설정합니다.
  • 대상> 요약에서 '사용 권한'이 선택되어 있지 않은지 확인하십시오.

'프로젝트'-> '빌드 설정'-> '코드 서명'에서 올바른 프로비저닝 프로파일 (푸시가 활성화 된 프로파일)을 선택했는지 확인하십시오.

그것이 작동하도록 변경해야하는 전부였습니다.


위의 어느 것도 나를 위해 일하지 않았습니다!

  1. Xcode Organizer 에서 모든 프로비저닝 프로파일 삭제
  2. 키 체인 에서 모든 개발자 인증서 삭제
  3. iPhone 장치 에서 모든 프로비저닝 프로파일 삭제
  4. 에서 아이폰 OS 프로비저닝 포털 , 삭제 개발 프로비저닝 프로파일 에 의해 자동으로 생성 된 엑스 코드
  5. 올바른 (인증서 / AppID / 장치) 조합을 할당하여 프로비저닝 프로필만듭니다.
  6. 프로비저닝 프로필 다운로드
  7. 프로비저닝 프로파일Xcode Organizer가져 오기
  8. CMD + Option + Shift + K
  9. CMD + Shift + K
  10. CMD + R
  11. 만세 :)

프로비저닝 프로파일과 함께 올바른 방법으로 앱을 사용하고 있는지 확인하십시오.

내 말은 배포 용 푸시 알림에 대해서만 앱을 활성화하고 XCode로 빌드를 통해 푸시 알림을 받으려는 경우 작동하지 않는다는 것입니다.

I ran into this problem, and by enabling push notification for Development for the App ID, and then using the development provisioning profile I no longer got the error and the correct alert view asked if I wanted to get push notifications.


the solution for 10.8 Xcode 4.4 is to open the appname.entitlements file

and if the DataProtectionClass key has the value NSFileProtectionComplete, delete it!

Deleting this key allows me to test apps from Xcode on devices (it wasn't affecting simulation).


I had the same problem. For me the fix was like this:

  1. Removed and reloaded the provisioning profiles from the organizer.
  2. Selected my named provisioning profile under project settings->code signing. Somehow it wanted to use the blabla.* identity.

The wildcard profile ([prefix].*) won't do when your trying to run a APN enabled application, you need to specify the APN enabled profile.


I just figured this out after a few hours, so in addition to what JulianB said,

  • make sure you have an application icon. You probably have one but i happened to add push when we were between icon versions. I tried allot of different things and in the end that was all it took so it might not even be a cert or signing setting issue.
  • I've also read a corrupt image file could also be the cause
  • i did not add/see an aps-environment key in my entitlements.plist
  • clean all targets before building

For me it worked after changing the bundle identifier to something random. Making sure that the signing error indeed shows up (remove all provision profiles from organizer and device and do a clean build CMD + OPT + SHFT + K then CMS + SHFT + K and then CMD + R) and then changing the bundle identifier back to appropriate one.


My solution was to remove and create again Development Provisioning Profile. It was listed as "Invalid" - not expired and also renew failed (Xcode 4.3.2 and iOS 5.1)


Make sure you have selected correct. Provisioning Profile. I found that I was trying with Team Provisioning profile.(for application identifier: *) Further down in the list, there was correct one for the app.


My problem was this. I created app that had configured push notifications, and in app delegate I was registering for push notifications with:

[[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)];

But before releasing app I had to create new provisioning profile on other developer portal. I created new App Id, new provisioning for development and distribution, downloaded new provisioning, in application target I've set correct provisioning. Also I changed bundle identifier. But I was getting that error.

Problem was that new AppId was not configured for push notifications, but calling

[[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)];

was creating error. When I configured push notifications error did not show again.


I had this problem, the scenario was:

I had setup an app id without push notifications support. I'm using Xcode 5.1 + iOS 7.1

Later, edited the app id to add push notifications in development and production.

Created the APNs certificates for both.

When you test PN using your device attached to Xcode, everything works ok. The problem appears when you release the app to production, you keep getting:

"Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string
 found for application" UserInfo=0x15b200 {NSLocalizedDescription=no valid     
'apsenvironment' entitlement string found for application}" error.

The solution that worked for me was:

  1. Delete provisioning profiles for development and distribution (Xcode and Developer portal).
  2. Delete your app ID (Developer portal).
  3. Create a new App ID with Push Notifications Support for Development and Production.
  4. Create new provisioning profiles using the NEW App ID.
  5. Install them on Xcode.
  6. Test on development and distribution release.

enter image description here

Make the profile right and this work for me.Hope this help.


In my case, the solution for this error turned out to be simple after hours of tinkering with certificates...

In the Capabilities tab of the project configuration, I had to enable the Push Notification flag in order for the environment files to be generated.

macOS Sierra 10.12 - Xcode 8.1

enter image description here


Actually your provisional profile deleted from apple developer site.& you get error for

참고URL : https://stackoverflow.com/questions/5681172/bundle-identifier-and-push-certificate-aps-environment-entitlement-error

반응형