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

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.

Related

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.

Codesign error with Flutter on iOS

So I have been trying to get into Flutter recently and I am having issues. When I create a new project and do flutter run it works just fine. If I completely close the application and re-run the app I get this error every time.
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
/Users/zachstarnes/Documents/code/test_proj/build/ios/Debug-iphonesimulator/Runner.app: resource fork, Finder information, or similar detritus not allowed
Command /usr/bin/codesign failed with exit code 1
Could not build the application for the simulator.
Error launching application on iPhone X.
I have no idea how to fix this. I tried opening the xcode project file and signing the project to my organization and rerun but that still does not change the outcome. Any ideas of what I need to do to fix this?
So after a long time if finally figured out how to fix it.
The way I was able to fix is to delete the build directory in the root of your flutter project. The folder just gets rebuilt without the files causing the problem.
I assume it has something to do with forking the fonts/images I was adding to the project.
Edit (6/4/2019) You can also use flutter clean and it will also solve the issue. Stated by #Luke Stanyer below!
Run
flutter clean
in your command line.
For sure flutter clean helps, however, in my case, it was all about setting the Deployment Target to 9.0
Remember to also enable (uncomment or add) this line platform :ios, '9.0' at the top of your ios/Podfile file as long as you don't care about iOS versions below 9.0
There can be multiple reasons for this codesign failure.
Go to
Keychain Access -> Apple Worldwide Developer Relations Certificate Authority certificate -> Get Info -> (expand) Trust settings
Then for the combo box for "When using this certificate:" make it System Defaults
I had this problem and this is what worked for me.
First off, let's just state the obvious, XCode was written to be the IDE version of the Tardis or maybe the Luggage from Terry Pratchett's Discworld series. It's bigger on the inside than it is on the outside and every time you open it you'll be shown something different.
Now, the root problem for me was that my Apple Developer sign in for my project needed to be refreshed. This is how I did that:
Open your Flutter project in XCode.
On top of the left panel there are some icons. One of them looks like a folder. If you hover over it, it will say "Show the Project navigator". Click that.
On left panel below those icons select Runner (should be at the top of a list). This will populate the center panel.
In the center panel, along the left-hand side, you should see a column with Project/Runner and Target/Runner. Select the Runner under Target. This will change the contents in the center panel right-hand side.
Across the top you should now see the following options: General, Signing & Capabilities, Resource Tags, Info, Build Settings, Build Phases, and Build Rules. Select Signing & Capabilities.
If you had the same problem as I had, you will now see prompt in the middle panel section asking you to sign in again and there will be a sign in button right there in the middle of the panel. Click it, sign in with your Apple Developer password.
Now build your project again. You may be prompted by macos to login to grant keychain permissions during the build.
Hopefully this will help some other people.
I have the exact same issue. I've tried multiple IDEs, messing with certificates in Xcode, even reinstalling my operating system (since other people that I work with in the same repository have no issues of this kind).
flutter clean
works for me, but only as a temporary fix.
For those who failed and scrolled till this answer, try to download and install the latest certificate from this link: https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer
Before installing this updated certificate delete below certificate from keychain
Apple Worldwide Developer Relations Certification Authority

How to prevent Xcode 8 from saving "development team" in .pbxproj?

Xcode 8 demands you select a "development team" before you can sign your apps for both iOS and macOS. It wasn't very difficult to figure how to make the selection. (Answer can be found in Add developer team in Xcode 8? in case anyone can't figure it out themselves.)
The problem is that Xcode saves the selection in the .pbxproj file. Since in my case, and I expect many others, this is under SCM, and the project is used by many unrelated people & teams, this is a huge problem. For example 'git status' shows the work area is not clean as soon as the team has been selected.
Is there a way to either
get Xcode 8 to save the selection in user rather than project data, or
specify a default "development team" for all Xcode projects?
You can abuse Xcode’s Custom Paths mechanism to store your development team identifier outside of the project.pbxproj file by setting a DEVELOPMENT_TEAM custom path (replace ABCDEFGHIJ with your team identifier):
(Xcode menu → Preferences… → Locations → Custom Paths)
The custom paths are stored in Xcode’s preferences (IDEApplicationwideBuildSettings and IDESourceTreeDisplayNames).
But there’s a catch! Unfortunately, as soon as you change anything in the project (update a build setting, add a new build phase, rename a target etc.) the development team will be automatically added to the project.pbxproj file (in the TargetAttributes of the project object). This requires constant care not to commit those changes.
If this practice of setting your DEVELOPMENT_TEAM as a custom path gains traction, open source project owners will be able to not specify any Development Team nor Provisioning Profile, set the Code Signing Identity for Any iOS SDK to iOS Developer ("CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";) and open source demo apps will build and run on any device just like it did with Xcode 7. 😃
I upgraded my project from Xcode 7.3.1 to Xcode 8, and never set a Development Team or non-deprecated Provisioning Profile, and things still work fine.

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

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.

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