奇怪的构建错误:Facebook Swift SDK未在空白项目中与迦太基一起构建

时间:2018-10-18 14:25:40

标签: ios swift xcode facebook-ios-sdk carthage

  • 全新的ios项目
  • 除了带有基本设置的空视图控制器之外,文件夹中没有任何内容
  • touch Cartfile
  • github "facebook/Facebook-SDK-Swift"添加到了Cartfile
  • carthage bootstrap --platform iOS --cache-builds
  • 收到以下错误消息:

*** Checking out Bolts-ObjC at "1.9.0"
*** Checking out Facebook-SDK-Swift at "0.4.0"
*** Checking out facebook-objc-sdk at "sdk-version-4.36.0"
*** No cache found for Bolts-ObjC, building with all downstream dependencies
*** xcodebuild output can be found in /var/folders/0p/lqn6hy6s1d9389yjr_1b8jnw0000gn/T/carthage-xcodebuild.RN4jiZ.log
*** Building scheme "Bolts-iOS" in Bolts.xcodeproj
*** Building scheme "Bolts-iOS-Dynamic" in Bolts.xcodeproj
*** Building scheme "FBSDKCoreKit-Dynamic" in FacebookSDK.xcworkspace
*** Building scheme "FBSDKCoreKit-Universal" in FacebookSDK.xcworkspace
Build Failed
Task failed with exit code 65:
/usr/bin/xcrun xcodebuild -workspace /Users/keitzer/src/test/Test/Carthage/Checkouts/facebook-objc-sdk/FacebookSDK.xcworkspace -scheme FBSDKCoreKit-Universal -configuration Release -derivedDataPath /Users/keitzer/Library/Caches/org.carthage.CarthageKit/DerivedData/10.0_10A255/facebook-objc-sdk/sdk-version-4.36.0 -sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/0p/lqn6hy6s1d9389yjr_1b8jnw0000gn/T/facebook-objc-sdk SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/keitzer/src/test/Test/Carthage/Checkouts/facebook-objc-sdk)

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/0p/lqn6hy6s1d9389yjr_1b8jnw0000gn/T/carthage-xcodebuild.RN4jiZ.log

有什么想法可能会发生这种情况吗?


  • 迦太基版本:0.31.1
  • Xcode 10,App Store版本
  • macOS 10.14 Mojave

1 个答案:

答案 0 :(得分:1)

就我而言,这是SwiftLint(v。0.29.3)阻止了Facebook Swift SDK的构建。 它是通过Brew安装在我的系统中的。

删除SwiftLint 作为临时解决方案很有帮助。

P.S。 要卸载所有版本的SwiftLint,请在终端中运行以下命令:

brew uninstall --force swiftlint