facebookarchive / facebook-swift-sdk

Integrate your iOS apps in Swift with Facebook Platform.
https://developers.facebook.com/docs/swift
Other
1.51k stars 336 forks source link

Carthage build fails with Xcode 10.2 #330

Closed vrutberg closed 5 years ago

vrutberg commented 5 years ago

Checklist

Environment

Describe your dev environment here, giving as many details as possible. If you have them, make sure to include:

Goals

I want to rebuild my Carthage dependencies using Xcode 10.2.

Expected Results

I expect the project to build.

Actual Results

/Users/kilroy/code/ios-dependencies/Carthage/Checkouts/facebook-sdk-swift/Carthage/Checkouts/facebook-objc-sdk/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h:33:19: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
FOUNDATION_EXPORT NSNotificationName const FBSDKAppEventsLoggingResultNotification;
                  ^
/Users/kilroy/code/ios-dependencies/Carthage/Checkouts/facebook-sdk-swift/Carthage/Checkouts/facebook-objc-sdk/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h:33:38: note: insert '_Nullable' if the pointer may be null
FOUNDATION_EXPORT NSNotificationName const FBSDKAppEventsLoggingResultNotification;
                                     ^
                                           _Nullable
/Users/kilroy/code/ios-dependencies/Carthage/Checkouts/facebook-sdk-swift/Carthage/Checkouts/facebook-objc-sdk/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h:33:38: note: insert '_Nonnull' if the pointer should never be null
FOUNDATION_EXPORT NSNotificationName const FBSDKAppEventsLoggingResultNotification;
                                     ^
                                           _Nonnull
/Users/kilroy/code/ios-dependencies/Carthage/Checkouts/facebook-sdk-swift/Carthage/Checkouts/facebook-objc-sdk/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h:700:13: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
+ (NSString *)getUserData;
            ^
/Users/kilroy/code/ios-dependencies/Carthage/Checkouts/facebook-sdk-swift/Carthage/Checkouts/facebook-objc-sdk/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h:700:13: note: insert '_Nullable' if the pointer may be null
+ (NSString *)getUserData;
            ^
             _Nullable
/Users/kilroy/code/ios-dependencies/Carthage/Checkouts/facebook-sdk-swift/Carthage/Checkouts/facebook-objc-sdk/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h:700:13: note: insert '_Nonnull' if the pointer should never be null
+ (NSString *)getUserData;
            ^
             _Nonnull
/Users/kilroy/code/ios-dependencies/Carthage/Checkouts/facebook-sdk-swift/Carthage/Checkouts/facebook-objc-sdk/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h:714:44: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
+ (void)updateUserProperties:(NSDictionary *)properties handler:(FBSDKGraphRequestHandler)handler;
                                           ^
/Users/kilroy/code/ios-dependencies/Carthage/Checkouts/facebook-sdk-swift/Carthage/Checkouts/facebook-objc-sdk/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h:714:44: note: insert '_Nullable' if the pointer may be null
+ (void)updateUserProperties:(NSDictionary *)properties handler:(FBSDKGraphRequestHandler)handler;
                                           ^
                                            _Nullable
/Users/kilroy/code/ios-dependencies/Carthage/Checkouts/facebook-sdk-swift/Carthage/Checkouts/facebook-objc-sdk/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h:714:44: note: insert '_Nonnull' if the pointer should never be null
+ (void)updateUserProperties:(NSDictionary *)properties handler:(FBSDKGraphRequestHandler)handler;
                                           ^
                                            _Nonnull
/Users/kilroy/code/ios-dependencies/Carthage/Checkouts/facebook-sdk-swift/Carthage/Checkouts/facebook-objc-sdk/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h:714:66: error: block pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
+ (void)updateUserProperties:(NSDictionary *)properties handler:(FBSDKGraphRequestHandler)handler;
                                                                 ^
/Users/kilroy/code/ios-dependencies/Carthage/Checkouts/facebook-sdk-swift/Carthage/Checkouts/facebook-objc-sdk/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h:714:66: note: insert '_Nullable' if the block pointer may be null
+ (void)updateUserProperties:(NSDictionary *)properties handler:(FBSDKGraphRequestHandler)handler;
                                                                 ^
                                                                                          _Nullable 
/Users/kilroy/code/ios-dependencies/Carthage/Checkouts/facebook-sdk-swift/Carthage/Checkouts/facebook-objc-sdk/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h:714:66: note: insert '_Nonnull' if the block pointer should never be null
+ (void)updateUserProperties:(NSDictionary *)properties handler:(FBSDKGraphRequestHandler)handler;
                                                                 ^
                                                                                          _Nonnull 
/Users/kilroy/code/ios-dependencies/Carthage/Checkouts/facebook-sdk-swift/Carthage/Checkouts/facebook-objc-sdk/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h:726:43: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
+ (void)augmentHybridWKWebView:(WKWebView *)webView;
                                          ^
/Users/kilroy/code/ios-dependencies/Carthage/Checkouts/facebook-sdk-swift/Carthage/Checkouts/facebook-objc-sdk/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h:726:43: note: insert '_Nullable' if the pointer may be null
+ (void)augmentHybridWKWebView:(WKWebView *)webView;
                                          ^
                                           _Nullable
/Users/kilroy/code/ios-dependencies/Carthage/Checkouts/facebook-sdk-swift/Carthage/Checkouts/facebook-objc-sdk/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h:726:43: note: insert '_Nonnull' if the pointer should never be null
+ (void)augmentHybridWKWebView:(WKWebView *)webView;
                                          ^
                                           _Nonnull

CompileC /Users/kilroy/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10P99q/facebook-sdk-swift/0.5.0/Build/Intermediates.noindex/ArchiveIntermediates/FacebookCore/IntermediateBuildFilesPath/FBSDKCoreKit.build/Release-iphoneos/FBSDKCoreKit-Dynamic.build/Objects-normal/armv7/FBSDKUtility.o /Users/kilroy/code/ios-dependencies/Carthage/Checkouts/facebook-sdk-swift/Carthage/Checkouts/facebook-objc-sdk/FBSDKCoreKit/FBSDKCoreKit/FBSDKUtility.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target: FBSDKCoreKit-Dynamic)
    cd /Users/kilroy/code/ios-dependencies/Carthage/Checkouts/facebook-sdk-swift/Carthage/Checkouts/facebook-objc-sdk/FBSDKCoreKit
    export LANG=en_US.US-ASCII
    /Users/kilroy/Downloads/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -fmodules-cache-path=/Users/kilroy/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10P99q/facebook-sdk-swift/0.5.0/ModuleCache.noindex -fno-autolink -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/kilroy/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10P99q/facebook-sdk-swift/0.5.0/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -fmodule-name=FBSDKCoreKit -Wno-trigraphs -fpascal-strings -Os -fno-common -Werror -Wno-missing-field-initializers -Wmissing-prototypes -Wdocumentation -Wunreachable-code -Wno-implicit-atomic-properties -Wno-objc-interface-ivars -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wduplicate-method-match -Wmissing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wshadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -DDEBUG=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Users/kilroy/Downloads/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -miphoneos-version-min=8.0 -g -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -fembed-bitcode -iquote /Users/kilroy/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10P99q/facebook-sdk-swift/0.5.0/Build/Intermediates.noindex/ArchiveIntermediates/FacebookCore/IntermediateBuildFilesPath/FBSDKCoreKit.build/Release-iphoneos/FBSDKCoreKit-Dynamic.build/FBSDKCoreKit-generated-files.hmap -I/Users/kilroy/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10P99q/facebook-sdk-swift/0.5.0/Build/Intermediates.noindex/ArchiveIntermediates/FacebookCore/IntermediateBuildFilesPath/FBSDKCoreKit.build/Release-iphoneos/FBSDKCoreKit-Dynamic.build/FBSDKCoreKit-own-target-headers.hmap -I/Users/kilroy/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10P99q/facebook-sdk-swift/0.5.0/Build/Intermediates.noindex/ArchiveIntermediates/FacebookCore/IntermediateBuildFilesPath/FBSDKCoreKit.build/Release-iphoneos/FBSDKCoreKit-Dynamic.build/FBSDKCoreKit-all-non-framework-target-headers.hmap -ivfsoverlay /Users/kilroy/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10P99q/facebook-sdk-swift/0.5.0/Build/Intermediates.noindex/ArchiveIntermediates/FacebookCore/IntermediateBuildFilesPath/FBSDKCoreKit.build/Release-iphoneos/FBSDKCoreKit-Dynamic.build/all-product-headers.yaml -iquote /Users/kilroy/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10P99q/facebook-sdk-swift/0.5.0/Build/Intermediates.noindex/ArchiveIntermediates/FacebookCore/IntermediateBuildFilesPath/FBSDKCoreKit.build/Release-iphoneos/FBSDKCoreKit-Dynamic.build/FBSDKCoreKit-project-headers.hmap -I/Users/kilroy/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10P99q/facebook-sdk-swift/0.5.0/Build/Intermediates.noindex/ArchiveIntermediates/FacebookCore/BuildProductsPath/Release-iphoneos/include -I/Users/kilroy/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10P99q/facebook-sdk-swift/0.5.0/Build/Intermediates.noindex/ArchiveIntermediates/FacebookCore/IntermediateBuildFilesPath/FBSDKCoreKit.build/Release-iphoneos/FBSDKCoreKit-Dynamic.build/DerivedSources-normal/armv7 -I/Users/kilroy/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10P99q/facebook-sdk-swift/0.5.0/Build/Intermediates.noindex/ArchiveIntermediates/FacebookCore/IntermediateBuildFilesPath/FBSDKCoreKit.build/Release-iphoneos/FBSDKCoreKit-Dynamic.build/DerivedSources/armv7 -I/Users/kilroy/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10P99q/facebook-sdk-swift/0.5.0/Build/Intermediates.noindex/ArchiveIntermediates/FacebookCore/IntermediateBuildFilesPath/FBSDKCoreKit.build/Release-iphoneos/FBSDKCoreKit-Dynamic.build/DerivedSources -F/Users/kilroy/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10P99q/facebook-sdk-swift/0.5.0/Build/Intermediates.noindex/ArchiveIntermediates/FacebookCore/BuildProductsPath/Release-iphoneos -fembed-bitcode -MMD -MT dependencies -MF /Users/kilroy/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10P99q/facebook-sdk-swift/0.5.0/Build/Intermediates.noindex/ArchiveIntermediates/FacebookCore/IntermediateBuildFilesPath/FBSDKCoreKit.build/Release-iphoneos/FBSDKCoreKit-Dynamic.build/Objects-normal/armv7/FBSDKUtility.d --serialize-diagnostics /Users/kilroy/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10P99q/facebook-sdk-swift/0.5.0/Build/Intermediates.noindex/ArchiveIntermediates/FacebookCore/IntermediateBuildFilesPath/FBSDKCoreKit.build/Release-iphoneos/FBSDKCoreKit-Dynamic.build/Objects-normal/armv7/FBSDKUtility.dia -c /Users/kilroy/code/ios-dependencies/Carthage/Checkouts/facebook-sdk-swift/Carthage/Checkouts/facebook-objc-sdk/FBSDKCoreKit/FBSDKCoreKit/FBSDKUtility.m -o /Users/kilroy/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10P99q/facebook-sdk-swift/0.5.0/Build/Intermediates.noindex/ArchiveIntermediates/FacebookCore/IntermediateBuildFilesPath/FBSDKCoreKit.build/Release-iphoneos/FBSDKCoreKit-Dynamic.build/Objects-normal/armv7/FBSDKUtility.o

** ARCHIVE FAILED **

The following build commands failed:
    CompileC /Users/kilroy/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10P99q/facebook-sdk-swift/0.5.0/Build/Intermediates.noindex/ArchiveIntermediates/FacebookCore/IntermediateBuildFilesPath/FBSDKCoreKit.build/Release-iphoneos/FBSDKCoreKit-Dynamic.build/Objects-normal/armv7/FBSDKViewImpressionTracker.o /Users/kilroy/code/ios-dependencies/Carthage/Checkouts/facebook-sdk-swift/Carthage/Checkouts/facebook-objc-sdk/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKViewImpressionTracker.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

Steps to Reproduce

Build version 0.5.0 with Carthage.

Code Samples & Details

carthage-xcodebuild.T3DXBQ.log.zip

AndreyPoznyak commented 5 years ago

is it going to be fixed? Experiencing the same issue for 0.5.0

mpiechocki commented 5 years ago

Is there anything happening with it? Now, with official releases of xcode 10.2 and swift 5 it's kinda... urgent :D

coanag commented 5 years ago

Has anybody found any solution to this? Any suggestions?

vrutberg commented 5 years ago

No, unfortunately not. Waiting for Facebook to fix it I guess.

kabyshev commented 5 years ago

Removed facebook-swift-sdk and left only an objc version.

Nonnus commented 5 years ago

@codytwinton any info about this? once again, an update of Xcode is out and you guys are not ready for it, I am not trying to be rude but you guys really need to step up a little bit, as it feels like you are not taking very seriously the task of maintaining your sdk, I can understand that maintaining the mobile sdks has probably very little business value for facebook and might be quite low on your priorities list but if you decided to provide them then you should make sure to keep them properly, which is not the case, at all:

ps: it really makes no sense that we are already on a stage where Xcode is being automatically updated and your sdk is creating all these issues, effectively blocking any developer that uses your sdk from being able to even build their app without removing your sdk

pps: needless to say that if it was up to me, facebook sdk would be gone from my company app asap as its ongoing development and reliability cannot be trusted

rpassis commented 5 years ago

Building from master (current commit 0988e028012293e373b60946596e6076e281c640) seems to be working for those who are desperate. This is for the facebook-objc-sdk by the way.

github "facebook/facebook-ios-sdk" "0988e028012293e373b60946596e6076e281c640" 
Gujci commented 5 years ago

Building from master (current commit 0988e028012293e373b60946596e6076e281c640)

I have tried building from master, but the sha there is c4cf89fa8a1faa6b966d4eb857c495b840567f64, since you have wrote this 14 hours ago, and the last commit was 23 days ago I might have overlooked something. Anyway, it is still not building.

I had to open the checked out project, and fix errors manually. Now, it compiles. I did not take my time time to look further to it.

coanag commented 5 years ago

I also opened the project facebook-sdk-swift from checkouts while downloading from carthage and fixed the errors ( 3 seconds job ) before the final build and managed to succeed. Thanks facebook 👍 but still waiting for the official fix..

cdeust commented 5 years ago

I've opened a pull request with a fix, waiting on review

codytwinton commented 5 years ago

@cdeust - Thanks for submitting! I've added a review. Once a few questions are worked through, I'll approve!

380 is the PR, for those following.

lisenkoo-hyuna commented 5 years ago

I temporarily solved the problem to run the sdk in Xcode 10.2:

Podfile: // Added this lines pod 'Bolts', :modular_headers => true pod 'FBSDKCoreKit', :modular_headers => true pod 'FBSDKLoginKit', :modular_headers => true pod 'FBSDKShareKit', :modular_headers => true pod 'FacebookCore' pod 'FacebookLogin' pod 'FacebookShare'

Cartfile:

// Removed -> github "facebook/facebook-sdk-swift" github "facebook/facebook-objc-sdk"

Also added a link to the FBSDKCoreKit.framework from the Carthage build folder

cdeust commented 5 years ago

I'm working on updating the project to work with current master version of facebook-objc-sdk on a side branch. Will update the pull request as soon as I'm sure the fix is working fine

codytwinton commented 5 years ago

Version 0.6.0 was just released for Carthage and Cocoapods with support for Xcode 10.2 and Swift 5.0.

SebastianBO commented 5 years ago

Still problems?