-
Notifications
You must be signed in to change notification settings - Fork 335
Swift 3 Support #53
Comments
+1 |
hey community, is anyone using a known swift3 fork? Has anyone tried running through the conversion tool for this project yet? |
@rromanchuk I saw that you forked the project and created the branch swift3, it's working ? |
@guitcastro i gave it a try, but couldn't get it to build. I don't know the project very well so I gave up as i'm too busy right now to debug this SDK. I'm just ripping this out for now. |
I've got a working Swift 3 branch here, it compiles and runs the sample app but Facebook login won't work on iOS 10 (it works fine on iOS 9.3 and lower) due to this bug. I don't have a personal Apple developer account to use to enable keychain sharing for the workaround but I guess that would fix the issue on iOS 10. |
definitely don't try auto convert, cuz it doesn't build. I just gave it a try since apple pushed out the latest XCode. Tons of compile errors and general breakage. |
Nasty surprise for anyone that upgrades XCode to the latest. Even if you don't upgrade (ie convert to swift 3), you won't be able to build your app. I tried setting swift legacy setting in build settings, but the pod doesn't have the setting. Anyone know of a work around for building the pods with legacy swift? |
the fix is to add post_install do |installer| then run "pods install" to update the workspace. Close the workspace, re-open, clean and build. |
what about swift 3.0 and Carthage? |
until Facebook officially supports swift 3.0, I would advise sticking with 2.3 and update the podfile settings. I tried auto-convert and it blew up horribly. That wasted about 4 hours on wednesday that I'll never get back. |
+1 |
@gerbiljames Is your sample app written in Swift 3.0? Can you upload your sampleapp.xcworkspace? I have a developer account and I could enable keychain sharing. |
@woolfel I am using Xcode 8 (not beta), and I find the legacy setting in pod building setting. |
@EvsenevDev There is also a linkage error if your pod and your app are of different swift versions.
|
I'm using version 8 (8A218a) to be exact.
That's should set your project to use swift 2.3. You still need to update your podfile to update the facebook sdk to use swift 2.3. If you don't update the podfile and run pods install, the facebook projects won't use swift 2.3 and you'll get build errors. hope that helps |
@woolfel with Swift 2.3 all ok. I think we speak about Swift 3.0. Swift 3.0 not support module compiled in Swift 2.3. Faceebook SDK works with Swift 2.3. Project on Swift 3.0 cant work with facebook sdk. For example, if you want use Alamofire => 4.0.0 (support Swift 3.0) and FacebookSDK, your project cant build. |
@tengpeng It's just the sample app in the fork I linked, translated it to Swift 3 as well when I translated the library. |
I've got a PR open for Swift 3 support at #55. As of yet doesn't seem to have been looked at. My advice to anyone wanting to use Xcode 8 would be to use Swift 2.3 for now, I've had no trouble with CocoaPods 1.1.0.rc.2, it seems to set |
@EvsenevDev - I didn't have any luck with XCode auto-convert from 2.3 to 3.0. As gerbiljames says, if you really need Swift 3.0 due to other libraries/dependencies, you're out of luck. My project doesn't use any other libraries that requires 3.0, so I'm ok with 2.3 for now. |
@gerbiljames Found it! I am having trouble getting the Pod work. My Podfile
|
Unfortunately, I had to install a lower version of Alomofire to work. source 'https://github.com/CocoaPods/Specs.git' target 'Test' do Comment this line if you're not using Swift and don't want to use dynamic frameworksuse_frameworks!
end post_install do |installer| |
I was able to successfully get Facebook to work with Swift 3 by just using their Objective-c pod. You'll also need to change your build options in your project to $(inherited) for Always Embed Swift Standard Libraries and also allow Keychain sharing in the capabilities menu of your xcode project:
|
Hey guys, Sorry for quite a delay in updating to Swift 3.0, got tangled in few other things/projects. I am going to take a look at the #55 tomorrow morning in detail and either accept/leave review or, most likely, just re-run the migration and update everything in the repo for Swift 3.0 with a new PR, so we can move fast 😁 After that, do a round of testing and update the sample app that we've got. Long story short: Expect an update sometime next week or so for Swift 3.0. |
No description provided.
The text was updated successfully, but these errors were encountered: