Xcode 8 Invalid code signing entitlements - ios

I am creating an application that uses network-extension of iOS. The application is working fine also I am able to export IPA file. But when I try to upload it to testFlight this errors occurs:
I don't know whats going on. I have added network extension to provisioning-profile and appId. My entitlements:

I was bug with Xcode. I recreated the whole project and everything was workign just fine.

Related

Profile doesn't include aps-evironmentProd, Xcode 10.1

I am trying to start my app on a device and faced with this. It doesn't depend on signing method. Push notifications feature enabled for the App ID in Developer account, valid APNS certs added. On the capabilities tab everything is OK.
I know what is aps-environment (this string presents in generated profile), but what does Xcode mean by environmentProd string? I can't find out just anything about "aps-evironmentProd".
The application started without any troubles on previous Xcode versions. For me it seems like regular Xcode bug. How can I handle this without Xcode downgrade?
Entitlements
It seems you have changed/updated APS Environment to APS EnvironmentProd in your .entitlements file.
Check your .entitlements again to be sure. If not just restart Xcode.
Also, I am assuming you already know following:
No need to update development to production in.entitlements`. Because we can't use the production certificate in debug/development.
When we do 'Archive' Xcode automatically set it to production.
I see this is old question but still I wanted to provide an answer as I had same problem.
I did try so many options, recreated provisions, certificates edit manually entitlements and nothing worked.
At the end I created new project with same name as my original app did all setup a nd there was no eny error for entitlements.
I have Uploaded app into appstoreconnect and tested all worked fine.
Then I copied entitlements file and appdelegeate into my original app and no errors after.

iOS app upload to iTunes Connect results in Invalid Signature issue

I'm working on a hybrid mobile app project (Ionic framework) and releasing to Android, iOS and web. This issue concerns only releasing the application on iOS.
I ran into an issue whereby I suddenly started getting the following email from iTunes Connect after building, archiving and uploading my iOS app to App Store from Xcode.
App Store Connect: Your app "YourAppName" (Apple ID: XXXXXXXXXX) has
one or more issues
Dear Developer,
We identified one or more issues with a recent delivery for your app,
"YourAppName". Please correct the following issues, then upload again.
Invalid Signature - A sealed resource is missing or invalid. The file
at path [YourAppName.app/YourAppName] 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
Best regards,
The App Store Team
I tried everything I could find on the internet regarding this issue:
Checking over my certificates, provisioning profiles, recreating them, updating Xcode, building the project again, made sure I'm using a distribution certificate not an ad-hoc certificate, verified the code signing settings in Xcode were correct, verified the bundle was built using the Release target, tried the "Clean All" option, deleted the "build" directory in the finder and rebuilt the release. In short - I tried everything I could find by Apple regarding this issue, also looked up the same issue in StackOverflow and tried a huge variety of the recommended solutions. I tried all of those options multiple times over to make sure I didn't miss anything.
Nothing worked...
Also a note that I was able to upload to App Store without any problems before. There hasn't been any changes to the project which could result in this Invalid Signature issue arising - no certificates have expired, no new ones have been created, no new provisioning profiles have been created. The same profiles and certificates were used which worked just fine some time ago. iTunes Connect just suddenly started responding with this issue.
What else can I try?
I was sceptical at first when I tried this solution but this actually solved my issue.
Find a spare USB stick or an external hard drive.
If your Mac's filesystem is APFS format the external volume using a HPFS Mac OS Extended (Journaled) file system. Move your project over to the freshly formatted HPFS external volume and rebuild it over there. This is important as if you build it on your Mac's APFS volume and then move it over to your HPFS external volume to archive and upload in Xcode this will not work!
The project needs to be built, signed, archived and uploaded ON the HPFS volume.
The uploading to App Store should now work again. It worked for me, hope it works for you as well.
See more information on the solution here

iOS Share Extension not working after deploy

I have created a Share extension which working fine while I am running it though xcode on device or simulator. But when I creating IPA or using TestFlight, it is not passing my list from host app to extension.
I am creating this extension for posting an image in host app ( without uploading on server just in local sqlite ). For this I have checked, App Group and it is fine, cross checked the provisioning certificate and it is also attached with app group.
If you have any idea please let me know.
The entitlement file needs to have the group id information and same should be reflected in build settings.
For me it was just that entitlement file was missing from build settings under code signing entitlements for release.
In debug the app does not require entitlement file.

The executable was signed with invalid entitlements - oh! my, again

I bounced again in this error when trying to install an app neither on my iPhone and iPad. I applied all the suggested measures to no avail. In particular I removed all the profiles for the app from my iPhone, cleaned the derived folder, restarted the iPhone and Xcode, checked the identity between the profile in the project and in the target (I set automatic in the former), tried removing the Entitlement reference and keeping it and even created a new certificate and provisioning profile; all of this for nothing.
Other targets for this project install fine, it works fine on the simulator and submitting it to the app store for TestFlight testing does not create any problem either; so the problem seems just connected to physical debug devices. What else could it be?
Sometimes an "unknown error" pops up instead of the invalid signing one after a very long time since ending compilation.
Found. The issue was due to the Release choice creeped in the scheme build configuration.

Problems with code signing for ad-hoc distrubution for iPad App

I've been trying for a weekend now to install my application via ad-hoc means for beta testing and demo purposes. I can install from Xcode just fine, but when I try and take the app file and place it into iTunes, then try and synch, I keep getting the error "The application was not installed on the iPad because it is not signed".
I have gone through all the steps. We went to the provisioning portal and added all the devices. We then downloaded a distribution provisioning profile and installed that onto the development computer. We created an Entitlements.plist file, though there was no get-task-allow attribute, so I had to add in my own. I cleaned the targets, restarted Xcode, built the application under the ad-hoc profile with the Entitlements.plist set for the Code Signing Entitlements.
I take the app file that's generated and drag it into the Applications area of iTunes, hit synch, and I get the error.
I know I am doing something wrong, missing a step, but it must be a convoluted, obscure step that Apple doesn't have in their documentation. So can anyone see the problem in what I'm doing? If you could, let me know. Thanks.
Ok. Yay. Figured this out after some more hair-pulling.
Apparently, the build you follow is important. I kept testing and building to the Simulator folder, and this is wrong.
To deploy to a device, you should clean all targets and then build specifically to the device. You don't have to run it or have something plugged in, but you must build to device. The APP that is produced is different for simulator as it is for device.
Did you set the "Code Signing Entitlements" build setting in your target to "Entitlements.plist"?

Resources