Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Codesigndoc is not working with Xcode 12 on Big Sur #125

Open
colinmasters opened this issue Aug 5, 2020 · 14 comments
Open

Codesigndoc is not working with Xcode 12 on Big Sur #125

colinmasters opened this issue Aug 5, 2020 · 14 comments

Comments

@colinmasters
Copy link

colinmasters commented Aug 5, 2020

I can archive an IPA from xcode but I cannot use codesigndoc; see below output and log

$redacted@redacted  ~/Developer/$redacted/MyProject   develop.onboardingUtility  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.4.1
=> Downloading codesigndoc from (https://github.com/bitrise-io/codesigndoc/releases/download/2.4.1/codesigndoc-Darwin-x86_64) to (/var/folders/5j/_08d12096fgflr8kstn__4wc0000gp/T/codesigndocXXXXXX.gjg9ezao/codesigndoc) ...
################################################################################################################################ 100.0%################################################################################################################################ 100.0%
=> Making it executable ...
=> codesigndoc version: 2.4.1
=> Running codesigndoc scan ...

Scan the directory for project files
You can specify the Xcode project/workscape file to scan with the --file flag.
Found one project file: MyProject.xcworkspace.

🔦 Scanning Schemes ...
$ xcodebuild "-workspace" "/Users/$redacted/Developer/$redacted/MyProject/MyProject.xcworkspace" "-list"

Select the Scheme you usually use in Xcode
Please select from the list:
[1] : MyProject (iOS)
(type in the option's number, then hit Enter) [1] : 1

Xcode (xcodebuild) version: Xcode 12.0 (Build version 12A8179i)

🔦 Running an Xcode Archive, to get all the required code signing settings...
$ xcodebuild "-workspace" "/Users/$redacted/Developer/$redacted/MyProject/MyProject.xcworkspace" "-scheme" "MyProject (iOS)" "clean" "archive" "-archivePath" "/var/folders/5j/_08d12096fgflr8kstn__4wc0000gp/T/__codesigndoc__171356461/MyProject (iOS).xcarchive"
...........

Last lines of the build log:

** ARCHIVE FAILED **

The following build commands failed:
CompileSwift normal x86_64
CompileSwift normal arm64
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
CompileSwift normal x86_64
CompileSwift normal arm64
CompileSwift normal x86_64
CompileSwift normal arm64
CompileSwift normal x86_64
CompileSwift normal arm64
(9 failures)
Please check the build log to see what caused the error.

Xcode Archive failed.
Open the project: /Users/$redacted/Developer/$redacted/MyProject/MyProject.xcworkspace
and make sure that you can build an Archive, with the scheme: MyProject (iOS)

💡 Saving xcodebuild output into file: /Users/$redacted/Developer/$redacted/MyProject/codesigndoc_exports/xcodebuild-output.log


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/.app file if you export from Xcode,
please create an issue on GitHub at: https://github.com/bitrise-io/codesigndoc/issues
with as many details & logs as you can share!

Error: failed to run xcodebuild command, error: exit status 65
xcodebuild-output.log

@bitce
Copy link

bitce commented Aug 7, 2020

Thanks for the report @colinmasters, we're looking into the possible changes and if and what we need to modify to make sure the tool runs smoothly on Xcode 12 and Big Sur too.

@colinmasters
Copy link
Author

I think I can offer some additional insight into the issue, without having really found a solution;

We are building a Universal app for iOS and macOS so some targets could theoretically compile for both platforms, however xcodebuild appears to be archiving for both platforms while in the scheme menu you can choose between "Any iOS" or "Any macOS"

@colinmasters
Copy link
Author

iOS 14 has now been released and this toolchain still does not work for us to use Bitrise...

@chaitanyatanna-bitrise
Copy link

Hi @colinmasters
This issue should be resolved now.
Please let us know if you have any questions.

Thanks
Chaitanya

@colinmasters
Copy link
Author

This still does not work

@eimermusic
Copy link

Needed to update my code sign files and found that I also have this issue.

@isseium
Copy link

isseium commented Feb 10, 2021

I have a similar issue with xcode 12.1 on MacOS Catalina (10.15.7).

But It worked fine when after add following value.

image

Diff

@@ -3780,8 +3780,8 @@
                                EXCLUDED_ARCHS = "";
+                               "EXCLUDED_ARCHS[sdk=*]" = arm64;
                                "EXCLUDED_ARCHS[sdk=iphoneos*]" = "";
-                               "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
                                FRAMEWORK_SEARCH_PATHS = (
                                        "$(inherited)",
                                        "$(PROJECT_DIR)/Carthage/Build/iOS",
@@ -3811,7 +3811,7 @@
                                EXCLUDED_ARCHS = "";
-                               "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
+                               "EXCLUDED_ARCHS[sdk=*]" = arm64;
                                FRAMEWORK_SEARCH_PATHS = (
                                        "$(inherited)",
                                        "$(PROJECT_DIR)/Carthage/Build/iOS",

After adding value, if you have trouble building on xcode, you may want to restore it to its original value.

@aliraza-noon
Copy link

we also been having this issue, I guess it is time to move away from bitrise, they are not interested in helping us

@mjones-droid
Copy link

Hey @aliraza-noon! I understand your frustration. There is an open bug report on this issue and it's being worked on. In the interim, I recommend filing a ticket so we can take a look at your specific builds. We may be able to find a workaround for you.

Matthew
Senior Customer Engineer

@GoktuqCan
Copy link

Is there an update on this?

@Roland-Bak
Copy link

Hello @GoktuqCan 👋

Currently our engineers are working on a complete codesigndoc overhaul in increase overall performance, and it will include this as well. This means that fixing this issue will take more time, however, but once it is done, you will have a better experience overall. 🙂

@ghadeermohameedelmahdy
Copy link

any updates?

@shams-ahmed
Copy link
Contributor

@colinmasters I've formatted your build logs to make it easier to debug. I think your issue to do with incompatible issues with mac catalyst. See logs

cat xcodebuild-output.log | xcbeautify
Resolve Package Graph
Resolved source packages
swift-log - https://github.com/apple/swift-log.git @ 1.4.0
LoggerAPI - https://github.com/IBM-Swift/LoggerAPI.git @ 1.9.0
CryptorECC - https://github.com/IBM-Swift/BlueECC.git @ 1.2.5
FavIcon - https://github.com/leonbreedt/FavIcon.git @ 3.1.0
Alamofire - https://github.com/Alamofire/Alamofire.git @ 4.9.1
Cryptor - https://github.com/IBM-Swift/BlueCryptor.git @ 1.0.32
KituraContracts - https://github.com/IBM-Swift/KituraContracts.git @ 1.2.1
SFSafeSymbols - [email protected]:piknotech/SFSafeSymbols.git @ 1.2.0
SwiftJWT - https://github.com/IBM-Swift/Swift-JWT.git @ 3.6.1
DeviceKit - https://github.com/devicekit/DeviceKit @ 3.2.0
Disk - https://github.com/saoudrizwan/Disk.git @ 0.6.4
CryptorRSA - https://github.com/IBM-Swift/BlueRSA.git @ 1.0.35
Clean Succeeded
❌ /Users/$redacted/Library/Developer/Xcode/DerivedData/MyProject-auujafrbaytojjepnnimtznqfkkj/SourcePackages/checkouts/NDSwift/Sources/NDSwift/System/SwiftStandardLib/StringExtensions.swift:1063:30: 'NSFont' is unavailable in Mac Catalyst
    private typealias Font = NSFont
                             ^~~~~~
❌ /Users/$redacted/Library/Developer/Xcode/DerivedData/MyProject-auujafrbaytojjepnnimtznqfkkj/SourcePackages/checkouts/NDSwift/Sources/NDSwift/System/SwiftStandardLib/StringExtensions.swift:1109:30: 'NSColor' is unavailable in Mac Catalyst
    func colored(with color: NSColor) -> NSAttributedString {
                             ^~~~~~~
⚠️  /Users/$redacted/Library/Developer/Xcode/DerivedData/MyProject-auujafrbaytojjepnnimtznqfkkj/SourcePackages/checkouts/NDSwift/Sources/NDSwift/System/SwiftStandardLib/UIApplicationExtensions.swift:15:93: 'keyWindow' was deprecated in Mac Catalyst 13.0: Should not be used for applications that support multiple scenes as it returns a key window across all connected scenes
    class func topViewController(_ viewController: UIViewController? = UIApplication.shared.keyWindow?.rootViewController) -> UIViewController? {
                                                                                            ^
⚠️  /Users/$redacted/Library/Developer/Xcode/DerivedData/MyProject-auujafrbaytojjepnnimtznqfkkj/SourcePackages/checkouts/NDSwift/Sources/NDSwift/UIKit/UIAlertControllerExtensions.swift:26:30: 'keyWindow' was deprecated in Mac Catalyst 13.0: Should not be used for applications that support multiple scenes as it returns a key window across all connected scenes
        UIApplication.shared.keyWindow?.rootViewController?.present(self, animated: animated, completion: completion)
                             ^
⚠️  /Users/$redacted/Library/Developer/Xcode/DerivedData/MyProject-auujafrbaytojjepnnimtznqfkkj/SourcePackages/checkouts/NDSwift/Sources/NDSwift/Utiltities/SwifterSwift.swift:44:37: 'statusBarFrame' was deprecated in Mac Catalyst 13.0: Use the statusBarManager property of the window scene instead.
        return UIApplication.shared.statusBarFrame.height
                                    ^
⚠️  /Users/$redacted/Library/Developer/Xcode/DerivedData/MyProject-auujafrbaytojjepnnimtznqfkkj/SourcePackages/checkouts/NDSwift/Sources/NDSwift/Utiltities/SwifterSwift.swift:165:41: 'isNetworkActivityIndicatorVisible' was deprecated in Mac Catalyst 13.0: Provide a custom network activity UI in your app if desired.
            return UIApplication.shared.isNetworkActivityIndicatorVisible
                                        ^
⚠️  /Users/$redacted/Library/Developer/Xcode/DerivedData/MyProject-auujafrbaytojjepnnimtznqfkkj/SourcePackages/checkouts/NDSwift/Sources/NDSwift/Utiltities/SwifterSwift.swift:168:34: 'isNetworkActivityIndicatorVisible' was deprecated in Mac Catalyst 13.0: Provide a custom network activity UI in your app if desired.
            UIApplication.shared.isNetworkActivityIndicatorVisible = newValue
                                 ^
⚠️  /Users/$redacted/Library/Developer/Xcode/DerivedData/MyProject-auujafrbaytojjepnnimtznqfkkj/SourcePackages/checkouts/NDSwift/Sources/NDSwift/Utiltities/SwifterSwift.swift:219:37: 'keyWindow' was deprecated in Mac Catalyst 13.0: Should not be used for applications that support multiple scenes as it returns a key window across all connected scenes
        return UIApplication.shared.keyWindow
                                    ^
⚠️  /Users/$redacted/Library/Developer/Xcode/DerivedData/MyProject-auujafrbaytojjepnnimtznqfkkj/SourcePackages/checkouts/NDSwift/Sources/NDSwift/Utiltities/SwifterSwift.swift:227:41: 'keyWindow' was deprecated in Mac Catalyst 13.0: Should not be used for applications that support multiple scenes as it returns a key window across all connected scenes
            return UIApplication.shared.keyWindow?.rootViewController
                                        ^
⚠️  /Users/$redacted/Library/Developer/Xcode/DerivedData/MyProject-auujafrbaytojjepnnimtznqfkkj/SourcePackages/checkouts/NDSwift/Sources/NDSwift/Utiltities/SwifterSwift.swift:230:34: 'keyWindow' was deprecated in Mac Catalyst 13.0: Should not be used for applications that support multiple scenes as it returns a key window across all connected scenes
            UIApplication.shared.keyWindow?.rootViewController = newValue
                                 ^
[Locksmith] Processing Locksmith-Info.plist
[Locksmith] Copying Locksmith-umbrella.h
[Locksmith] Copying Locksmith.h
shamsahmed@shamsahmed-mbp Downloads % 

@shams-ahmed
Copy link
Contributor

@eimermusic @aliraza-noon @GoktuqCan @ghadeermohameedelmahdy It's difficult to debug this issue without the full xcodebuild logs. Would you be able to create a new Github issue with your build logs or send customer support a message so we can investigate?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

12 participants