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

SDK Does Not Work With Xcode 10.0- Swift 4.2 #267

Closed
sercesh opened this issue Sep 19, 2018 · 22 comments
Closed

SDK Does Not Work With Xcode 10.0- Swift 4.2 #267

sercesh opened this issue Sep 19, 2018 · 22 comments
Labels
bug Something is broken or being fixed

Comments

@sercesh
Copy link

sercesh commented Sep 19, 2018

Facebook Swift SDK Issue

Checklist

Environment

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

  • Xcode Version: 10.0.
  • Swift Version: 4.2.
  • Installation Platform & Verison: [Cocoapods] version SDK VERSION 4.35 --POD VERSION: 1.6.0.beta.1

Issue Details

  • Bugs: Header
    'FacebookCore-Swift.h' not found
    Could not build Objective-C module 'FacebookCore'

Goals

What do you want to achieve?

Continue working with my project. After XCode update Facebook SDK does not work.

Expected Results

Just Works

Actual Results

6 related issue with Facebook SDK

Steps to Reproduce

Just try a existing project with Cocoapods on XCode 10.0 - Swift 4.2

@StormKop
Copy link

I have a similar issue. Both FacebookCore and FacebookLogin have errors and I can't import them in my project using Cocoapods.

FacebookCore
screen shot 2018-09-20 at 7 13 39 am

FacebookLogin
screen shot 2018-09-20 at 7 13 49 am

@andschdk
Copy link

Until an update is available you can build using a legacy swift version. Using cocoa pods:

post_install do |installer|
    installer.pods_project.targets.each do |target|
        if ['FacebookCore', 'FacebookLogin'].include? target.name
            target.build_configurations.each do |config|
                config.build_settings['SWIFT_VERSION'] = '3.2'
            end
        end
    end
end

@wqz-leo
Copy link

wqz-leo commented Sep 20, 2018

Hi @andschdk, is there a way to build using Carthage?

@andschdk
Copy link

@wangqingzhouleo, I am not totally sure about Carthage. To get going I guess you can open the affected frameworks' project file (from Carthage/Checkouts/<framework-folder> and set the Swift Language Version config in Build Settings.

Then run carthage build to rebuild the frameworks with the new config.

@codytwinton
Copy link
Contributor

Work in progress currently. Hopefully support for Swift 4.2 should be released very shortly.

@codytwinton codytwinton added the bug Something is broken or being fixed label Sep 21, 2018
@muthukrishnanOCS
Copy link

Ok . i'm waiting for the new version

@sercesh
Copy link
Author

sercesh commented Sep 24, 2018

Hi, thank you @andschdk. I am closeing this issue.

@sercesh sercesh closed this as completed Sep 24, 2018
@codytwinton
Copy link
Contributor

New version has been released

@StormKop
Copy link

Thanks Cody! Appreciate the prompt response!

@StormKop
Copy link

Hi guys, I tried using pod install of FacebookCore and FacebookLogin but I'm receiving similar errors after the new version has been released.

@muthukrishnanOCS
Copy link

@StormKop Are you using the Cocoapods 1.6.0.beta.1?
If yes please go back to 1.5.3 then it should work or try pod update

@andschdk
Copy link

Remember to pod repo update.
I face no issues with the current version.

@StormKop
Copy link

@muthukrishnanOCS I'll have to check it out but I don't think so. Thanks for the advice!
@andschdk ahh! good point. I didn't do a pod repo update. All I did was to add the pods into my Podfile and did a pod install. Just out of curiosity, why should we do a pod repo update ? Thanks in advance.

@StormKop
Copy link

Thanks for the advice @muthukrishnanOCS and @andschdk. I was running on cocoa pods version 1.5.3 and I tried pod repo update but it didn't work.

I did a pod update and everything worked!

@Deg5112
Copy link

Deg5112 commented Oct 31, 2018

Guys I am running swift 4.2 on Xcode 10.. I have installed the following in my pod file

pod 'FacebookCore'
pod 'FacebookLogin'
pod 'FacebookShare'

then.. i try to import FacebookShare . ... and then it fails.. it does not even auto-complete the module name for me.. Any ideas? I see above this was fixed but is there any additional work that has to be done other than pod install and import? I have also pod repo update and pod update after i install and neither help

Thanks

@Deg5112
Copy link

Deg5112 commented Nov 1, 2018

nevermind.. after a couple hours of the painful troubleshooting.. it just started working, removed all pods... re-installed.. closed Xcode.. cleaned.. rebuilt.. annoying how inconsistent this is.. any tips lemme know, graci

@codytwinton
Copy link
Contributor

@Deg5112 - These issues could be related to Xcode 10, which uses the new Xcode build system by default. It is incompatible with the legacy build system and can cause a lot of ambiguous build errors.

@yesnoyes
Copy link

Login with swift 4.2 version of the SDK (library version 4.39.0) doesn't work. Always get this exception -
Error Domain=com.facebook.sdk.core Code=3 "(null)" UserInfo={com.facebook.sdk:FBSDKErrorDeveloperMessageKey=Unknown error building URL.})

@MarkusCosta
Copy link

@yesnoyes I have the same error, did you solve the problem?

@MarkusCosta
Copy link

Solution: #301

@babuiglesiaskhan
Copy link

babuiglesiaskhan commented Dec 18, 2018

I was using 9.2 xcode but I just updated and after updated with 10.1 xcode I also update Usabilla sdk(previous 4.0 and now 5.0) but When I try to archive I got an error. And didn't get any solution.

screen shot 2018-12-18 at 12 52 51 pm

@yesnoyes
Copy link

yesnoyes commented Dec 18, 2018

@babuiglesiaskhan This Ticket is for the bug related to Facebook login. However I can give you a clue to narrow down your problem -
First you should remove the Usabilla sdk's implementation from your code and test if "import usabilla" works at the first place, if it doesn't work, you should report it to usabilla developers community.
If "import usabilla" doesn't give you any error, there is possibility that with their new sdk they may have changed the implementation code.

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
Projects
None yet
Development

No branches or pull requests

10 participants