Xcode 7.1 "iTunes store operation failed you are not authorized to use this service" - ios

Trying to submit iOS and Apple Watch OS2 extension update from ios 9.0 to 9.1. I recently updated Xcode to version 7.1 and now I'm hitting this problem without changing anything else.
iTunes store operation failed you are not authorized to use this service
What I've tried:
Removed developer account from Xcode -> added developer account back into Xcode -> Still hit the error.
I tried Xcode -> Preferences -> Apple ID -> Download All to get my latest provisioning profiles up to date. Still get the error.
Deleted all old archives, cleaned project, archive again. Still get the error.
Increased build number and version number in both the project and in itunes connect. Still get the error.
Deleted derived data in the Library -> Developer folder and I still get the error.
Cleaned the project -> Archived the project again -> Unchecked "enable bitcode" and I still receive the error.
Code Signing Settings:
Watch Target -> Provisioning profile automatic code signing iOS Developer
Watch Target Extension -> Provisioning profile automatic code signing iOS Developer
iOS Target -> Provisioning profile automatic code signing iOS Developer
Still hit the error message with the provisioning profile settings.
Reinstalled Xcode 7.1 -> Still hit the error message.
I've also confirmed that all my developer and distribution provisioning profiles are valid and downloaded.
Observations:
One thing I've noticed is that when I archive the app and look in the Window -> Organizer I notice my iOS apps on the left side for my archives. This app I'm trying to submit has no name next to it. However, if I delete all old archives for this app the app name shows up again next to the app icon. Maybe a bug with Xcode but I have no clue.
Another thing I've noticed is I've been able to successfully submit iOS archives that have no WatchKit extension using Xcode 7.1. I'm not sure if the WatchKit extension could be the problem but it is a possibility.
Also when the archive is ready to be uploaded to iTunes Connect I notice a couple of things. First, the iOS App defaults to the active provisioning profile: "MyApp" Distribution profile. However, both the WatchKit app and app extensions automatically default to the XC* wildcard provisioning profile. I'm not sure if this whole problem could just be related to a provisioning profile error but it is possible.
iOS Target -> Build Phases -> Embed Watch Content is set as:
$(CONTENTS_FOLDER_PATH)/Watch
Application Loader Submission Attempt:
Tried and failed with the following error message:
ERROR ITMS-90171 "Invalid Bundle Structure - The Binary file 'MyApp.app/Watch/MyAppWatch.app/_WatchKitStub/WK' is not permitted. Your app can't contain stand alone executables or libraries other then the CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide..."
Again, I used this exact same project structure to submit the ios app and watchkit OS2 extension on Xcode 7.0 ios 9.0.x no problem. I think the error message is inaccurate unless I'm misconfiguring something but I imagine I would've hit the error back on Xcode 7.0
Any help on how to solve this would be awesome. I've found no help googling and reading other SO posts and I've been stuck on this for far too long. Thanks!

I met the same issue today and I think it is a bug of Xcode 7.1
Finally I managed to submit my app via Application Loader. There were warnings but it did work.
Here are the basic steps:
Archive
Export
Xcode menu --> Xcode --> Open Developer Tool --> Application Loader
Double click "Deliver Your App" and choose the file exported in step #2
click next and follow the instructions until the end

I found the solution by unchecking the Include bitcode option.

In mi case, it seems that updating to Xcode 7.1 removed some account information. So, after a few attempts to upload it from Xcode, I opened Application Loader, and it asked me to login. I logged in and finally could submit to the App Store from the Organizer. Hope it helps someone.

it is the enable bitcode on the bottom when you submit the upload. uncheck the box. for some reason it comes with 2 boxes checked by default on xcode 7.1

Set team in target-> General-> Team
Check and set appropriate provisioning profile in targets/project build settings.
Try with Xcode to upload build if find same issue.
Or
Try with application loader it will work.

In my case I think it should be a xcode 7.1 bug. I re-added my account, re-generated profile, rebuild the app (restart my mac) but none of them work! I got this error when I first validated the app.
Then I created a new profile and the validation passed. But the first time uploading the app xcode still showed that error. Unwilling to give up I clicked the upload button again and this time it succeeded!

I faced the same issue then I uploaded through Application Loader from XCODE menu and it showed so many error like missing icon for iPad etc .
So please try you app to load through Application Loader and see complete detail of errors you might have in your application.
I got it working through Application Loader after fixing these issues.

I am using Xcode 7.1.1. and it appears to be an issue with Xcode, because I successfully submitted the build via Application Loader. Now, I suspect that I added too many SDKs / adapters inside the code that may have caused issues with the app's delivery. But there's no way of knowing that for sure.
During upload my API Analysis to the App Store was skipped, because it was too large, but I doubt that may caused Xcode to upload the app to the App Store.
If Xcode fails to upload, try Application Loader.

Solved for Xcode 7.2 by revoking and recreating the cert:
Image of what to click here (sorry no embed reputation)
In XCode go into this menu:
XCode -> Preferences -> Accounts
When on the accounts tab, I selected my email in the Apple Id list (on the left).
Then on the right there is a list of of teams under Team Name, select the correct Team and click on View Details.
Finally, there's a list of Signing Identities, next to "iOS Distribution" click Reset.
I didn't have to restart XCode, I just immediately resubmitted to iTunes from Organizer with no problems.
Edit: Thanks #Dover8 for the info about possible effects.
https://developer.apple.com/library/mac/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html
Resetting Certificates Using Xcode
If Xcode detects an issue with a signing identity, it displays an
appropriate action in Accounts preferences. If Xcode displays a Create
button, the signing identity doesn’t exist in Member Center or on your
Mac. If Xcode displays a Reset button, the signing identity is not
usable on your Mac—for example, it is missing the private key. If you
click the Reset button, Xcode revokes and re-creates the corresponding
certificate.

Try to check your iOS Provisioning Profiles on
https://developer.apple.com/account/ios/profile/profileList.action
In my case one of profiles was marked as "Invalid" and after profile regeneration an error no longer appears

I got the same problem.
Tried to Upload To App Store.. 3-4 times.
Then I Hit the Validate... button and validation was success.
After that tried to upload again and it succeeded.
Then i cursed apple...

It seems to be related to the latest iTunesConnect update and "roles".
If I look at the "iTunesConnect Users" screen, we have three accounts,
(1) is "Admin, Legal", (2) is "Technical, Marketer", and (3) is "Technical Only".
Now when you click the email address to check the details and "roles" of #2 then only "Marketer" is checked, and only the marketer permissions are available.
For #3 the correct checkmark ( Technical ) is set, and also "Create Apps and Submit versions" is shown as an available "App feature".
It might be a work-around to change permissions to disable and re-enable "technical", or maybe give more permissions and make the person an Admin (temporary, of course).
Also - for the Jenkins users out there, you might have copied some certificates from the "login" keychain to the "system" keychain. Try removing them from the system-keychain ( I think that was this step which made my "Archive" not end up in 'not authorized ...' message and actually pass the verify again).

Related

Unable to upload app to iTunes Connect - iTunes Store operation failed. Authentication timeout

I'm trying to upload my app to iTunes Connect with Xcode. I chose product > archive, choose my account, it compiles and when I try to upload it hand for a long time on:
Uploading Archive
Sending API usage to iTunes Connect...
Then it shows an error message:
I've restarted Xcode and the entire machine but still it keeps repeating itself.
What's wrong here?
This usually happens to me when the phone is connected while uploading the archive, and removing the phone so far has been solving the issue for me.
My solution was to install Application Loader. At first it seemed like it's stuck as well, but after about 10 minutes it started uploading.
I solved this issue.
There is a checkbox "include bitcode" at the bottom of the Summary screen (when you validate Archive) or Send XXX to Apple screen (when you upload to App Store) where the Organizer show the Binary and Entitlements together with Provisioning Profile. In XCode 7 it is checked by default. I unchecked it and re-run Validation - worked fine. As soon as checked the checkbox back on, it started failing with same error.
I have also unchecked the other checkbox on the same screen - symbolis upload.
Successfully uploaded the binary using the Organizr just now.
Here the solution that helped in Xcode 8, summary screen:
Still getting the same error despite "unchecking" bitcode and also archiving with the bitcode under Basic Profile turned off in the info.plist.
It would only work if I used Application Loader, like this:
First, export the application Archive from Xcode's Organizer window (it saves this into a directory on the Desktop).
Then, from Xcode:
Xcode > Open Developer Tool > Application Loader
My guess is that there is a bug somewhere either with iTunes Connect back end or xCode itself.
A couple of Xcode restart didn't resolve the issue but Application Loader solved it for the very first attempt. Also, Application Loader, is more descriptive for letting one know what's going on during the whole upload process. Plus simultaneous apps upload is possible via Application Loader.
I got this error when trying to upload an app to App Store Connect (01/20/2020). Restarting Xcode fixed the issue for me.
I've had the same issue.
Tried to upload the app with Transporter with no success.
Restarting of Mac and Xcode didn't help.
Solution was to logout from Xcode and log in back
Xcode -> Preferences -> Accounts -> Select your Apple ID and click on "-" below
To submit to App Store use Application Loader but after creating the "App-Specific" password as the following:
Log in to https://appleid.apple.com and enter your 2FA (TWO-FACTOR AUTHENTICATION) code.
Then in the Security section on the bottom right area, you'll see: APP-SPECIFIC PASSWORDS.
Generate Password... Click the link to create an app-specific password, Enter your password.
Copy the app-specific password. Enter the password into the Application Loader.
Choose the exported ipa to submit it.
For developers uploading apps with Xcode: simply change network and restart your Mac.
I solved this issue with Transporter, native Apple application. You can download it from AppStore.
https://apps.apple.com/ua/app/transporter/id1450874784?mt=12
This application has a much more information about uploading process and possible errors.
Install the "Transporter" app from the MacOS app store.
From Xcode's organizer, select your archive and press "Distribute App"
Select "Export" and proceed as usual.
Choose the exported .ipa file into the transporter and press "Deliver".
I was getting the same error. Application Loader didn't work. I couldn't open any Apple Developer/Forum webpages either to find an answer there. And iTunesConnect wouldn't let me log in. I thought the site was down and I couldn't even access the Apple Status pages.
My VPN was connecting outside the US. After turning off the VPN everything returned to normal. I have been letting the VPN connect to random places around the globe, probably should keep it in my area.
In my case, The build with the same number (e.g. Version 1.0(1.6)) was already been uploaded to AppStore. I found that after logging into itunes and checked the TESTFLIGHT BUILDS -> iOS and there I saw 1.6 (Processing)
Note: 1.0 is the version number and 1.6 is build number.

iTunes Store operation failed. You are not authorized to use this service for provider

I am using Xcode 7.2 and I am not able to submit my app due to a strange error: "iTunes Store operation failed". I've reset my certificates, reset my provisioning profiles, cleared out my keychain, and still no success. I've also gone to "Xcode -> Preferences -> Accounts" and deleted my account, and re-added my account. I then went into "View Details" and clicked "Download All". I've done research which all tell me to do the steps above, but I tried all these steps countless of times and I cannot seem to figure this out.
Any ideas?
Go to member center -> Choose iOS Provisioning Profiles (Distribution) -> edit - > add file "keychain access CertificateSigningRequest.certSigningRequest " from your device -->download provisioning profile certificate and add it to keychain access --> Quit Xcode and reopen hope it will work
Did you try unchecking the Include bitcode option before sending your app to Apple? I have been getting the same error quite frequently and what I notice is that it could do something with internet connectivity. When I submit my app from office with high speed connection, there is no problem at all. But from home where I have lot lower speed, I have to uncheck Include bitcode to successfully submit my app.
The only way I was able to upload my project to the app store was to use the Application Loader built into Xcode. I believe that this is a new bug with Xcode 7.2. Here is a detailed walkthrough of using Application Loader:

App installation failed due to application-identifier entitlement

I am unable to install a watchOS 2 WatchKit app due to an application-identifier entitlement. This happened after turning on App Groups in the Capabilities tab.
Full error:
App installation failed
This application's application-identifier entitlement does not match that of the installed application. These values must match for an upgrade to be allowed.
This is running the app in debug mode on a physical device. Running just the iOS app works fine.
I have turned App Groups off again and removed the entitlements files that were added, but same error.
I had this problem with an iPhone app, and fixed it using the following steps.
With your device connected, and Xcode open, select Window->Devices
In the left tab of the window that pops up, select your problem device
In the detail panel on the right, remove the offending app from the "Installed Apps" list.
After I did that, my app rebuilt and launched just fine. Since your app is a watchOS app, I'm not sure that you'll have the same result, but it's worth a try.
I had this problem and was not able to resolve it without deleting and reinstalling the app (messing with provisioning profiles, as some here suggested, did not help).
However, I did not lose my existing test data. Here's how to do that, for anyone having this problem in the future:
Before removing the app, open the Xcode "Devices" window (that's cmd-shift-2).
Select your device and find your app in the "Installed Apps" list.
Click on the gear icon and select "Download Container...". This will copy all of the app's data to your Mac. Save that somewhere for now.
Delete the app and reinstall it from Xcode. Kill the app from Xcode (click the stop button), so it's not running.
Back in the "Devices" window, click the gear icon and select "Replace Container...". Select the data that you downloaded to your Mac in step 3.
Xcode will then restore your previously saved app data.
You now have your old test data back, and the app should run.
Delete any previous versions of App from your iPhone and then Clean->Build and Run again. Your app should run smoothly on your Device.
Also, please make sure you have not selected Distribution Certificate in your Project Settings while trying to run your project directly on your device.
You will get this error when your AppID prefix does not match the prefix of the previously installed app. If your app is already in the App Store, you will not be able to submit updates without restoring the original AppID prefix or contacting Apple.
Apple's instructions for handling this problem: https://developer.apple.com/library/content/technotes/tn2319/_index.html#//apple_ref/doc/uid/DTS40013778-CH1-ERRORMESSAGES-UPGRADE_S_APPLICATION_IDENTIFIER_DOES_NOT_MATCH_THE_INSTALLED_APP
If you did not intend to change the AppID prefix then Xcode is signing your app with the wrong provisioning profile.
If you do intend to change the AppID prefix (because the app was transferred to a new developer, or you are migrating from an old pre-2011 AppID) you must contact Apple to migrate an existing AppID to a new prefix.
You must also add the previous-application-identifiers entitlement to your app, listing all previous AppIDs (with old prefixes). And you must ask Apple to generate a provisioning profile for you that includes the previous-application-identifiers entitlement.
I solved this without deleting the app
With the project open in xcode.
Project -> Build Settings -> Code Signing -> Provisioning Profiles (drop down)
It is probably set to automatic and is choosing the wrong profile. Open the drop down and choose the correct one, then re-run the app.
I faced the same problem and was stuck for several minutes and after a search, the simplest solution that i found is just remove the previously installed app from your device manually and try to run the app from Xcode again.
Hope it helps you.
All the Best...
Steps
With your device connected, and Xcode open, select Window->Devices
Now select the app and download the container using setting icon
Delete the app
Install app again using Xcode
Stop from Xcode
Go to Window->Device and select the app and replace the container that is backup from previous app
This can be caused by App ID prefix, when you switching different developer accounts. See https://developer.apple.com/library/content/technotes/tn2311/_index.html for Apple's support.
Explanation
For me, this issue happened because I have signed in with a different account than the account I have installed the app on the iPhone with.
Solution
Just delete the app from the iPhone and run it again from Xcode.
I tried a few thing myself like updating/making new provisioning profiles, fixing entitlements in Apple Member Center and in project but in my case, I simply had to delete the application and re-run it.
o_O
This application's application-identifier entitlement does not match
that of the installed application.
NOTE: it says "...does not match the installed application"
I guess it happened for me because we added a new app extension and there must have been some target related migration issues? Not sure but anyways
I found that I had accidentally changed the provisioning profile to have a wildcard in it.
Ie., it went from com.companyname.appnickname to com.companyname.*
I made a new provisioning profile with the full name correctly named, downloaded it, set the Target->build settings->provisioning profile to that new profile, restarted xcode, got a bizarre error from xcode (it seemed to confuse my various app developer logins), restarted xcode again, and it worked!
I didn't want to delete the existing app, because I was trying to test what happens when a user upgraded their app to a newer version, so I had installed the app store version and then run my xcode with the newer version (which acts like 'upgrading' the app without removing any user data).
I had the same error and I solved it by changing Bundle Identifier to something new. After that it build project with no problem.
My steps:
Open Xcode
Go to General tab
Find Identity
Change Bundle Identifier to something new.
This happened when I tried installing over top of an adhoc build.
In most of the responses to this issue, there's one critical aspect being overlooked that was brought up by the original asker. The app needs to be installed without deleting the existing install. In my case, the app uses an SQLite database that stores quite a bit of data for the user. Obviously, if you delete the app, then you delete the data. A solution that allowed me to test it in the same way a user will update it was a must.
In my case, the issue was Xcode using a provisioning profile automatically generated by Xcode. This probably happened because I got a new computer and didn't transfer the distribution provisioning profile over. Not to mention, I had not updated the app in almost 2 years. So my original provisioning profile (which contains the Entitlements application-identifier) was long gone. Solution: in Xcode preferences-> Accounts-> Select the appropriate Apple ID-> View Details-> Under Provisioning Profiles, right-click on the Xcode-generated profile for that app (it's prefixed with XC iOS), and select Move to Trash.
On the developer website, create a new distribution profile with your App's ID. Download the new profile, double click and Xcode should automatically install it. Conversely, you could return to the profiles listed in Xcode and tap the Download button next to your newly created profile. Build the app and try running again. By the way, my Xcode is set to automatically manage code signing, which other than this issue works great.
I had the same issue. The bundle.identifier and the name of the project has to be the same. At least that was my issue.
I had the same error until I restored the watch to factory defaults as per https://forums.developer.apple.com/thread/17948
"Apparently if you have and existing WatchOS 1 app and try to update it to WatchOS 2 the bundle identifier changes and causes this error. If you update your watch you will need to do reset it if you had installed WatchOS1 app before updating that app to WatchOS2."
Even though I followed some few logical steps: uninstall app, rebuild project, the only solution that worked for me was: restart XCode. (XCode 8.1)
TLDR - delete the app from the device and run again.
In my case :
1. I compiled and run the app on the iPhone device.
2. I open in the setting the Capabilities and turn on the iCloud
3. Then I try to run the app again, boom, error : "App installation failed
This application's application-identifier entitlement does not match that of the installed application. These values must match for an upgrade to be allowed.
4.Then I deleted to app from the iPhone (after I read the answers here)
5.Everything works O.K
For the people who might be part of more than one team, this can be your problem:
If the app's bundle id is hard coded in your Info.plist then Xcode can get confused and throw this tantrum.
To fix:
Make sure that the bundle id is set as:
$(PRODUCT_BUNDLE_IDENTIFIER)
The accepted answer didn't work for me. To make it work I had to reset the Apple Watch to the last available backup.
Uninstall the main iPhone app, Watch app and build them again solves the problem.
I received this error after I moved from a 5s to a 6s.
I recovered the new 6s from a backup of the old iPhone.
Because of this on the new iPhone the old app was installed.
The old app did not show up in the 6s "Installed Apps" list!
I manually deleted this old app from the 6s and everything was fine.
I encountered this issue because I built to the phone with my code signing turned off from another machine, so you need to uninstall the app from the phone before installing/building to the phone with code signing on.
I faced the same issue today and resolving it by just changing the Display Name and Bundle Identifier from the previous App that also installed on my iPhone.
Steps:
Xcode -> General tab -> Find Identity -> Change Bundle Identifier
So, now I have two same Apps with same functionality but with two different names and identity.
In my case it was because of the certificate.
because my own certificate to sign the app wasn't part of the developper team (new employee), upgrading the app from the App Store to a new version wasn't allow.
So in case it happen to you and you can't manage to obtain a "good" certificate, just clone the git appStore version, open two Xcode projects, compile the old version, update the settings as you wish, the compile the new one and you're done.
a little bit dirty and tricky but I hope it could help someone.
My problem was the App ID in combination with the certificate used to create the provisioning profiles. None of my provisioning profiles were working because none of them were "Elgible" (created with a certificate that matched the App ID). I had moved development to a new machine, so perhaps this was the deeper reason. At any rate I had to create a new certificate, then new provisioning profiles with that certificate being careful to choose the right App ID when creating them. Good luck.
None of the answers above worked for me.
My problem: I had installed an App Version from Testflight, so, I just deleted both, the old app and the Testflight version, and is working again.
Accepting the pending agreements from the developer website and iTunes Connect website and reopening the project in X-Code solved the situation for me.
For me, this occurred after updating to XCode 11,
like the others have said, it is a signing issue.
What fixed it for me was to go to Developer portal > Certificates & Identifiers
Edit the provisioning profile you are using
List of certificates Screenshot
You'll see that there's certificate for XCode 11 (as seen on screenshot)
Just tick that box, re download the profile, and update your projects signing with the new profile.
With MacOS Catalina, your iPhone will be displayed in the 'Locations' sidebar of Finder windows (as long as you've got the Finder preferences set up to show external devices) - you can then access the files via the 'Files' option which is available from the bar near the top of the window, just below the title (in my case I had to click the '>' at the right).

iTunes Store operation failed: Invalid signature

I want to submit a new application to the App Store. The application is build with IBM MobileFirst Platform 6.3 so the application itself is a Cordova application. When trying to validate before submitting it to the store, I get the following error message:
After searching for several hours. I can't find any solution which helps for me. The code signature seems to be OK, at least, I think so.
Does anyone know how to solve this problem? I tried to run the application on an iPad 2 with iOS 7.2 and this works great. When connecting my iPhone 5s with iOS 8.3, I can't run the application as Xcode throws an error, he doesn't recognize my iOS version or something while Xcode is completely updated. The archive creation was successful, but the validation not.
New Signing:
Your provisioning profile doesn't seem right.If there are so many "junk numbers" then we can say something's wrong.So I recommend you to check your steps or make everything from scratch:
Steps to make your app ready for App Store submit:
1-You create an App ID from member center
2-You create a Distribution Certificate
3-You create a Distribution Provisioning Profile with this App ID and Distribution Certificate included
4-Download this Provisioning Profile to your Mac
5-Double Click on this Provisioning Profile
6-in xCode make sure you selected the right team under Target -> General -> Team (This must be the team that includes App ID and Distribution Certificate that you just created)
7-Click xCode -> Preferences (or cmd,)
8-Under Accounts section, choose your team
9-Click "View Details" button
10-Click the "Refresh" button and wait for refreshing to finish
11-If you see the recently-created and downloaded provisioning profile, it is ok to click 'Done' button
12- Now, under Project and Targets, choose the recently-downloaded provisioning profile for "release" and "distribution" (also for the 'Any iOS SDK')
13- Then choose the right code signing identities that are derived from this provisioning profile (for release and distribution and also for 'Any iOS SDK')
14- Now it must be successsful
The problem had nothing to do with the incorrect settings of the project, but with IBM Mobile First Platform. This platform creates an buildtime.sh file which is not signed. Apple won't allow this anymore, so this is why the error message keeps appearing.
For future reference: https://mobilefirstplatform.ibmcloud.com/blog/2015/05/01/recent-changes-in-apples-app-submission-process/

Embedded binary is not signed with the same certificate as the parent app yet they are identical

An app extension is causing a code signing issue. This app is already on the Appstore (with this extension) yet overnight for some reason when I have come back to this app im getting
A strange error as its contradicting itself by showing two exact identical certificates in said error message.
Ive tried
clean and restart, deleting derived data, regenerating provisioning profiles, deleting and creating new profiles. using both xcode 6.1 and xcode beta and This
I have also searched SO Xcode6:Embedded binary is not signed with the same certificate as the parent app and no solutions offered worked
(Deleting the app extension removes the error)
So if anyone comes across this cryptic message the "App Group" switch in Capabilities of the app extension was off for some reason. Turned it back on and all good. Fix any "issues" if it requires you to when you do this
I have tried the following solution is working this morning! Please try it!
The only solution here was that I went to Developer Portal, removed
all profiles, then removed all downloaded profiles through Finder, did
Clean project and Clean Build folder, closed and re-opened Xcode.
Then I opened my project, went to both app and extension targets - at which
point Xcode realized no profiles are present and thus goes to
Developer Portal to get them. Since there’s nothing to download, it
goes through each App ID you have on your account and creates
development profile for each one.
http://aplus.rs/2014/embedded-binary-is-not-signed-with-the-same-certificate-as-the-parent-app/
My problem was that I had a Copy Files post-build step that was causing the issue (somehow).
Once I removed that Copy Files phase, this error went away..
When I had this issue I went to the Apple Member Center and realized that the Provisioning Profile (for the extension) that I had created was marked as 'Invalid'. I just re-created the Provisioning Profile with the same certificate that the app is signed with and then downloaded it via Xcode > Preferences > Account > refresh.
Once I had the new provisioning profiles I selected them in the build settings. I selected the provisioning profile that was just created and also selected the corresponding certificate in the Code signing entity in the build settings and that fixed the issue.
Note that the extension has its own app id and hence its own provisioning profile.
For me it was not having the App Groups set up correctly on all my App IDs on the Developer Portal. Therefor the App Groups in the app didn't work correctly, causing this problem.
What fixed this for me was:
Re-Logging to my accounts in Preferences -> Accounts.
Turning App Groups OFF in both (main app + keyboard extension) Targets (under Target -> Capabilities), then turning them back ON and re-selecting/re-checking the app groups.
I had the same issue. This started on the day when my Certificate got expired after a year. Following steps worked for me:
Delete the old expired certificate from Keychain(You will be able to see a red cross on the certificate icon)
Restarting your mac

Resources