Parse-sdk-ios-osx: No known class method for selector 'taskWithException:'

Created on 11 Jan 2018  Â·  15Comments  Â·  Source: parse-community/Parse-SDK-iOS-OSX

Hi,

I am having the following issue in my objective c project. No known class method for selector 'taskWithException:' please help.
screen shot 2018-01-12 at 7 45 43 pm

All 15 comments

Please update to the lastest version of the SDK or pin Bolts to the 1.8.4 version to resolve the issue.

I got the same error with :

Parse 1.16.0,
ParseFacebookUtilsV4 1.11.1,
ParseLiveQuery 2.3.0,
Bolts 1.9.0

After a Pod Update

@JulienLevallois , you should replace ParseFacebookUtilsV4 by Parse/FacebookUtils

Okay perfect, thanks

This repo ? https://github.com/parse-community/ParseFacebookUtils-iOS

its always " pod 'ParseFacebookUtilsV4' "

yeah but ParseFacebookUtils is deprecated now, and we merged the code into the Parse SDK repository

Starting 1.6.0, the Parse SDK distributes the Facebook, Twitter and UI as subspecs

https://github.com/parse-community/Parse-SDK-iOS-OSX/blob/master/README.md

Hi. Sorry I am new to this. every time I try to install the pod Parse/FacebookUtils it tells me

"Specs satisfying the Parse/FacebookUtils dependency were found, but they required a higher minimum deployment target."

my pod file looks like this

Uncomment the next line to define a global platform for your project

platform :ios, '9.0'

target 'Barbershop' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!

# Pods for Barbershop

pod 'Parse'
pod 'Parse/FacebookUtils'
pod 'Parse/TwitterUtils'

target 'BarbershopTests' do
inherit! :search_paths
# Pods for testing
end

end

any help would be greatly appreciated

@flovilmart I replaced the ParseFacebookUtilsV4 pod with
pod ‘Parse/FacebookUtils’ as you said, but I'm getting the following error messages:

$ pod install
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "FBSDKCoreKit":
  In snapshot (Podfile.lock):
    FBSDKCoreKit (= 4.31.1)

  In Podfile:
    FBSDKLoginKit was resolved to 4.31.1, which depends on
      FBSDKCoreKit

    FBSDKShareKit was resolved to 4.31.1, which depends on
      FBSDKCoreKit (~> 4.31.1)

    Parse/FacebookUtils was resolved to 1.17.1, which depends on
      FBSDKCoreKit (~> 4.28.0)

See podfile below:

platform :ios, '8.3'
use_frameworks!
    pod 'Parse'
    pod 'Parse/UI'
    pod 'Parse/FacebookUtils'
    pod 'FBSDKCoreKit'
    pod 'FBSDKLoginKit'
    pod 'FBSDKShareKit'

Note: I tried a higher deployment target by setting the podfile to platform :ios, '8.3' but got the same error.

remove those lines:

pod 'FBSDKCoreKit' pod 'FBSDKLoginKit' pod 'FBSDKShareKit'  

@flovilmart thanks for the quick response. I actually got rid of those errors without removing those 3 lines.
1) Are you saying that pod 'Parse/FacebookUtils' covers those 3 lines basically?

In either case, I am now getting the following Xcode error in my Bridging Header file:
'ParseUI/ParseUI.h' file not found

2) Do I also need to remove all the import ParseFacebookUtils and import ParseUI statements in my Xcode swift files as it will be available part of the import Parse imports?

Are you saying that pod 'Parse/FacebookUtils' covers those 3 lines basically?

The faceook utils subspec has for dependency the FBSDK utils. So you should be good. in doubt, you can also pin the FBSDK dependencies to the same version FacebookUtils is expecting them. We'll update soon with the FBSDK dependencies bumped to the latest versions.

Do I also need to remove all the import ParseFacebookUtils and import ParseUI statements in my Xcode swift files as it will be available part of the import Parse imports?

Thanks to the subspec magic a single @import Parse should be enough now.

@flovilmart Got it. But after doing what you said I still have the error, 'ParseUI/ParseUI.h' file not found

How can I fix this error?

You don’t need that import, where does it come from!

@flovilmart Thanks, that fixes that error. Originally, it was needed inside the bridging header file to expose any of the Objective-C files to my Swift project. So I assume installing the latest pod 'Parse', pod 'Parse/UI', and pod 'Parse/FacebookUtils' in my Podfile means I can remove the all the following from my bridging header too? In other words, the latest Parse SDK removes the need for a bridging header file?:

#import <Parse/Parse.h>
#import <Parse/PFSubclassing.h>
#import <ParseUI/ParseUI.h>
#import <ParseFacebookUtilsV4/PFFacebookUtils.h>
#import <Bolts/Bolts.h>
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#import <FBSDKLoginKit/FBSDKLoginKit.h>

I'm migrating to Swift 4 so I'm seeing many Xcode errors related to the Parse iOS SDK. Does the current latest Parse SDK (1.17.1) not have support Swift 4? Do I just manually use the Fix It shortcuts in Xcode to update the Parse-related code?

Reference to generic type 'PFQuery' requires arguments in <...>
Insert '<PFObject>'
'currentUser()' has been renamed to 'current()'
'currentUser()' was obsoleted in Swift 3

The current SDK is still written in objective c so what you see here is the natural transition of the generated swift interfaces

Was this page helpful?
0 / 5 - 0 ratings