codesigndoc icon indicating copy to clipboard operation
codesigndoc copied to clipboard

Fails for macOS applications

Open allenhumphreys opened this issue 6 years ago • 7 comments

Please include the full (Terminal) output of codesigndoc - in Terminal.app you can save the output into a file with Command+s

bash -l -c "$(curl -sfL https://raw.githubusercontent.com/bitrise-tools/codesigndoc/master/_scripts/install_wrap.sh)"
 => Creating a temporary directory for codesigndoc ...
 => Downloading version: 2.0.3
 => Downloading codesigndoc from (https://github.com/bitrise-tools/codesigndoc/releases/download/2.0.3/codesigndoc-Darwin-x86_64) to (/var/folders/9c/21k0gfj9379dn7c5hqff7x2n5h8681/T/codesigndocXXXXXX.3gviBtTC/codesigndoc) ...
######################################################################## 100.0%
 => Making it executable ...
 => codesigndoc version: 2.0.3
 => Running codesigndoc scan ...


Xcode (xcodebuild) version: Xcode 9.2 (Build version 9C40b)


Please drag-and-drop your Xcode Project (.xcodeproj) or Workspace (.xcworkspace) file, 
the one you usually open in Xcode, then hit Enter.

(Note: if you have a Workspace file you should most likely use that) : /Users/<username>/projects/native-ios-accelerator-template/<appname>/<appname>.xcworkspace 

🔦  Scanning Schemes ...
$ xcodebuild "-workspace" "/Users/<username>/projects/native-ios-accelerator-template/<appname>/<appname>.xcworkspace" "-list"

Select the Scheme you usually use in Xcode
Please select from the list:
[1] : <appname>
[2] : AEXML
[3] : PathKit
[4] : Pods-<appname>
[5] : RxCocoa
[6] : RxSwift
[7] : xcproj
(type in the option's number, then hit Enter) [1] : 

🔦  Running an Xcode Archive, to get all the required code signing settings...
$ xcodebuild "-workspace" "/Users/<username>/projects/native-ios-accelerator-template/<appname>/<appname>.xcworkspace" "-scheme" "<appname>" "clean" "archive" "-archivePath" "/var/folders/9c/21k0gfj9379dn7c5hqff7x2n5h8681/T/__codesigndoc__647161938/<appname>.xcarchive"
....................................................

💡  Saving xcodebuild output into file: /Users/<username>/projects/native-ios-accelerator-template/codesigndoc_exports/xcodebuild-output.log
failed to analyze archive, error: Info.plist not exists at: /var/folders/9c/21k0gfj9379dn7c5hqff7x2n5h8681/T/__codesigndoc__647161938/<appname>.xcarchive/Products/Applications/<appname>.app/Info.plist

In addition to this, if codesigndoc generated an Xcode output log, please attach that too. xcodebuild-output.txt

codesigndoc fails to correctly export the certificates required for signing macOS applications because it is checking for the existence of the Info.plist file based on the directory structure of an iOS application.

allenhumphreys avatar Mar 05 '18 15:03 allenhumphreys

Thanks for reporting @allenhumphreys !

We'll try to fix this ASAP, but if you'd have some time feel free to send a PR! :)

viktorbenei avatar Mar 05 '18 17:03 viktorbenei

Open the project: /Users/<username>/Documents/MyProject.xcworkspace  
and Archive, using the Scheme: MyProject  
................................  
First of all please make sure that you can Archive your app from Xcode.  
codesigndoc only works if you can archive your app from Xcode.  
If you can, and you get a valid IPA file if you export from Xcode,  
please create an issue on GitHub at: https://github.com/bitrise-tools/codesigndoc/issues  
with as many details & logs as you can share!  
................................   
Error: failed to run xcodebuild command, error: exit status 65

3 Days trying build, always with error in code signing.... I do all input of all files ( provisioning, certificates, all ). Still getting error...

loverde-co avatar Mar 10 '18 22:03 loverde-co

@loverde-co please fill out a separate issue report as your error seems to be a different one (the original one had an error: Info.plist not exists at which yours doesn't seem to have).

Please create a separate report with the log files mentioned in the error.

viktorbenei avatar Mar 10 '18 23:03 viktorbenei

Hey, I just found this issue because we are having the same issues, using codesigndoc to export the required certificates etc. for building a macOS app. While the Info.plist file exists at Contents/Info.plist, the tool searches in /, which is only correct for iOS Applications.

Is there any update from bitrise on this issue?

iStefo avatar Oct 19 '18 10:10 iStefo

Hey @iStefo !

Unfortunately the MacOS part is not updated yet.

trapacska avatar Oct 26 '18 08:10 trapacska

@iStefo I seem to have the same problem. Did you fix this problem yourself, and if so, would you be willing to share what you did? Thanks!

trondkr avatar Nov 05 '18 23:11 trondkr

Same issue here. This would be super helpful.

markshiz avatar Feb 04 '19 22:02 markshiz