Skip to content
This repository has been archived by the owner on Nov 2, 2019. It is now read-only.

Carthage + Xcode 10 beta 3 fails to compile the framework #246

Closed
uson1x opened this issue Jul 11, 2018 · 80 comments
Closed

Carthage + Xcode 10 beta 3 fails to compile the framework #246

uson1x opened this issue Jul 11, 2018 · 80 comments
Labels
bug Something is broken or being fixed objc sdk This issue is associate with underlying Objective-C SDK

Comments

@uson1x
Copy link

uson1x commented Jul 11, 2018

Hi

When I'm trying to compile the framework using carthage v0.30.1 and Xcode 10 beta 3 Command Line Tools I see this error:

FATAL: Xcode build failed for platform: iphonesimulator.
cp: 
../Bolts-IOS/build/ios/Bolts.framework: No such file or directory

** ARCHIVE FAILED **


The following build commands failed:
	PhaseScriptExecution Run\ Script /Users/ivanparfenchuk/Library/Caches/org.carthage.CarthageKit/DerivedData/10.0_10L201y/facebook-ios-sdk/sdk-version-4.34.0/Build/Intermediates.noindex/ArchiveIntermediates/FBSDKCoreKit-Universal/IntermediateBuildFilesPath/FBSDKCoreKit.build/Release-iphoneos/FBSDKCoreKit-Universal.build/Script-9D69FCCD1AA80EB10068EC76.sh
(1 failure)

Happens every time, even on a fresh project.

Seems like the Bolts.framework is indeed not there in the directory it is searching in.

Empty test project I quickly made to demonstrate the issue: https://github.com/uson1x/facebook-sdk-swift-test

Would appreciate any hints on how to fix this Xcode beta behavior!

@txaiwieser
Copy link

Same thing here!

@codytwinton codytwinton added the bug Something is broken or being fixed label Jul 17, 2018
@codytwinton
Copy link
Contributor

@uson1x - Thanks for adding a test project. That helps us immensely with resolving these issues.

I've got some stuff on my plate, but I'll do my best to resolve asap. Also, if anyone else finds a solution, feel free to submit a PR.

@ThierryNg
Copy link

ThierryNg commented Jul 30, 2018

Coming around a bit late, but have you tried compiling the frameworks with Swift 4.0 or 4.1 ? It solved a similar problem for me

@Stephanvs
Copy link

I've run into the same issue. I'm using Xcode beta 5 (Version 10.0 beta 5 (10L221o)). This is the output from carthage update --platform ios

*** Fetching facebook-sdk-swift
*** Fetching facebook-ios-sdk
*** Fetching Bolts-ObjC
*** Checking out Bolts-ObjC at "1.9.0"
*** Checking out facebook-sdk-swift at "0.3.2"
*** Checking out facebook-ios-sdk at "sdk-version-4.35.0"
*** xcodebuild output can be found in /var/folders/vw/9c79m49s663_0gncvh30xbhr0000gn/T/carthage-xcodebuild.dIDx3B.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/...truncated.../Carthage/Checkouts/facebook-ios-sdk/FacebookSDK.xcworkspace -scheme FBSDKCoreKit-Universal -configuration Release -derivedDataPath /Users/...truncated.../Library/Caches/org.carthage.CarthageKit/DerivedData/10.0_10L221o/facebook-ios-sdk/sdk-version-4.35.0 -sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/vw/9c79m49s663_0gncvh30xbhr0000gn/T/facebook-ios-sdk SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/...truncated.../Carthage/Checkouts/facebook-ios-sdk)

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/vw/9c79m49s663_0gncvh30xbhr0000gn/T/carthage-xcodebuild.dIDx3B.log
make: *** [gestalt-update] Error 1

Is there any known work around?

@ThierryNg
Copy link

Try changing the SWIFT_VERSION in the build settings of the facebook projects to 4.0 or 4.1. in 4.2, UIApplicationLaunchOptionsKey and UIApplicationOpenURLOptionsKey have been refactored as nested types UIApplication.LaunchOptionsKey and UIApplication.OpenURLOptionsKey

@leobarrospereira
Copy link

Hey guys, any news about this issue?

I'm having the same problem using Xcode 10 beta 5 and Carthage.
An error happens while building FBSDKCoreKit-Universal, so no Swift in this point yet.

I opened the FacebookSDK.xcworkspace and tried to build the scheme FBSDKCoreKit-Universal manually and I got these errors:
screen shot 2018-08-06 at 18 35 05

And in the end of the build messages I got this:
screen shot 2018-08-06 at 18 41 57

Is there any workaround for this?

Thanks!

@codisms
Copy link

codisms commented Aug 6, 2018

I'm having the same issue. The following line is what is causing the issue:

Checkouts/facebook-ios-sdk/FBSDKCoreKit/FBSDKCoreKit.xcodeproj/project.pbxproj:2541

shellScript = "rm -rf ../Bolts-IOS/build/ ../build/Bolts.framework\n../Bolts-IOS/scripts/build_framework.sh -c Release\ncp -R ../Bolts-IOS/build/ios/Bolts.framework ../build/\n";

I also found the following, but I don't get to it yet:

Checkouts/Facebook-SDK-Swift/Carthage/Checkouts/facebook-ios-sdk/FBSDKCoreKit/FBSDKCoreKit.xcodeproj/project.pbxproj:2391

shellScript = "rm -rf ../Bolts-IOS/build/ ../build/Bolts.framework\n../Bolts-IOS/scripts/build_framework.sh -c Release\ncp -R ../Bolts-IOS/build/ios/Bolts.framework ../build/\n";

@leobarrospereira
Copy link

Hi @codisms, I also noticed that the problem is in a script that runs as a build phase in the FBSDKCoreKit-Universal.

Did you come up with some workaround for this?

@codisms
Copy link

codisms commented Aug 7, 2018

@leobarrospereira I have not yet found a workaround. The issue is that facebook-ios-sdk is not compatible with Bolts-ObjC 1.9.0. The output directory has changed from "ios" to "iphoneos". So I think this line needs to be changed:
https://github.com/facebook/facebook-ios-sdk/tree/master/FBSDKCoreKit/FBSDKCoreKit.xcodeproj#L2541

@codytwinton codytwinton added the objc sdk This issue is associate with underlying Objective-C SDK label Aug 7, 2018
@codytwinton
Copy link
Contributor

@codisms - Thanks for this diagnosis. I'm going to close this issue for now, as this appears to be an issue with the ObjC SDK.

@codisms
Copy link

codisms commented Aug 7, 2018

I was able to work around this (and another issue I ran into) executing the following. (Yuck!)

carthage checkout

sed -i '.bak' 's|cp -R ../Bolts-IOS/build/ios/|pwd\\ncp -R ../Bolts-IOS/build/Release-iphoneos/|' 'Carthage/Checkouts/facebook-ios-sdk/FBSDKCoreKit/FBSDKCoreKit.xcodeproj/project.pbxproj'

rm 'Carthage/Checkouts/facebook-ios-sdk/FBSDKIntegrationTests/FBSDKIntegrationTests.xcodeproj/xcshareddata/xcschemes/FBSDKIntegrationTests.xcscheme'

carthage build

@vitorhugomagalhaes
Copy link

I can confirm that on Beta 5 it still doesn't work. Any workaround suggested ?

@leobarrospereira
Copy link

Hi @vitorhugomagalhaes, this is the workaround that I did to build the Facebook library with Carthage and to be able to build my app:

  • Open ../Carthage/Checkouts/facebook-ios-sdk/FacebookSDK.xcworkspace

  • In the second Run script Build Phase replace the line

    • Old: ../Bolts-IOS/build/ios/Bolts.framework ../build/
    • New: ../Bolts-IOS/build/Release-iphonesimulator/Bolts.framework ../build/
  • Open ../Carthage/Checkouts/facebook-ios-sdk/scripts/build-universal-framework.sh

    • Remove all calls to clean build in the script
  • Open ../Carthage/Checkouts/facebook-ios-sdk/Bolts-IOS/scripts/build_framework.sh

    • Remove all calls to clean build in the script
  • Run: carthage build Facebook-SDK-Swift --platform iOS (don't use carthage update otherwise it will download the library again and overwrite your changes)

I hope it can help you too.

@Nonnus
Copy link

Nonnus commented Aug 14, 2018

  • i was able to workaround the issue by forking all 3 repos (facebook-sdk-swift, facebook-ios-sdk and bolts), implementing the described changes in previous posts and update the git submodules to point to my forks.
  • however this is not ideal and we need an "official" fix for this situation but i fear that with this issue being closed here along with not being possible to submit an issue in facebook/facebook-ios-sdk makes it harder to get the devs attention to the problem

any suggestions on best way to get this done asap?

@codytwinton
Copy link
Contributor

@Nonnus - I'm personally working to resolve the issues described. Although bugs with the Objective-C SDK are directed to the external bugs tool, all three SDKs accept pull requests. If you submit pull requests from your 3 forked repos, I'll examine them all asap.

@codytwinton codytwinton reopened this Aug 14, 2018
@Nonnus
Copy link

Nonnus commented Aug 14, 2018

@codytwinton thats great news! thanks a lot for your fast input :)
i will do my part and prepare prs for the 3 repos

ps: i am very intrigued about this issue regarding clean build option for xcodebuild as i dont understand why it might be causing any issues

@codytwinton
Copy link
Contributor

Absolutely! Thanks for working with us on this.

@Nonnus
Copy link

Nonnus commented Aug 14, 2018

just for reference, bolts builds fine by itself when i run carthage directly,
but when it is built as part of building facebook-sdk-swift it does not compile if that clean build option is set

@Nonnus
Copy link

Nonnus commented Aug 14, 2018

@codytwinton prs created (only 2 as the only changes i did to facebook-sdk-swift was to point the git submodules and cartfiles to my forks instead of the original repos),
ps: let me know if i can provide further assistance

@codytwinton
Copy link
Contributor

@Nonnus - Thank you so much! We had an issue with the latest iOS SDK release where PRs were accidentally reverted on release. I'm going to do some internal investigation and/or resolution of that issue, then I'll work to accept the facebook-ios-sdk PR.

I'm going to leave the Bolts PR to Nikita.

@jemartti
Copy link

I think it's pretty likely that Xcode 10 will ship alongside macOS 10.14 towards the end of September—hopefully we can get an official solution by then.

I've yet to get this library built with Xcode 10 (it started with that Carthage archive issue). I'm currently running Xcode 10 beta 6 on macOS 10.13.6. I've tried running carthage checkout and manually implementing @Nonnus's change but still getting the following failure:

$ xcode-select --print-path
/Applications/Xcode-beta.app/Contents/Developer
$ carthage build --platform iOS
*** xcodebuild output can be found in /var/folders/qr/yc93hcdn05bb2q615s9z_1440000gn/T/carthage-xcodebuild.rxJdrg.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/jacob/workspace/fundu-ios/Carthage/Checkouts/facebook-ios-sdk/FacebookSDK.xcworkspace -scheme FBSDKCoreKit-Universal -configuration Release -derivedDataPath /Users/jacob/Library/Caches/org.carthage.CarthageKit/DerivedData/10.0_10L232m/facebook-ios-sdk/sdk-version-4.35.0 -sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/qr/yc93hcdn05bb2q615s9z_1440000gn/T/facebook-ios-sdk SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/jacob/workspace/fundu-ios/Carthage/Checkouts/facebook-ios-sdk)

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/qr/yc93hcdn05bb2q615s9z_1440000gn/T/carthage-xcodebuild.rxJdrg.log
[…snip]
Strip /Users/jacob/workspace/fundu-ios/Carthage/Checkouts/facebook-ios-sdk/Bolts-IOS/build/Release-iphonesimulator/Bolts.framework/Bolts (in target: Bolts-iOS)
    cd /Users/jacob/workspace/fundu-ios/Carthage/Checkouts/facebook-ios-sdk/Bolts-IOS
    /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -S -T /Users/jacob/workspace/fundu-ios/Carthage/Checkouts/facebook-ios-sdk/Bolts-IOS/build/Release-iphonesimulator/Bolts.framework/Bolts

CodeSign /Users/jacob/workspace/fundu-ios/Carthage/Checkouts/facebook-ios-sdk/Bolts-IOS/build/Release-iphonesimulator/Bolts.framework (in target: Bolts-iOS)
    cd /Users/jacob/workspace/fundu-ios/Carthage/Checkouts/facebook-ios-sdk/Bolts-IOS
    export CODESIGN_ALLOCATE=/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate

Signing Identity:     "-"

    /usr/bin/codesign --force --sign - --timestamp=none /Users/jacob/workspace/fundu-ios/Carthage/Checkouts/facebook-ios-sdk/Bolts-IOS/build/Release-iphonesimulator/Bolts.framework

Touch /Users/jacob/workspace/fundu-ios/Carthage/Checkouts/facebook-ios-sdk/Bolts-IOS/build/Release-iphonesimulator/Bolts.framework (in target: Bolts-iOS)
    cd /Users/jacob/workspace/fundu-ios/Carthage/Checkouts/facebook-ios-sdk/Bolts-IOS
    /usr/bin/touch -c /Users/jacob/workspace/fundu-ios/Carthage/Checkouts/facebook-ios-sdk/Bolts-IOS/build/Release-iphonesimulator/Bolts.framework

** BUILD SUCCEEDED **


FATAL: Xcode build failed for platform: iphonesimulator.
Command PhaseScriptExecution emitted errors but did not return a nonzero exit code to indicate failure

** ARCHIVE FAILED **

The changes I made are:

$ git diff
diff --git a/Carthage/Checkouts/Bolts-ObjC/scripts/build_framework.sh b/Carthage/Checkouts/Bolts-ObjC/scripts/build_framework.sh
index b7534aa..385ab6e 100755
--- a/Carthage/Checkouts/Bolts-ObjC/scripts/build_framework.sh
+++ b/Carthage/Checkouts/Bolts-ObjC/scripts/build_framework.sh
@@ -120,7 +120,6 @@ function xcode_build_target() {
     -configuration "${2}" \
     SYMROOT="$BOLTS_BUILD" \
     CURRENT_PROJECT_VERSION="$BOLTS_VERSION_FULL" \
-    clean build \
     || die "Xcode build failed for platform: ${1}."
 }
 
diff --git a/Carthage/Checkouts/facebook-ios-sdk/FBSDKCoreKit/FBSDKCoreKit.xcodeproj/project.pbxproj b/Carthage/Checkouts/facebook-ios-sdk/FBSDKCoreKit/FBSDKCoreKit.xcodeproj/project.pbxproj
index 512b756..66b6541 100644
--- a/Carthage/Checkouts/facebook-ios-sdk/FBSDKCoreKit/FBSDKCoreKit.xcodeproj/project.pbxproj
+++ b/Carthage/Checkouts/facebook-ios-sdk/FBSDKCoreKit/FBSDKCoreKit.xcodeproj/project.pbxproj
@@ -2538,7 +2538,7 @@
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                        shellPath = /bin/sh;
-                       shellScript = "rm -rf ../Bolts-IOS/build/ ../build/Bolts.framework\n../Bolts-IOS/scripts/build_framework.sh -c Release\ncp -R ../Bolts-IOS/build/ios/Bolts.framework ../build/\n";
+                       shellScript = "rm -rf ../Bolts-IOS/build/ ../build/Bolts.framework\n../Bolts-IOS/scripts/build_framework.sh -c Release\ncp -R ../Bolts-IOS/build/Release-iphonesimulator/Bolts.framework ../build/\n";
                };
                9D6DEEFD1BC2E546001A94ED /* ShellScript */ = {
                        isa = PBXShellScriptBuildPhase;
diff --git a/Carthage/Checkouts/facebook-ios-sdk/scripts/build-universal-framework.sh b/Carthage/Checkouts/facebook-ios-sdk/scripts/build-universal-framework.sh
index 645a7ca..7c8fc3b 100755
--- a/Carthage/Checkouts/facebook-ios-sdk/scripts/build-universal-framework.sh
+++ b/Carthage/Checkouts/facebook-ios-sdk/scripts/build-universal-framework.sh
@@ -7,8 +7,8 @@ mkdir -p "${UNIVERSAL_OUTPUT_FOLDER}"
 rm -rf "${UNIVERSAL_OUTPUT_FOLDER}/${PROJECT_NAME}.framework"
 
 # Step 1. Build Device and Simulator versions
-xcodebuild -target "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos  BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build
-xcodebuild -target "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphonesimulator BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build
+xcodebuild -target "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos  BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}"
+xcodebuild -target "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphonesimulator BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}"
 
 # Step 2. Copy the framework structure to the universal folder
 cp -R "${BUILD_DIR}/${CONFIGURATION}-iphoneos/${PROJECT_NAME}.framework" "${UNIVERSAL_OUTPUT_FOLDER}/"
diff --git a/Carthage/Checkouts/facebook-ios-sdk/scripts/build_framework.sh b/Carthage/Checkouts/facebook-ios-sdk/scripts/build_framework.sh
index 8c85d45..71f26a7 100755
--- a/Carthage/Checkouts/facebook-ios-sdk/scripts/build_framework.sh
+++ b/Carthage/Checkouts/facebook-ios-sdk/scripts/build_framework.sh
@@ -71,7 +71,7 @@ test -d "$FB_SDK_BUILD" \
   || die "Could not create directory $FB_SDK_BUILD"
 
 cd "$FB_SDK_ROOT"
-(xcodebuild -workspace "${FB_SDK_ROOT}"/FacebookSDK.xcworkspace -scheme "${SCHEME}" -configuration "${BUILDCONFIGURATION}" clean build) || die "Failed to build"
+(xcodebuild -workspace "${FB_SDK_ROOT}"/FacebookSDK.xcworkspace -scheme "${SCHEME}" -configuration "${BUILDCONFIGURATION}") || die "Failed to build"
 
 # -----------------------------------------------------------------------------
 # Run unit tests

There's a pretty high chance I'm doing something wrong here…

@vitorhugomagalhaes
Copy link

@jemartti I'm using hellofresh fork and it seems to work just fine.

@jemartti
Copy link

Okay, I got carthage build to complete using hellofresh/facebook-sdk-swift instead of facebook/facebook-sdk-swift. Now I'm not sure what to do about Bolts.framework.

I notice Bolts.framework is now built as a Static framework—at least, it's now in Build/iOS/Static/Bolts.framework. I deleted the existing Bolts.framework from Frameworks and dragged in the new Static Bolts.framework. I've also removed the two lines from the /usr/local/bin/carthage copy-frameworks Run Script corresponding to Bolts.

The app appears to build fine but crashes on startup:

dyld: Library not loaded: @rpath/Bolts.framework/Bolts
  Referenced from: /private/var/containers/Bundle/Application/EBF5973A-FFD9-4C6B-87C1-CA566FF232CF/fundu.app/Frameworks/FacebookCore.framework/FacebookCore
  Reason: image not found
(lldb) 

Any hints?

@chansen22
Copy link

@maclacerda 0.29 doesn't build on Xcode 10 afaik, so if you didn't build it with Xcode 9 previously you're out of luck now, since it seems Homebrew won't let you use an old version of Xcode. It sounds like @7Dman was running into the same thing I was here.

@mr-entrance
Copy link

@chansen22 Thank you for the additional explanation,. Yes I was building on Xcode 10 and was into the same problem as you mentioned.

@emirandm
Copy link

emirandm commented Oct 8, 2018

I am still having issue with it now in tvOS. I have the below set up in Cartfile, last 2 specify the tag or branch so it catches the latest fixes:

github "facebook/Facebook-SDK-Swift"
github "facebook/facebook-objc-sdk" "sdk-version-4.37.0"
github "BoltsFramework/Bolts-ObjC" "master"

it doesn't work with Carthage 0.29.0 or 0.31.0. I get the below message:

$ carthage update Facebook-SDK-Swift
*** Fetching facebook-objc-sdk
*** Checking out facebook-objc-sdk at "sdk-version-4.37.0"
*** Checking out Facebook-SDK-Swift at "0.4.0"
*** xcodebuild output can be found in /var/folders/w8/4wh_740x58vbpyb_19tgszf1j0lk18/T/carthage-xcodebuild.TEt4jT.log
*** Building scheme "Bolts-tvOS" in Bolts.xcodeproj
*** Building scheme "Bolts-iOS" in Bolts.xcodeproj
*** Building scheme "Bolts-iOS-Dynamic" in Bolts.xcodeproj
*** Building scheme "Bolts-macOS" in Bolts.xcodeproj
*** Building scheme "Bolts-watchOS-Dynamic" in Bolts.xcodeproj
*** Building scheme "Bolts-tvOS-Dynamic" in Bolts.xcodeproj
*** Building scheme "Bolts-watchOS" in Bolts.xcodeproj
*** Building scheme "Bolts-iOS" in FacebookSDK.xcworkspace
*** Building scheme "Bolts-macOS" in FacebookSDK.xcworkspace
*** Building scheme "Bolts-tvOS" in FacebookSDK.xcworkspace
*** Building scheme "Bolts-iOS-Dynamic" in FacebookSDK.xcworkspace
*** Building scheme "Bolts-tvOS-Dynamic" in FacebookSDK.xcworkspace
*** Building scheme "Bolts-watchOS" in FacebookSDK.xcworkspace
*** Building scheme "Bolts-watchOS-Dynamic" in FacebookSDK.xcworkspace
*** Building scheme "FBSDKCoreKit_TV-Dynamic" in FacebookSDK.xcworkspace
Build Failed
	Task failed with exit code 65:
	/usr/bin/xcrun xcodebuild -workspace /Users/eduardo/projectName/Carthage/Checkouts/facebook-objc-sdk/FacebookSDK.xcworkspace -scheme FBSDKCoreKit_TV-Dynamic -configuration Release -derivedDataPath /Users/eduardo/Library/Caches/org.carthage.CarthageKit/DerivedData/10.0_10A255/facebook-objc-sdk/sdk-version-4.37.0 -sdk appletvos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/w8/4wh_740x58vbpyb_19tgszf1j0lk18/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/eduardo/projectName/Carthage/Checkouts/facebook-objc-sdk)

with --platform iOS

$ carthage update Facebook-SDK-Swift --platform iOS
*** Fetching facebook-objc-sdk
*** Fetching Result
*** Checking out facebook-objc-sdk at "sdk-version-4.37.0"
*** Checking out Facebook-SDK-Swift at "0.4.0"
*** xcodebuild output can be found in /var/folders/w8/4wh_740x58vbpyb_19tgszf1j0lk18/T/carthage-xcodebuild.25SmAb.log
*** Building scheme "Bolts-iOS" in Bolts.xcodeproj
*** Building scheme "Bolts-iOS-Dynamic" in Bolts.xcodeproj
*** Building scheme "Bolts-iOS" in FacebookSDK.xcworkspace
*** Building scheme "Bolts-iOS-Dynamic" in FacebookSDK.xcworkspace
*** Building scheme "FBSDKCoreKit-Dynamic" in FacebookSDK.xcworkspace
Build Failed
	Task failed with exit code 65:
	/usr/bin/xcrun xcodebuild -workspace /Users/Eduardo/xxx/Carthage/Checkouts/facebook-objc-sdk/FacebookSDK.xcworkspace -scheme FBSDKCoreKit-Dynamic -configuration Release -derivedDataPath /Users/eduardo.miranda/Library/Caches/org.carthage.CarthageKit/DerivedData/10.0_10A255/facebook-objc-sdk/sdk-version-4.37.0 -sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/w8/4wh_740x58vbpyb_19tgszf1j0lk18/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/Eduardo/xxxx/Carthage/Checkouts/facebook-objc-sdk)

@tarangpatel
Copy link

So still no update on this issue ?
Is there any other way to use the SDK ?
I downloaded the Facebook SDKs - 4.37.0 from facebook developer site but I cannot archive it. It says the frameworks are not build with bitcode enabled.

@txaiwieser
Copy link

up

@mtfourregp
Copy link

Can we get an update on the progress of this issue?

@marktrobinson
Copy link

marktrobinson commented Oct 10, 2018

Anyone? I really wish commenting on an issue "bumped" it in Github. This is a pretty serious issue if people can't even install the SDK.

@chuganzy
Copy link

chuganzy commented Oct 10, 2018

The ObjC side issue has been already solved on master but not released yet.
You can just simply install the latest by manually overriding Cartfile.resolved. I suggest waiting for the official release though.

github "BoltsFramework/Bolts-ObjC" "1b247a7047546e9eecd36387a121977b53e2ea43"
github "facebook/facebook-objc-sdk" "347bbe3f5dd104ac578c866494ff02d25c3be61e" # I have not tested the latest master yet but this hash should work
github "facebook/facebook-sdk-swift" "0.4.0"

Note: Make sure to install Carthage 0.31.0 or later.

@pkarc
Copy link

pkarc commented Oct 11, 2018

I made a fork with an updated Cartfile with the working versions, you can use it by now, but as @chuganzy says its better to wait for the official releases.

github "pkarc/Facebook-SDK-Swift" "update-obj-v"

maybe its useful for you guys as a temporary solution. @mark-r2r

@marktrobinson
Copy link

marktrobinson commented Oct 11, 2018

cheers @pkarc

This currently works (note: i'm using swift-4.1 branch)

Carthage: 0.31.0
Xcode: 9.4.1
Swift: 4.1

// Cartfile.resolved
github "BoltsFramework/Bolts-ObjC" "1.9.0"
github "facebook/facebook-ios-sdk" "347bbe3f5dd104ac578c866494ff02d25c3be61e"
github "facebook/facebook-sdk-swift" "61d849ef884304c4414d51b3dae3cb2b5a7ee1ef"

The docs don't tell you that you also need to include FBSDKLoginKit.framework to get FacebookLogin to work

@mr-entrance
Copy link

@mtfourregp I feel like I've been waiting for this update forever. I think it would be great if we can get to know AT LEAST around when it's done. I hate to do this but I might have to use cocoapods to install this SDK although I haven't confirmed if it works perfectly with cocoapods.
I didn't expect that this SERIOUS issue have been left for a long time.

@mbuchetics
Copy link

It's Facebook, they don't have enough developers.

@codytwinton
Copy link
Contributor

Hey Everyone,

I'm sorry this remains an issue. We're a small team working on the SDKs and we're doing our best to resolve every issue that comes up.

I'll do my best to resolve this in the near future.

@artuan
Copy link

artuan commented Oct 14, 2018

Is there any other way to get it work without Carthage? I'm going to production next week and the client needs FB login :/

@tarangpatel
Copy link

@artuan For now you can use Xcode 9.4.1 and Swift 4.1 and go to production. Switch tool chain to Swift 4.1 to make Carthage work.

@pbyorke
Copy link

pbyorke commented Oct 15, 2018

It's all fine and well to say that there is but a small team working on the SDKs but really, folks, this has been out there in beta since June. This same thing happened to us last year, when the Xcode 9 upgrades weren't done in a timeley manner. I have a product to get out, this does not reflect well on the platform and with my management.

@vitorhugomagalhaes
Copy link

Hey Everyone,

My solution was to download the SDK and add it to my repo. It's not perfect but the show must go on :)

Thanks,

@mufumbo
Copy link

mufumbo commented Oct 15, 2018

hey guys, how's possible this issue is still happening after months and months? I got a new laptop and now I'm wasting hours again. It's incredible.

It's not just a bug in bolts or typos in released code. It seems more like a bigger issue at facebook management and engineers about not caring. Maybe they want to make it really difficult for other engineers to use their sdk for some reason? It's unbelievable. Unfortunately the quick solution is to disable non maintainable dangerous code from our app until this is fixed. It means leaving only google + twitter as login options. If things continue in this direction my guess is that they will be discontinuing facebook login sometime in the future, so why waste time on this?

@mr-entrance
Copy link

@codytwinton hey there. If that's possible, could you please tell us around when you guys will fix this issue? Is that gonna be in a few weeks, a few months or next year? It might be hard to tell us exact date but I'm sure all of us have been waiting for this update for a while and want to know a rough standard. Thank you in advance.

@codytwinton
Copy link
Contributor

@7Dman - I believe I've tracked down the underlying issue. Got an internal diff submitted that should land shortly. In process of testing.

Should hopefully have a fix landed for this by tomorrow, but should be fixed by next week at the latest.

@codytwinton
Copy link
Contributor

codytwinton commented Oct 18, 2018

@everyone - Version 0.5.0 has been published. I've tested use:

carthage build --no-skip-current

and I've added that command to the travis.yml build scripts. Everything should be resolved.

@Nonnus
Copy link

Nonnus commented Oct 18, 2018

@codytwinton just tested on my end, worked great!

@lemonandlime
Copy link

lemonandlime commented Oct 18, 2018

Hm trying it now and it comes further than before but seems to fail at the finish line.
Got this error when "Building scheme "FacebookCore" in FacebookSwift.xcworkspace"

Linting 'GraphRequestConnectionDelegateBridge.swift' (1/93) Could not cast value of type 'Swift.Int64' (0x1009c8f90) to 'Swift.String' (0x1009cf4e8). /Users/lemonandlime/Library/Caches/org.carthage.CarthageKit/DerivedData/10.0_10A255/facebook-sdk-swift/0.5.0/Build/Intermediates.noindex/ArchiveIntermediates/FacebookCore/IntermediateBuildFilesPath/FacebookSwift.build/Release-iphoneos/FacebookCore.build/Script-5257097220F6C9800053B9E3.sh: line 6: 60339 Abort trap: 6 swiftlint Command PhaseScriptExecution failed with a nonzero exit code

Im using latest Xcode and carthage 0.31.0

@codytwinton
Copy link
Contributor

@lemonandlime - This appears to be an issue with swiftlint configuration. Please open a new issue for this and we'll address it asap.

@txaiwieser
Copy link

Thank you!!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something is broken or being fixed objc sdk This issue is associate with underlying Objective-C SDK
Projects
None yet
Development

No branches or pull requests