asked    Adela     2018-07-26       swift       280 view        1 Answer

[SOLVED] Xcode 10 FBSDK 'SDKLoggingBehavior

I have updated to Xcode 10 and and am unable to compile my code. I get the following error from the Facebook SDK (FacebookCore).

Argument type 'SDKLoggingBehavior?' does not conform to expected type 'Sequence'

On line

return Set(behaviors)

I have installed the lastest FBSDK using cocoapods.

How would I go about resolving this or is it a case of waiting for an updated SDK from FB?

extension SDKSettings {
       Current logging behaviors of Facebook SDK.
       The default enabled behavior is `.DeveloperErrors` only.
      public static var enabledLoggingBehaviors: Set<SDKLoggingBehavior> {
        get {
          let behaviors = FBSDKSettings.loggingBehavior().flatMap { object -> SDKLoggingBehavior? in
            if let value = object as? String {
              return SDKLoggingBehavior(sdkStringValue: value)
            return nil
          return Set(behaviors)
        set {
          let behaviors ={ $0.sdkStringValue })

       Enable a particular Facebook SDK logging behavior.

       - parameter behavior: The behavior to enable
      public static func enableLoggingBehavior(_ behavior: SDKLoggingBehavior) {

       Disable a particular Facebook SDK logging behavior.

       - parameter behavior: The behavior to disable.
      public static func disableLoggingBehavior(_ behavior: SDKLoggingBehavior) {

  1 Answer  

        answered    Harry     2018-07-26      

This is fixed in the latest release, 0.3.1 (as of June 8th, 2018).

Old answer:

This is fixed in the latest master, but not in the latest tag or Cocoapod release.

To use this, clone the code directly from the master branch into your project from the Swift SDK repo, or change your podfile to point to master:

pod 'FacebookCore', :git => '', :branch => 'master'

The pull request that fixed this issue can be found here.

Your Answer

 2018-07-26         Sean

What is the best place to add AVPlayer or MPMoviePlayerController in UITableViewCell?

I try to play video in UITableViewCell when a user clicks on play button in cell.Add AVPlayer or MPMoviePlayerController in cellForRowAtIndexPath (will add player everytime when tableview is scrolling)Add AVPlayer or MPMoviePlayerController on button click (clicked video play in another cell while scrolling)I am confused where to add the player in UITableViewCell so that when I click to play one video, other are paused or stopped. - (void)awakeFromNib { [super awakeFromNib]; // Initialization code self.player = [[AVPlayer alloc] init]; self.playerLayer = [AVPla...
 ios                     2 answers                     85 view
 2018-07-26         Doreen

How to get MPMoviePlayerViewController current Playing time?

I want to get current video playing time, not total duration.My code is [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(MPMoviePlayerLoadStateDidChange:) name:MPMoviePlayerLoadStateDidChangeNotification object:nil];- (void)MPMoviePlayerLoadStateDidChange:(NSNotification *)notification { if ((self.moviePlayer.loadState & MPMovieLoadStatePlaythroughOK) == MPMovieLoadStatePlaythroughOK) { NSLog(@"conte...
 ios                     2 answers                     85 view
 2018-07-26         Zoe

Facebook OAuth login problem with Facebook SDK 2.0

I am developing an iPhone application that deals with Facebook. I am using the latest SDK facebook-facebook-ios-sdk-cf1c2c3 (SDK 2.0) to allow the user to login to Facebook account using OAuth.User can login without any problem in device iPod Touch(4.3.1). But in iPhone 3GS I get the following error:Error Domain=NSURLErrorDomain Code=-1202 "The certificate for this server is invalid. You might be connecting to a server that is pretending to be \\u201d which could put your confidential information at risk." UserInfo=0x1b8350 {NSErrorFailingURLStringKey=htt...
 iphone                     1 answers                     83 view