Code Signing Error: Verify the value of the CODE_SIGN_ENTITLEMENTS build setting - swift

I am using swift 4 with Xcode 9. My app run perfectly on the emulator. When I try to Archive for build .ipa file then only get this error. Is there any other way to share the app with a client?
Code Signing Error: The file "/Users/imran-mac/Desktop/Orlando Dev/njm-app-fiverr/NJM iOS/NJM/NO" could not be opened.
Verify the value of the CODE_SIGN_ENTITLEMENTS build setting for target "NJM" and build configuration "Release" is correct and that the file exists on disk.
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.2'

Related

No Provisioning Profile when flutter run --use-application-binary

To check built my ipa(iOS) binary using flutter build ipa in CLI.
flutter build ipa and then flutter run --use-application-binary
Below are the result outputs.
$ flutter run --use-application-binary=build/ios/ipa/xxx.ipa
Launching lib/main.dart on Jisang-iPhone in debug mode...
════════════════════════════════════════════════════════════════════════════════
No Provisioning Profile was found for your project's Bundle Identifier or your
device. You can create a new Provisioning Profile for your project in Xcode for
your team by:
1- Open the Flutter project's Xcode target with
open ios/Runner.xcworkspace
2- Select the 'Runner' project in the navigator then the 'Runner' target
in the project settings
3- Make sure a 'Development Team' is selected under Signing & Capabilities > Team.
You may need to:
- Log in with your Apple ID in Xcode first
- Ensure you have a valid unique Bundle ID
- Register your device with your Apple Developer Account
- Let Xcode automatically provision a profile for your app
4- Build or run your project again
It's also possible that a previously installed app with the same Bundle
Identifier was signed with a different certificate.
For more information, please visit:
https://flutter.dev/docs/get-started/install/macos#deploy-to-ios-devices
Or run on an iOS simulator without code signing
════════════════════════════════════════════════════════════════════════════════
Could not run /var/folders/b1/r6ygmnb533xb5qlcjvpwhpz00000gn/T/flutter_tools.3nBcWf/flutter_app.EW5AEN/Payload/Runner.app on 55b673a0051bff5da6647855674d358aa0f62f8b.
Try launching Xcode and selecting "Product > Run" to fix the problem:
open ios/Runner.xcworkspace
Installing and launching... 20.8s
Error launching application on xxx-iPhone.
Is there any option build binary to use application bianry in flutter ?
flutter run --use-application-binary

Swift 5 test build fails with missing Provisioning Profile error

I am trying to build my iOS app from the command line using this command :
$ CODE_SIGNING_ALLOWED=NO xcodebuild -target 'MyApp' -sdk iphoneos -configuration Release
But it fails with the following error :
note: Using new build system
note: Planning build
note: Constructing build description
error: "MyApp" requires a provisioning profile. Select a provisioning profile in the Signing & Capabilities editor. (in target 'MyApp' from project 'MyProject')
Im not interested in signing my app at all. I just want to be able to build from the command line.
Is anyone aware what I am doing wrong?
BTW, I have NOT downloaded any provisioning profile from Apple but Xcode is able to build and run the app. Why is that?

Code sign Error on xcode 4.3.2 and ios 5.1

I create a demo application on my mac pc with the xcode 5.1.When i try to create a release build i am getting this error
codeSign error :code signing required for product type 'Application' in SDK 'IOS 5.1'.
I already create the required certificates for the system.
Please help me out.
try this: Select right code sign that match your bundle id.

Stuck with "Command /usr/bin/codesign failed with exit code 1 " Error

I am getting the following error in all my the projects after I installed xcode 4.2 in parallel with xcode 3.2.5 I get the error when I create an adhoc bundle for the Tester.
How can I resolve this?
I have gone through following blogs but can't find any solution.
Command /usr/bin/codesign failed with exit code 1
http://www.iphonedevsdk.com/forum/iphone-sdk-development/9370-codesign-failed-exit-code-1-a.html
http://blog.emmerinc.be/index.php/2009/03/26/codesign-failed-with-exit-code-1/
/usr/bin/codesign failed with exit code 1
I have seen this error when I manually built and signed an iOS application bundle using a Makefile. In that case my Info.plist was missing the CFBundleResourceSpecification key (should probably have the value ResourceRules.plist). I did some more testing now and it also happens if the key CFBundleExecutable is missing.
CFBundleResourceSpecification should be added in some build phase by Xcode but maybe it's a good idea to check the resulting Info.plist in the build directory if it's really there.
Maybe this blog post could help, it's about codesign finding the wrong Info.plist file (one without CFBundleResourceSpecification)
http://infinite-sushi.com/2010/08/the-case-of-the-missing-cfbundleresourcespecification/

Cannot build XCode project from command line but can from XCode

I've created in XCode a simple navigation-based iPhone app. The app builds and runs properly from under XCode but I cannot get it to build from command line.
From terminal I execute:
xcodebuild -project George.xcodeproj -alltargets -parallelizeTargets -configuration Debug build
but I get that error:
=== BUILD NATIVE TARGET George OF PROJECT George WITH CONFIGURATION Debug ===
Check dependencies
[BEROR]Code Sign error: The identity 'iPhone Developer' doesn't match any valid certificate/private key pair in the default keychain
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
Is there something wrong with the way I try to handle it?
In addition to unlocking the keychain, you might also specify the codesign identity (or set it in your target). Development certs take the form 'iPhone Developer: Company Inc', distribution certs like this 'iPhone Distribution: Company Inc'.
xcodebuild -project George.xcodeproj -alltargets -parallelizeTargets -configuration Debug build CODE_SIGN_IDENTITY='iPhone Developer: Company Inc'
You can build from the command-line a build targeted at the simulator without signing issues.
This solved the signing issue for me:
xcodebuild -sdk iphonesimulator
Source:
xcodebuild Code Sign error: No matching codesigning identity found:
That's particularly useful if the command line build is there only to sanity check the source code in a continuous integration setup.
Most probably your keychain is locked. Try unlocking it before executing the script, you can do it from command line (right before building):
security unlock -p YourPasswordToKeychain ~/Library/Keychains/login.keychain
Note, I'm using "login" keychain which could be different in your case
Also, if that doesn't help, try removing all other parameters and just leave smth like this:
xcodebuild -configuration Debug and clean beforehand xcodebuild -configuration Debug clean
I'm using shenzhen, it shows this error too.
Turns out, it happens when I plug in my iPad but it is not in the provision profile. By passing --verbose to shenzhen. it shows:
Check dependencies
Code Sign error: No matching provisioning profiles found: None of the valid provisioning profiles include the devices:
XXXX’s iPad
CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 8.3'
unplug the device, everything works just fine...
Depending on the purpose of your script, it may also be sufficient to just turn off code signing in the script, which you can do by setting CODE_SIGN_IDENTITY=''
xcodebuild -project George.xcodeproj -alltargets -parallelizeTargets -configuration Debug build CODE_SIGN_IDENTITY=''
Obviously that's no good if you are trying to do a final build from a script, but it may be fine if you're just trying to do a test build for continuous integration (eg from Jenkins, to make sure that nobody has broken anything).
I had an archiving error similar but not quite the same as the original post:
** ARCHIVE FAILED **
The following build commands failed:
Check dependencies
(1 failure)
This turned out to be a missing Application Service (in my case, the HealthKit service/entitlement), which I had enabled in my development App ID but not my production App ID.
You enable services in the Apple Member Center: https://developer.apple.com/account/ios/identifiers/bundle/bundleList.action
This can be fixed in XCode 8.0 by changing from "iOS Distribution" to "iOS Development" in XCode. It doesn't seem like it should work, but it does for some reason.