Search code examples
iosxcodefirebasemacoscrashlytics

macOS - Crashlytics


I have successfully installed Crashlytics for a macOS app.

The issue is that when I run xcodebuild I get the following error:

Build description path: /Users/user/Software/macos-project/build/XCBuildData/1de1a3320b63060eeac8ee6054441eab.xcbuilddata

warning: Building targets in manual order is deprecated - check "Parallelize build for command-line builds" in the project editor, or set DISABLE_MANUAL_TARGET_ORDER_BUILD_WARNING in any of the targets in the current build to suppress this warning
ClangStatCache /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang-stat-cache /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk /var/folders/3y/wxqdg41958n7cl4xdf9qzxxh0000gn/C/com.apple.DeveloperTools/14.3-14E222b/Xcode/SDKStatCaches.noindex/macosx13.3-22E245-.sdkstatcache
    cd /Users/user/Software/macos-project/project.xcodeproj
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang-stat-cache /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -o /var/folders/3y/wxqdg41958n7cl4xdf9qzxxh0000gn/C/com.apple.DeveloperTools/14.3-14E222b/Xcode/SDKStatCaches.noindex/macosx13.3-22E245-.sdkstatcache

CreateBuildDirectory /Users/user/Library/Developer/Xcode/DerivedData/project-enqmgygeiagmohbnywjtetshcnrr/SourcePackages/checkouts/nanopb/build/Release
    cd /Users/user/Software/macos-project/project.xcodeproj
    builtin-create-build-directory /Users/user/Library/Developer/Xcode/DerivedData/project-enqmgygeiagmohbnywjtetshcnrr/SourcePackages/checkouts/nanopb/build/Release
error: File exists but is not a directory: /Users/user/Library/Developer/Xcode/DerivedData/project-enqmgygeiagmohbnywjtetshcnrr/SourcePackages/checkouts/nanopb/build

CreateBuildDirectory /Users/user/Library/Developer/Xcode/DerivedData/project-enqmgygeiagmohbnywjtetshcnrr/SourcePackages/checkouts/nanopb/build/EagerLinkingTBDs/Release
    cd /Users/user/Software/macos-project/project.xcodeproj
    builtin-create-build-directory /Users/user/Library/Developer/Xcode/DerivedData/project-enqmgygeiagmohbnywjtetshcnrr/SourcePackages/checkouts/nanopb/build/EagerLinkingTBDs/Release
error: File exists but is not a directory: /Users/user/Library/Developer/Xcode/DerivedData/project-enqmgygeiagmohbnywjtetshcnrr/SourcePackages/checkouts/nanopb/build/EagerLinkingTBDs

warning: ONLY_ACTIVE_ARCH=YES requested with multiple ARCHS and no active architecture could be computed; building for all applicable architectures (in target 'project' from project 'project')
warning: Run script build phase 'Swiftlint' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'project' from project 'project')
warning: Run script build phase 'Firebase' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'project' from project 'project')
** BUILD FAILED **


The following build commands failed:
    CreateBuildDirectory /Users/user/Library/Developer/Xcode/DerivedData/project-enqmgygeiagmohbnywjtetshcnrr/SourcePackages/checkouts/nanopb/build/Release
    CreateBuildDirectory /Users/user/Library/Developer/Xcode/DerivedData/project-enqmgygeiagmohbnywjtetshcnrr/SourcePackages/checkouts/nanopb/build/EagerLinkingTBDs/Release

Please note that if I run this through Xcode, it seems to be working fine.


Solution

  • This seems like it might be related to the xcodebuild invocation.

    Try passing a scheme to your xcodebuild invocation using the -scheme argument. To get a list of valid schemes names, run xcodebuild -list in your project's directory.

    It will look like: xcodebuild -scheme $(YOUR_SCHEME_HERE)

    The difference seems to be that, with a scheme passed, artifacts go into a different folder rather than the package repo checkouts. So when xcodebuild runs without arguments, it can corrupt the checked out SPM repos in DerivedData.