Xcode 10 - "Unknown Name" for team - xcode

In my projects target settings, when I select the provisioning profile I use to archive my application, I get a Unknown Name in the team field.
This is a provisionning profile my client sent me by email, and I do not have access to it's Apple Developer Account.
Does anyone know how I can fix this?
Is there a way for my client to send me a "team provisioning profile" or so?
Note: This does not prevent me to build/archive my project through Xcode. However, when trying to use xcodebuild command for continuous integration purposes, I get an error ( and I'm pretty sure it's linked to this weird configuration )
UPDATE
I finally managed to make my xcodebuild command to work. It had nothing to do with this weird behavious in Xcode config. Also when unzipping my app archive, I can see that the embedded provisionning profile contains the good team name.
To sum up, this "error" doesn't prevent build to proceed. This is just Xcode being Xcode, I guess.

Related

How can I install a Mac provisioning profile in AzureDevops?

We have previously been using the "Install Apple Provisioning Profile" task in our Azure Pipeline build to install a Mac provisioning profile *.provisionprofile. (https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/install-apple-provisioning-profile?view=azure-devops)
However, as of today the build is failing during the Pre-job step with the following error:
##[error]Error: Provisioning profile file should have the extension '.mobileprovision'
Having checked, I don't think that we've changed anything to affect this, so I was wondering if this is an outside change to the step, and if anyone knows of a work-around?
(For mobile development the provisioning profile file would be *.mobileprovision, but the Mac development ones aren't so I don't know if changing the file extension would work?)
I've posted the question here too on the Azure pipelines tasks github (related to the InstallAppleProvisioningProfileV1 task): https://github.com/microsoft/azure-pipelines-tasks/issues/13104
It looks like the issue has been fixed already in their repository, and we need to wait to get the next update.
I'll update the reply if the instructions change at all, but it looks like we may get the fix on the next release.

IOS/Cordova Invalid Signature - A sealed resource is missing or invalid. The file at path

I am trying to publish my app on the app store but I get this error. I have no idea where it is coming from. My certifications and signing are managed automaticaly by XCode. (Select is empty because I erased it on the screenshot)
Invalid Signature - A sealed resource is missing or invalid. The file
at path [AlphaBane.app/AlphaBane] is not properly signed. Make sure
you have signed your application with a distribution certificate, not
an ad hoc certificate or a development certificate. Verify that the
code signing settings in Xcode are correct at the target level (which
override any values at the project level). Additionally, make sure the
bundle you are uploading was built using a Release target in Xcode,
not a Simulator target. If you are certain your code signing settings
are correct, choose "Clean All" in Xcode, delete the "build" directory
in the Finder, and rebuild your release target. For more information,
please consult
https://developer.apple.com/library/ios/documentation/Security/Conceptual/CodeSigningGuide/Introduction/Introduction.html
https://developer.apple.com/library/ios/documentation/Security/Conceptual/CodeSigningGuide/Introduction/Introduction.html
I started a brand new project with Cordova, and I am still facing this error. As Always, Apple error are self-explained (irony). What do I have to do to fix this error ?
Thanks
I'm seeing the same thing in a project (on Xcode 9.2) with multiple targets (different version of a single app framework) - all targets pass except one. One of my apps continued to get this error. Perfect situation to look into why this is happening. I first thought it was the signature profile (development vs distribution certificate). Check that first.
But in my case, I had a few files that were not being used by the code that I had excluded from the build. When I added these resources my build passed. Check to see that all needed resources are included in the File Inspector panel. This includes code and media resources.

Xcode 6 continuous integration can't find provisioning profile

With Xcode 5 i was able to manually copy the profiles to where they needed to be. This is not the case with Xcode 6. I have added the server to the team and still cannot build. I can build fine from Xcode on the same machine. I get the following message:
Code Sign error: No matching provisioning profiles found: No provisioning profiles containing one of the following signing identities was found:
It should work since Xcode works but Apple keeps hiding these settings more and more and I'm left without a way to troubleshoot this.
It turns out I manually needed to copy the profiles to a new directory in /Library/Developer/XcodeServer/ProvisioningProfiles. Now I'm getting an error because "codesign" can't access the new special keychain apple is using for server, I can't access it either. Xcode 6.1 has a fix but I need server 4.0... It seems I can hack it but not sure if that's worth it or I should wait.

Xcode 6: No provisioning profiles found for AdHoc distribution build; after healthkit entitlements added

I updated to Xcode 6's final release last week, and all as gone well. I've been able to build my code, generate adhoc distribution builds (for legacy Testflight), etc.
Today I added some healthkit code, and had to enable HealthKit in the AppId to do the full build. After I did this, Xcode is refusing to Distribute the build I've just archived to create the final .ipa file. I get the error below no matter what now.
What I've done to try to fix this, as various tests:
regenerated my apps Distribution provisioning profile for adhoc release.
deleted all previous Xcode provisioning profiles, reinstalled and reimported all the provisioning profiles. The updated profile is present for sure.
changed the Team in the General settings, and changed it back to the correct one; allowed Xcode to try to "Fix" the issue.
Updated "build settings" to have the correct Distribution provisioning profile for Release, which Archives use. Confirmed code signing is correct for the Team
Tried "Automatic" for provisioning profile and code signing, as an alternate.
close and restart Xcode
None of this has helped generate the .ipa again, which worked before adding Healthkit support and invaliding all this.
How am I supposed to fix this to properly generate my ipa builds again?
EDIT
I was able to get an IPA built by installing an XC generated provisioning profile that appears to match my Distribution Adhoc profile entirely, except that it includes ALL the user devices I have in the portal, including ones that have long since been phased out (ex-employees). The only difference is the desired profile excludes about half the devices. I'd prefer not to have to do this.
I'm facing more or less similar problems since i started using XCode6. Before XC6, i could use my ad-hoc distribution provisioning profile that was linked to a limited number of devices to create an ad-hoc distribution.
Since XC6, I get the same error message as above, while at the same time Xcode generates its own XC Ad-hoc provisioning profile. From that moment on, when you try again,this XC generated profile is always used and you don't get the error anymore. But of course, at that moment it is using a profile that links to all my registered devices, which i do not want.
No matter what i have tried, eg removing all profiles, it keeps on generating and using that XC generated profile that links to all registered devices.
It gets worse: as a workaround, i tried to modify the XC generated profile and simply remove the devices i don't want. After refreshing in XCode and creating an adhoc distribution, I get the same error again stating that no profiles can be found. Again Xcode generates its own XC-adhoc profile, which of course already existed, and again all devices are linked back to that XC-adhoc profile...
FYI: i don't use anything like Healthkit or so, just default features.
Strictly speaking, it is not blocking from creating an adhoc distribution, but also in my case I have registered devices which belong to different customers, which means i prefer to limit the number of devices for a particular adhoc distribution.
Did you enable HealthKit in the apple developer portal in the app id and update your provision profile?
You need to activate that, and update your provision profile.

Provisioning Profiles in Xcode - can't shift this error

Please don't dismiss this as a duplicate without reading fully - I've scoured the net and stackoverflow and found many questions like this, but none of the fixes work and I'm not sure why.
It doesn't help that the xcode configuration is still offline at the dev center, but I should still be able to do this manually.
I'm preparing an app for submission and the code signing of the Archive isn't working.
Provisioning profile 'Company Distribution' specifies the
Application Identifier 'Company.*' which doesn't match the current
setting '2Cxxxxx3D5.Company.App'
So the issue is that it thinks the provisioning profile doesn't have the prefix of my apple developer ID, and when you look at the code signing options under settings you'd be inclined to agree, it says "Company Distribution for Profile Bundles 'Company.*'"
However, in organiser the profile clearly says '2Cxxxxx3D5.Company.*'. The App ID is right in Organiser but for some reason is then wrong in the code signing dropbox.
So far I have
Deleted all the profiles from my machine
Deleted all the profiles from the ios center
Cleaned the build, emptied the build directories
Restarted my mac
Restarted my iPad
Used the javascript hack to insert the Device IDs into a new provisioning profile, with a new appID, re-downloaded it and re-imported it.
I have exactly the same error with exactly the same symptoms again, I just can't work out why the profile is clearly correct in Organiser but then doesn't seem to translate through to the profile screen.
Can anyone throw any insight my way please? :)
Ahh the joys of codesign -- it has tripped up many developers trying to get build configuration setup. This too is a mismatch between a few different settings in Xcode and potentially your App Store Distribution Profile. There are three places that you have to make sure are set identically to ensure this error clears, each of which is tied to the AppID. I answered a similar question relating to a Development Certificate and Provisioning Profile, however the same set of checks is required for your App Store distribution certificates and provisioning profile:
A valid provisioning profile matching the application's identifier could not be found
That question includes some additional information about where particular settings are located, and the process by which one would go through to go from code to device build. A nearly identical process could be used to setup for App Store Distribution -- replace references from "Development Provisioning Profile" to "App Store Distribution" profile as well as omit those test device configurations that aren't applicable to Distribution builds and you should be good to go.
Should you rather try and debug using what you currently have, then read on:
At the core of code sign is the need for your AppIDs to match up in each of the documents issued by the 'Certificates, Identifiers, and Profiles' tool as well as in the build configuration of your Xcode project. There are a few ways in which you can solve the issue, either changing your provisioning profile and signing settings to match the same AppId, or changing the AppID to match your provisioning profiles. It is important to understand the ramifications of this decisions -- Unless you specifically need shared keychain access and specifically do not need any entitled services (In-App Purchase, Push Notifications, iCloud, Game Center, Newsstand, Data Protection, etc.) the option with the least restrictive results is to change your provisioning profile to match your current AppId.
Quickest (but most restrictive) route to a successful codesign build
Your description of the error certainly confirms the root problem -- You have a Distribution Profile named "Company Distribution" set to an AppID from the Certificates, Identifiers, and Profiles tool that is "Company.", however your App Specifies an AppID of "2Cxxxxx3D5.Company.App" which does not match the AppID that code sign is using. Put a different way, your project is configured to set the Bundle ID to "2Cxxxxx3D5.Company.App" while you are attempting to codesign a bundle "Company.". The "2Cxxxxx2D5." part violates the provisioning profile you (or perhaps the Xcode Automatic Profile Selector) has picked for your archive codesign operation.
The "2Cxxxxx3D5." part of your AppID looks suspiciously like an App ID Prefix -- this should not be specified in the Xcode App ID field (or in the Info.plist where that field's value is derived. Xcode automatically handles the App ID Prefix for you based on the Provisioning Provisioning Profile used to do code sign. If your Xcode App ID contains this prefix value remove it so that your App ID becomes "Company.App". In doing so, your Application's App ID becomes a valid App ID given the "Company.*" Distribution Provisioning profile that the error indicates is being used during code sign.
More sustainable fix -- Fix the AppID and Reissue the Distribution Provisioning Profile
As Apple continues to release 'entitlement' based services, it may not be agreeable to issue this app under the wildcard Provisioning Profile. Instead, the best way to retain the widest flexibility is to issue an explicit AppID for your Company's app, reconfigure Xcode, and reissue the Distribution Profile for that new explicit AppID. The linked answer above serves as a step-by-step guide for how to do each of these tasks except the Distribution Provisioning Profile. At a high level, the tasks to complete are:
Update the App ID in the Xcode project to omit the TeamID / App ID Prefix.
Ensure that the edited App ID is registered with Apple's Certificates, Identifiers, and Profiles tool.
Issue a Distribution Provisioning profile for the new bare-bones App ID
Install to Xcode, restart Xcode, then ensure that the Codesign Settings are using the new Provisioning Profile and Signing Identity.
Run the Archive.
Once you get the App ID matched up to the one encoded in the Distribution Provisioning profile you should be in a much better state to run your Archive. If you run into additional questions or problem, tack a comment on to this answer and we can see what we can do.

Resources