Pinterest SDK: "PDKClient not found", what's wrong? - ios

I'm trying to implement Pinterest SDK into my Swift project. I've followed this install guide: https://developers.pinterest.com/docs/sdks/ios/
I just can't get this line working:
PDKClient.configureSharedInstanceWithAppId("0000")
It keeps on resulting to Use of unresolved identifier PDKClient
What should I do?

You need to import the PinterestSDK in the class (I guess AppDelegate, right?).
So, at the top of AppDelegate, add
import PinterestSDK
Then it should find the PDKClient object.

Related

Customising Firebase Crashlytics crash reports

I am trying to customise Firebase Crashlytics reports by adding a couple of custom keys. I followed instructions from https://firebase.google.com/docs/crashlytics/customize-crash-reports?platform=ios
The iOS app is based on React Native. I have added dollowing in one of the methods of RNSPlashScreen.m:
[[FIRCrashlytics crashlytics] setCustomValue:templateVersion forKey:#"template_version"];
But I get following error:
Use of undeclared identifier 'FIRCrashlytics'
I tried adding:
#import FirebaseCrashlytics;
But then another error popped up:
Module 'FirebaseCrashlytics' not found
Although I can confirm that I have followed all steps as mentioned in the documentation and I am able to get the crash reports in Firebase console. I have also added use_frameworks! in my podfile.
I am facing issues in adding customer keys for the more detailed reporting. Any help will be appreciated.
I managed to make it work. Let me start by saying, I'm a newbie in iOS development. I was adding the tracking code in SplashScreen which was the primary concern I believe. I moved it to RootView class and it solved the issue.
About the import error, Replacing #import FirebaseCrashlytics; with #import "FIRCrashlytics.h" did the trick.
Let me know if anyone has any suggestion or comment on the same.

OAuthProvider for Twitter iOS Log In with Firebase has wrong constructor

I am using the following tutorial to implement Twitter log in for an iOS app: https://firebase.google.com/docs/auth/ios/twitter-login.
I follow all the steps & when I get to var provider = OAuthProvider(providerID: "twitter.com"), Xcode is not happy. I get Argument passed to call that takes no arguments.
I am importing Firebase and installing the Pods as shown.
Any idea on what could be going wrong? Thanks!
I had already face the same problem, and it was solved by updating Firebase/Auth by Pod
pod update

Failed importing Facebook SDK in Swift 4.x

I've tried to import Facebook SDK for App Events and tracking of App Installs through Facebook ADS and it's being impossible to do it.
I've done it with CocoaPods using:
pod 'FacebookCore'
as the Facebook official tutorial says.
After that, Facebook Analytics has detected me as a New unique user, so that is great 👍.
The problem is when I try to add an APP Event like so:
AppEventsLogger.log("Opened App Main VC");
And then this ERROR 🔴 appears:
Use of unresolved identifier 'AppEventsLogger'
Apart from this, also it's not detecting AppEventsLogger in the AppDelegate with the same error:
AppEventsLogger.activate(application)
I've imported in the VC and in the AppDelegate this modules/libraries:
import FacebookCore //in theory is just this one
import FBSDKCoreKit
So any tip or help is very welcomed! 😊
Two Imports
import FacebookCore
import FBSDKCoreKit
In AppDelegate
func applicationDidBecomeActive(_ application: UIApplication) {
AppEvents.activateApp()
}
When you want to log an event:
AppEvents.logEvent(AppEvents.Name.init(rawValue: "Opened App Main VC"))
For another type of AppEvents, you can refer to this
The problem is AppEventsLogger is changed to AppEvents. So change the name of AppEventsLogger and it will work fine. This is a new update in Facebook sdk.

SWIFT 2: Class ViewController has no initializers - Using GOOGLE's Admob

I was following a Youtube tutorial to learn how to use Google's AdMob with Swift on XCode: https://www.youtube.com/watch?v=tJi-vQ9e-HI
I got an error saying that my class "ViewController" has no identifiers.
It had worked just fine for the guy on Youtube, we put in the same frameworks, imported the same frameworks, wrote the same code. The only difference I believe is that he was developing for iOS 9.1 while I was doing it for 9.3.
The picture linked below has my code for the ViewController.swift file and I do not know what is wrong with it.
Any help is appreciated.
Thanks!
ViewController.swift
You didn't initialize the banner before loading the view, you have to make sure it exists. So this should fix it:
var adBanner: GADBannerView!

Parse SDK: Error in PFQueryTableViewController.h

I downloaded the latest Parse SDK for iOS. In my project I created a new UITableViewController class and subclassed PFQueryTableViewController. When trying to run the project I get 26 issues in the PFQueryTableViewController.h. If I remove my controller the error goes away. Any ideas why this is happening. Thanks in Advance.

Resources