Jenkins issue with Xcode 6 application: 'Code Sign error: No code signing identities found' - objective-c

I'm getting a Jenkins error when building an Xcode project. I know many have had this issue - and I've read and tried hours worth of tips to no avail.
This is the Execute Shell command I'm telling Jenkins to run:
export DEVELOPER_DIR='/Applications/Xcode 6.app/Contents/Developer/'
cd TM
xcrun xcodebuild clean build
Here is the error message in my Jenkins output:
=== CLEAN TARGET TM OF PROJECT TM WITH THE DEFAULT CONFIGURATION (Release) ===
Check dependencies
[BEROR]Code Sign error: No code signing identities found: No valid signing identities (i.e. certificate and private key pair) matching the team ID “(null)” were found.
[BEROR]CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 8.0'
Create product structure
/bin/mkdir -p /Users/Shared/Jenkins/Home/jobs/TM/workspace/TM/build/Release-iphoneos/TM.app
Clean.Remove clean build/Release-iphoneos/TM.app
builtin-rm -rf /Users/Shared/Jenkins/Home/jobs/TM/workspace/TM/build/Release-iphoneos/TM.app
Clean.Remove clean build/Release-iphoneos/TM.app.dSYM
builtin-rm -rf /Users/Shared/Jenkins/Home/jobs/TM/workspace/TM/build/Release-iphoneos/TM.app.dSYM
Clean.Remove clean build/TM.build/Release-iphoneos/TM.build
builtin-rm -rf /Users/Shared/Jenkins/Home/jobs/TM/workspace/TM/build/TM.build/Release-iphoneos/TM.build
** CLEAN SUCCEEDED **
=== BUILD TARGET TM OF PROJECT TM WITH THE DEFAULT CONFIGURATION (Release) ===
Check dependencies
Code Sign error: No code signing identities found: No valid signing identities (i.e. certificate and private key pair) matching the team ID “(null)” were found.
CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 8.0'
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
Build step 'Execute shell' marked build as failure
Tips I've tried with no success:
I've set my Code Signing in my Build Settings (current, Release = Don't Code Sign; Release > Any iOS SDK = iPhone Developer).
I've indicated in the Xcode plugin Configuration where my login.keychain file is.
I've uploaded my .developerprofile to Jenkins and indicated it should be imported before each build.
And more.
Not sure what else I can do. It seems significant that it says team ID “(null)” - but I can't find any answers on why that is.
I am running Xcode 6 with a target of iOS 8.0.

I wish this could be a help.
An example script.
http://blog.octo.com/wp-content/uploads/2010/11/build.txt

Just fixed this issue with Jenkins and Xcode 6.4.
Make sure that you have at least one Developer Certificate in your login keychain. Right-click on the certificate and click "Get Info" to show permissions.
Expand the "Trust" list and for the field "When using this certificate", select "Always trust".
Close the window. There should now be a blue "+" sign on the Dev certificate.
Happy Jenkins!

Related

library not found for -lReact

I'm getting this error in all my app builds now and I can't seem to figure it out.
I am using the .xcworkspace file
I had to rename the app. Used: react-native-app-id ...
This morning I was able to build/run on emulator. I tried to setup xcode to run on an actual device and now the universe hates me.
I can't even react-native start and react-native run-ios without getting these errors:
ld: warning: directory not found for option '-L/Users/gmike/Projects/promiscue/tribeoffive/TribeOfFive/ios/build/Build/Products/Debug-iphonesimulator/React'
ld: library not found for -lReact
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
The following build commands failed:
Ld build/Build/Products/Debug-iphonesimulator/tribe-of-five.app/tribe-of-five normal x86_64
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/tribe-of-five.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
Failed to install the requested application
The bundle identifier of the application could not be determined.
Ensure that the application's Info.plist contains a value for CFBundleIdentifier.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/tribe-of-five.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
I've checked out a bunch of other stackoverflow articles.
I think this is telling:
Thoughts on how to un-mess up my env?
The error goes away when you remove libReact.a from the Xcode file tree (for me, it was under the Frameworks folder).
I also removed other files (they all had a transparent/white overlay on them which probably mean they were missing, actually couldn't open them in the finder neither)
Ok let's resolve this:
What to look for:
Here's a list of all the sub projects (or their products) that will cause XCode to throw that error when building a react-native project w/ cocoapods:
[
RCTActionSheet,
ART,
RCTBlob,
RCTCameraRoll,
RCTGeolocation,
RCTImage,
RCTLinking,
RCTAnimation,
RCTNetwork,
RCTPushNotification,
RCTTest,
RCTSettings,
RCTText,
RCTVibration,
RCTWebSocket,
]
Where to look for those weird project names:
First of all you'll look in the actual error message.
Here's a typical library not found error
Notice the ... /libART.a part?
That fellow is causing that error on my end.
In your case it can be any of the strings in the array above.
Found the troublemaker, what to do now?
Step 1: Remove the troublemaker project.
Let's try the lucky shot first:
Open the Project Navigator, and check if you can see the linked project that corresponds to the troublemaker string. In my case it was an XCode project called ART.
If you find it there, just remove it's reference, and you should be fine.
If that didn't work:
Open {Project Target} > Build Phases > Link binary with libraries and check wether you can see the troublemaker string in there. (It could be something like libArt.a depending on what's causing the issue on your end)
If that worked, forget the next step, otherwise move on:
Step 2: Delete the derived data directory, clean and rebuild
In my case (as seen in the raw error above) the derived data directory was /Users/sudoplz/Library/Developer/Xcode/DerivedData/MySuperApp-haxjchilyksewvdfcnnxwrulvyvy/Build/Products/Debug-iphonesimulator/
find yours in the error log, and delete it.
You can then clean XCode, shut it down, launch it again, and re-build.
Hopefully that should either fix the issue, or help you move on with fixing other stuff that may have gone wrong.
That's all folks.
Try to add that file to the libraries by finding libReact.a from the project, then clean and run Xcode.
or
Try to add libReact.a to your project "Build Phases" > Link binary with libraries, then clean and run Xcode.

React-native firebase Error: The bundle identifier of the application could not be determined

I'm trying to install https://rnfirebase.io/. when I init a new react-native file, it runs fine in ios.
The problem starts when I install RN Firebase, according to these docs:
https://rnfirebase.io/docs/v4.2.x/installation/ios
I get the following error (and when I try to run in xcode, I get the error in the screenshot below):
Installing build/Build/Products/Debug-iphonesimulator/test2.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
Failed to install the requested application
The bundle identifier of the application could not be determined.
Ensure that the application's Info.plist contains a value for CFBundleIdentifier.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/test2.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
I've tried all the suggestions for similar problems and I can't seem to figure it out. Any help would be much appreciated.
Thank You.
1.In docs it is recommended to put your Googleservice-info.plist file under ios/[YOUR APP NAME]/GoogleService-Info.plist. But it worked for me when i put it under ios/GoogleService-Info.plist.
2.Make sure that BUNDLE ID key in GoogleService-Info.plist file has your project's bundle id.
1st of all, after running pod install, use yourapp.xcworkspace, not yourapp.xcodeproject top open your project.
Once you open your project, add a Bundle identifier. Use that bundle identifier to create a firebase app as per the official tutorial.

React-Native - Could not connect to development server (iOS simulator)

Error:
Could not connect to develpment server.
Ensure the following:
- Node server is running and available on the same network - run 'npm start' from react-native root
- Node server URL is correctly set in AppDelegate
URL: http://127.0.0.1:8081/index.ios.bundle?platform=ios&dev=true
I definitely am running npm start. Why isn't this running?
Now I am seeing this Error:
In file included from /Users/*******/f8app/node_modules/react-native-fbsdk/ios/RCTFBSDK/core/RCTFBSDKAccessToken.m:19:
/Users/*********/f8app/node_modules/react-native-fbsdk/ios/RCTFBSDK/core/RCTFBSDKAccessToken.h:21:9: fatal error:
'FBSDKCoreKit/FBSDKCoreKit.h' file not found
#import <FBSDKCoreKit/FBSDKCoreKit.h>
Does the project build succeed in Xcode?
Did you double-check these steps mentioned by facebook:
Make sure that the Facebook SDK frameworks are installed in
~/Documents/FacebookSDK.
Make sure that FBSDK[Core, Login, Share]Kit.framework show up in the
Link Binary with Libraries section of your build target's Build
Phases.
Make sure that ~/Documents/FacebookSDK is in the Framework Search
Path of your build target's Build Settings.
(https://github.com/facebook/react-native-fbsdk)
I myself had some troubles with the final step, but after retrying in a fresh project all worked fine
Example image from web showing the correct search path
If the project build doesn't succeed, you may want to try this.
You should first update your existing FBSDK (if any)
https://medium.com/#alberto.schiabel/react-native-on-xcode-beta-8-0-how-to-fix-initial-build-error-f0225c649850#.439zl5504

WatchkitUpload Issues

We have discovered one or more issues with your recent delivery for "xxx Mobile". To process your delivery, the following issues must be corrected:
Invalid WatchKit Support - The WatchKitSupport2 folder is missing. Rebuild your app using the current public (GM) version of Xcode and resubmit it.
Invalid Executable - The executable '***.app/Watch/watchkitapp.app/PlugIns/watchkitapp Extension.appex/watchkitapp Extension' does not contain bitcode.
Once these issues have been corrected, you can then redeliver the corrected binary.
For second issue you need to enable bitcode for your app target as its required for watch apps.
Select your iOS app target- > Build Settings - > Build Options - > Enable Bitcode
Set it to true.
Refer this for App Thinning

Codesigning included framework

OK, after lots of desperate attempts to make Connection Kit work, I've finally made it to create a project get to compile - yay!. Oh, wait, I didn't say it actually runs. It just compiled without any error - yay, again.
But now I guess I have to deal with linking issues.
CodeSign /Users/drkameleon/Library/Developer/Xcode/DerivedData/ftpTest5-fnzabvxlmdwqwpbcsglidslbijzn/Build/Products/Debug/ftpTest5.app/Contents/Frameworks/ConnectionKit.framework/Versions/A
cd "/Users/drkameleon/Code/##Tests/ftpTest5"
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
Signing Identity: "-"
/usr/bin/codesign --force --sign - --preserve-metadata=identifier,entitlements,resource-rules /Users/drkameleon/Library/Developer/Xcode/DerivedData/ftpTest5-fnzabvxlmdwqwpbcsglidslbijzn/Build/Products/Debug/ftpTest5.app/Contents/Frameworks/ConnectionKit.framework/Versions/A
Warning: usage of --preserve-metadata with option "resource-rules" (deprecated in Mac OS X >= 10.10)!
/Users/drkameleon/Library/Developer/Xcode/DerivedData/ftpTest5-fnzabvxlmdwqwpbcsglidslbijzn/Build/Products/Debug/ftpTest5.app/Contents/Frameworks/ConnectionKit.framework/Versions/A: code object is not signed at all
In subcomponent: /Users/drkameleon/Library/Developer/Xcode/DerivedData/ftpTest5-fnzabvxlmdwqwpbcsglidslbijzn/Build/Products/Debug/ftpTest5.app/Contents/Frameworks/ConnectionKit.framework/Versions/A/Frameworks/CURLHandle.framework
Command /usr/bin/codesign failed with exit code 1
Any idea what this means guys? What am I supposed to do?
The accepted answer here (Codesign of Dropbox API fails in Xcode 4.6.3: "code object is not signed at all") basically suggests using the --deep signing flag. But neither this seems to be supported in Xcode6+, nor does it work for me (the exact same errors are being produced).