[ios] Code signing is required for product type Unit Test Bundle in SDK iOS 8.0

Getting

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

My app target is code signing just fine - but my test target is not. I bought a new computer, created a new development certificate from the computer, updated the provisioning profile accordingly, installed both, but can't get past this code signing error.

Any way of wiping all certs/profiles locally so I can reinstall?

Probably some kind of bug.

This question is related to ios objective-c xcode

The answer is


I solve the problem by changing the 'Provisioning Profile' in the same section ('Code Signing') from Automatic to 'MyProvisioningProfile name'


Hi I face the same problem today. After reading "Spentak"'s answer i tried to make code signing of my target to set to iOSDeveloper, and still did not work. But after i changing "Provisioning Profile" to "Automatic", the project got built and ran without any code signing errors.


In my case the problem that I faced was:

CodeSign error: code signing is required for product type 'Unit Test Bundle' in SDK 'iOS 8.4'

Fortunatelly, the target did not implemented anything, so a quick solution is remove it.

enter image description here


Also, if you set your build target device, the problem will go away when you testing and debugging. The code signed is only need when you trying to deploy your app to an actually physical device fig

I changed mine from "myIphone" to simulator iPhone 6 Plus, and it solves the problem while I'm developing the app.


If nothing works from above solutions follow these steps

From Targets select appnameTests Under "Info"

Change following

Bundle Identifier: com.ProjectName.$(PRODUCT_NAME:rfc1034identifier)

to com.ProjectName.appname

Bundle name: $(PRODUCT_NAME)

Bundle name: appname

Compile & execute


I fixed it by manually selecting a provisioning profile in the build settings for the test target.

Test target settings -> Build settings -> Code signing -> Code sign identity. Previously, it was set to "Don't code sign".


Sometimes this happens when you download a project from github or other third party tutorial sites.These apps are usually signed with a different identity or company/name.When this happens,if you can't solve the solution,simply create a new xcode project and copy all the header and implementation files into your new project.Also don't forget the dependency files..such as the framework files.This works for me.


The other advice here didn't help me, but I fixed this error by going to Product > Scheme > Edit Scheme. Then I clicked Build on the left hand side and deselected any checkboxes next to AppNameTests. I'm using XCode 6.3

enter image description here


I fixed the issue (temporarily) by going to Edit Scheme, then in the Build section, removing my unit test target from being invoked in "Run".


I was getting this error when running xcodebuild from commandline for integration tests on my work's CI. I managed to get it working by setting the project level setting to codesign. For some reason the target setting was being ignored and it reverted to the project's setting.


Examples related to ios

Adding a UISegmentedControl to UITableView Crop image to specified size and picture location Undefined Symbols error when integrating Apptentive iOS SDK via Cocoapods Keep placeholder text in UITextField on input in IOS Accessing AppDelegate from framework? Autoresize View When SubViews are Added Warp \ bend effect on a UIView? Speech input for visually impaired users without the need to tap the screen make UITableViewCell selectable only while editing Xcode 12, building for iOS Simulator, but linking in object file built for iOS, for architecture arm64

Examples related to objective-c

Adding a UISegmentedControl to UITableView Keep placeholder text in UITextField on input in IOS Accessing AppDelegate from framework? Warp \ bend effect on a UIView? Use NSInteger as array index Detect if the device is iPhone X Linker Command failed with exit code 1 (use -v to see invocation), Xcode 8, Swift 3 ITSAppUsesNonExemptEncryption export compliance while internal testing? How to enable back/left swipe gesture in UINavigationController after setting leftBarButtonItem? Change status bar text color to light in iOS 9 with Objective-C

Examples related to xcode

Undefined Symbols error when integrating Apptentive iOS SDK via Cocoapods Xcode 12, building for iOS Simulator, but linking in object file built for iOS, for architecture arm64 iPhone is not available. Please reconnect the device Make a VStack fill the width of the screen in SwiftUI error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65 The iOS Simulator deployment targets is set to 7.0, but the range of supported deployment target version for this platform is 8.0 to 12.1 Xcode 10.2.1 Command PhaseScriptExecution failed with a nonzero exit code Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools) Xcode 10: A valid provisioning profile for this executable was not found Xcode 10, Command CodeSign failed with a nonzero exit code