iOS code signing is required for product type 'Unit Test Bundle' in SDK 'iOS 9.2' - ios

I want to test my application in iPhone 5s. and it have latest ios version. so, I have deleted old Xcode V 7.0.1 and install a new version v 7.2.
After installing v 7.2 I am getting below error.
CodeSign error: code signing is required for product type 'Unit Test
Bundle' in SDK 'iOS 9.2'
I have check this question code-signing-is-required-for-product-type-unit-test-bundle-in-sdk-ios-8-0 and try all the answers but still I am getting this problem.
I have proper set build target in general as well as info tab. even I am not getting code signin error to fix the issue. but still not able to run application in my testing device.
Code signing also set correctly.
Also deleted Test Project from my Application.

I found solution for that work for me. in the left panel, go under projectNameTests then in signing choose any development team that has license in ios.

Actually for every iOS app there will be two targets 1.app target 2.test target.
Code signing is required for both targets.In our case,code signing is not set for test target , so click 'app_name'tests under TARGETS section and provide same code siging details as given for app target

Change the target on left top to appNameTests and set signing section accordingly. Now signing error should go.

You can simply go to Edit Scheme, then in the Build section, removing any unit test target from being invoked in "Run" and then try again.

For me it was the build device. I had selected my iPhone, when in fact it should have been any simulator. As soon as I changed it to a simulator, the tests ran fine.

Related

Code signing is required for product type 'Application' in SDK 'iOS 14.3'

I am trying to build an old iOS application in xcode 12.3 (macOS Catalina 10.15.6). The app was written by another person many years ago. So previously it was signed by another AppleID certificate.
Now I have already managed to build the app in xcode 12.3 and I can successfully run it on a virtual device (iPhone 11 pro). However when I try to run the app on the real iPad (iOS version 14.2) connected via usb I am getting this error: "Code signing is required for product type 'Application' in SDK 'iOS 14.3'".
I have already searched in SO and found few threads from many years ago which are not really helpful for me.
What have I tried so far?
Enabled two-step authentication for my AppleID and added my AppleID to xcode.
In project -> Signing and Capabilities section I enabled Automatic Signing and selected my Team (which is shown as 'FirstName LastName (Personal Team)'). Everything looks OK now in Signing and Capabilities section, no errors.
I have also tried to create a test app and I was able to run it on the same iPad connected to my comp. I used the same my AppleID that I am using with my real project.
Before the error there is also warning: ""MyProject" isn't code signed but requires entitlements. It is not possible to add entitlements to a binary without signing it."
Somehow I managed to run my app on external device (iPad) finally. I don't really understand how I did it but at some point it just compiled without errors and then started.
I was just trying out every suggestion one after another from this thread: Code signing is required for product type 'Application' in SDK 'iOS 10.0' - StickerPackExtension requires a development team error. I set up Automatic Signing with my AppleID, selected my Team, changed BundleID, changed Deployment Target version to 14.2 (the same as in my iPad), etc. I also tried to Clean the project and restart xcode after every change - nothing worked for me. But suddenly it started working after I changed Code Sign Identity under Build Settings for both targets (main app and tests). I just changed Code Sign Identity back and forth and it start working. Finally I set Code Sign Identity to "Apple Development" (as it was suggested in the error message in Signing tab).
It is funny but the answer that I was trying out at that time suggested totally different thing. But that answer was from few years back and there was no such settings in my interface. So I tried to set it in another way. And that is how it worked out for me. BTW, this is that answer: https://stackoverflow.com/a/47664721/4428219.
Maybe later I will make more detailed research what exactly was the setting that made it work for me. But for now I just committed my working configuration and want to write it down here while I remember the sequence of events.

An empty identity is not valid when signing a binary for the product type 'Application' in xcode version 10.2

I have compile webrtc ios source code ,then I used the command:
gn gen out/ios --args='target_os="ios" target_cpu="arm64"' --ide=xcode
then I open the workspace with Xcode.
but when I compile the code, Xcode gives me this error below.
An empty identity is not valid when signing a binary for the product type 'Application'. (in target 'AppRTCMobile')
my Xcode version is 10.2, the latest version.
I really don't know how did this happen,can anyone can help me?
my code sign setting is:
everything looks ok.
I added CODE_SIGNING_ALLOWED=NO as an additional parameter and that fixed this issue for me.
I needed to to turn OFF Automatic manage signing and turn it ON afterwards. It seems like Xcode did fix some inconsistency by that action.
I saw this error in Xcode 12.2b when building to run on a device, but I had not set signing to Automatic, or selected profiles, etc.
Basically I was running and testing on the simulator, then plugged in a device for testing and forgot to change any signing settings.
Perhaps this error is new to Xcode 12.x for that scenario.
If you're using CocoaPods check your project.pbxproj for (null) references, there's an issue that make BuildFile references to become (null)
Even if you have the identity correctly defined it may be "empty" because of this issue
Try, as suggested:
pod deintegrate
pod install
This error can occur when an Xcode project is generated (rather than built from within xcode), and the generated output project is unexpectedly in release mode.
I was working on a Godot project and got the above error which led me to this post. The error is not WebRTC or Godot specific.
If you only want to debug the project for now on a device, and don't need release builds yet, switch to a debug scheme using the scheme switcher (1)
If the generator didn't create a debug scheme, (which is the case for me for my issue) you can add one via New Scheme (2)
At first I could not work out why it was complaining about "empty identity" (this refers to the Team drop down) when as per the screen shot I had this value set. I had the project view filter settings on Debug (as per the screenshot (3) so the Release settings (where Team was set to "None") were not showing up. Change this to All to see if that is where the None in the error is coming from for you.
Debug builds only require a basic signing setup. If you still have issues with Release builds when it comes time for that, you may need to clear out certificates & provisioning profiles from your Derived Data, Apple Developer portal and Keychain.
Release build certificates are hard to manage & replace so be careful with randomly generating & deleting them.
The problem has been fixed, it's my mistake.
Select the target, then choose info.plist and select the one for your project.

React Native ios app build failed with "select a development team error"

I have initialized an app with react-native init something.
When I try to build it with Xcode it's throwing me this error.
Showing Recent Messages
:-1: Signing for "organiseTests" requires a development team. Select a development team in the project editor. (in target 'organiseTests')
But I have added the developer account in the Signing section.I'm using Xcode 10.1 and my physical device is iPhone 6
You also need to set the team in the test target as well as mentioned in the error message.
Even though its not required to set the team in other targets if you are not compiling them but Xcode sometimes gives error.
You can show the Targets in the following way:
Open XCode
Click at the very Top Element in the Explorer
If Project-Tab is not shown, click the Icon to make "Project-Column" visible.
There you see all your targets. Remove unneeded Targets, or check if Team is choosed for each Target.
You can try selecting the team as none. The provisioning profile should show none required.

Code signing is required for product type 'Application' in SDK 'iOS 10.2'

i am completely new to Mac OS and develop for iOS.
I created a TEST Unity3d Project using this tutorial:
https://unity3d.com/de/learn/tutorials/topics/mobile-touch/building-your-unity-game-ios-device-testing
Now i try to build the app in Xcode 8.2.1, but i just get an error:
["Unity-iPhone" isn't code signed but requires entitlements. It is not possible to add entitlements to a binary without signing it.
Code signing is required for product type 'Application' in SDK 'iOS 10.2' - screenshot 1]
I found many informations about this in the internet. But nothing worked for me.
The most informations in internet are for older xcode versions and i think apple changed many about code signing in xcode 8..
In Xcode Preferences, i use a default free AppleID with a default team.
[screenshot 2]
Trying to disable code signing did not work:
[screenshot 3]
Completely disable code signing also does not work:
[screenshot 4]
I use Mac OS El Capitan.
iPhone 7 v10.2.1
Can anyone help me out?
All screenshots
Try this: In Xcode, click on the project at the top of the left column, then choose the target you're trying to build. Select the general tab, and check "Automatically manage signing." You should also be able to run it in the simulator without even doing the above.
Thank you for your great reply.
I had problems to find the "general" tab.
Then i found a great screenshot in another post to find the general tab.
With this screenhot and your great answer i got it working!
Thanks!
In my case, it was due to automatically signing certificate, i have unchecked that and i have enter the certificate manually

Code signing is required for product type 'Unit Test Bundle' in SDK 'iOS 8.0'

I'm trying to build an app on device (iOS 7.1.2) using Xcode 6, however, it's always failed with error:
CodeSign error: code signing is required for product type 'Unit Test Bundle' in SDK 'iOS 8.0'
The project's deployment target is 6.0.
Anyone be in stuck with this type of error?
Any suggests are appreciated!
You need to set code signing for testing target separately even though you probably did set code signing on the main target.
This is what I did:
1. Select your test target
2. Set "Code Signing"->"Code Signing Identity" to your developer identity
3. Build
Hope this solves it for you.
The following solution works for me which is mentioned by Z S in this link:
Going to Edit Scheme, then in the Build section, removing my unit test target from being invoked in "Run".
I understand this issue.And also I resolved it
Please follow the below steps:
1.Go to Project setting.In left panel see there is Targets.
2.Clicked on (your Project name)Tests.
3.Go to Info. There assign the proper Bundle identifier.
4.Go to build setting->Code Signing
5.Here set the Code Signing Identity and Provision Profile.
6.Clean the Build.
Now build your project .Its fine now
The tests should run on a simulator. The first thing to do is to check that your target device is one of the simulators and not a hardware device.
I understand hugoX has solved the problem but failed to explain it how he solved it.
These instructions are for xcode 6.1:
Goto your project settings
In the left pane, select your test target
Press the delete key.
Even though this makes the project build successfully, you cannot use unit tests. If somebody has other solutions, that would be great.

Resources