Why does my PFAnalytics not have trackAppOpeneWithLaunchOptions function? (IOS SWIFT)
The method is declared to return a BFTask *
object, which is part of the Bolts framework. Make sure your project is linking the Bolts framework, and then add
#import <Bolts/Bolts.h>
to your bridging header.
This solved a few "missing" APIs in Swift for me (this one, as well as PFObject.saveInBackground
mentioned here: PFObject does not have a member named 'saveInBackground' in Xcode 6.0.1, Yosemite GM3
Try
PFAnalytics.trackAppOpenedWithLaunchOptionsInBackground(launchOptions, block: nil)
instead of
PFAnalytics.trackAppOpenedWithLaunchOptions()
No need for bridging headers since release 1.0. To fix the issue, just add, import Bolts
at the top of your AppDelegate
as such:
import UIKitimport Parseimport Bolts@UIApplicationMainclass AppDelegate: UIResponder, UIApplicationDelegate{ ...}