Differences BW Facebook Login and FBSDKLoginKit Pod and which one to use? - ios

I was trying to integrate facebook login in my iOS app. I am reading the official docs for this purpose.
On this getting started link. Documentation say to use the following pods
pod 'FacebookCore'
pod 'FacebookLogin'
pod 'FacebookShare'
So i understood that i have to use pod FacebookLogin and that's it.,
BUT
On this iOS login Docs page, Docs say to use
pod 'FBSDKLoginKit'
I am totally confused about which one to use.
What's the difference between the two?
Note: I just want to perform facebook login in my app and nothing else.

If you are using swift then use 'FacebookCore' and FacebookLogin'.
For objective C use 'FBSDKLoginKit'.
But if you see internally in podfile, they use objective C code via bridging.

You should use below pods for Login with Facebook using Swift
pod 'FacebookCore'
pod 'FacebookLogin'
pod 'FacebookShare'
Because in their official documentation's guideline for integrating Facebook Login in Swift they have mentioned those pods, so there may be some difference which they made for Swift and that's why they provide separate pods. You can assume pod 'FBSDKLoginKit' is for Objective-C because they shown Objective-C sample code on that page. Otherwise officially they haven't made any notes or declaration about these differences.

As of November 2019 the standalone swift SDK has been deprecated in favor of a single repository.
Therefore, it you should be using FBSDKCoreKit, FBSDKShareKit and FBSDKLoginKit with Cocoapods.
We plan on archiving this repo on November 1, 2019. This gives users one month to follow the instructions below for migrating to the new source code location. At this time we will also deprecate the CocoaPods FacebookCore, FacebookLogin, and FacebookShare.
The current documentation is a little bit confusing, as this section is actually referring to Swift Package Manager, not Cocoapods.
For projects that include Swift, use 'FacebookCore', 'FacebookLogin', and 'FacebookShare'
For projects that do not include Swift, use 'FBSDKCoreKit' 'FBSDKLoginKit' and 'FBSDKShareKit'

Related

iOS app rejected - Guideline 5.1.2 - Legal - Privacy - Data Use and Sharing. "create a unique identifier for the user's device"

"We found in our review that your app collects user and device information to create a unique identifier for the user's device. Apps that fingerprint the user's device in this way are in violation of the Apple Developer Program License Agreement and are not appropriate for the App Store.
Specifically, your app uses algorithmically converted device and usage data to create unique identifier in order track the user. The device information collected by your app may include some of the following: defaultManager, NSLocaleCollationIdentifier, NSLocaleQuotationBeginDelimiterKey, NSLocaleCurrencySymbol, and NSLocaleExemplarCharacterSet."
I don't know how to resolve this issue. I store "UIDevice.current.identifierForVendor?.uuidString" and "UUID().uuidString" in UserDefaults and Keychain, then send them to server.
parts of Podfile
pod 'AppAuth', '1.2.0'
pod 'Firebase/Core', '7.5.0'
pod 'Firebase/Messaging', '7.5.0'
pod 'Firebase/RemoteConfig', '7.5.0'
pod 'Firebase/Performance', '7.5.0'
pod 'Firebase/Analytics', '7.5.0'
pod 'Firebase/Crashlytics', '7.5.0'
pod 'FBSDKCoreKit', '9.0.0'
pod 'FBSDKLoginKit', '9.0.0'
pod 'FBSDKShareKit', '9.0.0'
# Ads
pod 'Google-Mobile-Ads-SDK', '7.69.0'
pod 'FBAudienceNetwork', '6.2.1'
pod 'InMobiSDK/Core', '9.1.1'
pod 'mopub-ios-sdk', '5.15.0'
pod 'Verizon-Ads-StandardEdition', '1.8.1'
# Ads Medation
pod 'GoogleMobileAdsMediationFacebook', '6.2.1.0'
pod 'GoogleMobileAdsMediationInMobi', '9.1.1.0'
pod 'GoogleMobileAdsMediationMoPub', '5.15.0.0'
pod 'GoogleMobileAdsMediationVerizonMedia', '1.8.1.0'
pod 'AppBoxoSDK', '1.3.39'
pod 'SAMKeychain'
Update:
#dfd Thanks, bro. You saved me a lot of time. I changed the App Privacy and privacy policy on appstoreconnect, then the review passed.
It's cause of Adjust SDK. You can refer to this link.
Just to give another hint of how to solve this issue.
Long Story Short
I found out that when I imported Branch with CocoaPods, AdSupport was being dynamically linked to the App for some reason. Switching to Swift Package Manager solved my issue.
I also updated my Privacy Settings as suggested above and I made sure I answered NO to the second section of each section (NO to tracking).
Full Disclosure
IDFA can be used as long as you ask permission to the user . This doesn't prevent a 3rd party from trying to access this identifier (the system will just return 0s). See for instance how Branch handles it, they check at runtime for AdSupport framework.
From my understanding, if they detect this framework is linked (you don't necessarily see it in your project's Frameworks, Libraries, and Embedded Content) they'll reject your App.
In my case, I found out that when I imported Branch with CocoaPods, AdSupport was being linked for some reason. Switching to Swift Package Manager solved my issue. You can check it by using this snippet:
// DO NOT IMPORT AdSupport
if NSClassFromString("ASIdentifierManager") != nil {
print("AdSupport is linked somehow")
}
I also reviewed my Privacy Settings, but this is very particular for every App. In every section, I updated the checkboxes as best as I could and after clicking Next I made sure the second question (referring to tracking) was answered as NO.
Finally, for User ID and Device ID sections, I made sure that Third-Party Advertising and Developer’s Advertising or Marketing were unchecked.

What is the difference between Firebase/Auth and FirebaseUI/Auth?

For Firebase iOS, if I want to do user authentication, is there any difference between these 3 choices?
FirebaseUI
FirebaseUI/Auth
Firebase/Auth
And it would be great if someone can explain the pros and cons of using the "pre-built" FirebaseUI and the Firebase authentication SDK?
The Firebase/Auth pod is the core SDK for Firebase Authentication. You can't do authentication without it. It provides no UI.
FirebaseUI is UI components built on top of Firebase Authentication that handles login flows that make your app easier to write. You can't use it without Firebase/Auth.
If you see One thing in Docs Listed At - https://firebase.google.com/docs/auth/
It provide full sign in flow to your app , All pods frameworks needed to sign in through app is provided by that
--> A short Difference let me try to Explain with pod File
-> If used pod 'FirebaseUI'
Refer to Docs Page at - https://firebase.google.com/docs/auth/ios/firebaseui
And you will see
pod 'FirebaseUI/Auth'
pod 'FirebaseUI/Google'
pod 'FirebaseUI/Facebook'
pod 'FirebaseUI/Twitter'
pod 'FirebaseUI/Phone'
For login procedures like Facebook and google is being provided with pods using firebaseUi only
Whereas in pod 'Firebase/Auth'
if you look to if we need to connect Facebook or gmail we explicitly use default Pods being provided with Social services as
and for Facebook
Second Again referring to main Doc - https://firebase.google.com/docs/auth/
Under Firebase SDK Authentication you can see what various integration we can use
i.e You can sign in users to your Firebase app either by using FirebaseUI as a complete drop-in auth solution or by using the Firebase Authentication SDK to manually integrate one or several sign-in methods into your app

Can sinch api be used with swift

Can we use sinch api to create an instant message app in swift? I tried to import sinch framework in a swift app but after importing I could not import the sinch class into my application. Help please.
Use CocoaPod to install your framework, might be easier.
how to install Pod
in your podfile
target 'YourApp' do
pod 'SinchRTC ', '~> 3.1.0'
end
open the YourApp.xcworkspace with xcode.
Now, In your file you will just have to import something like
import Sinch
and it might be good.
CocoaPod is really usefull for dependencies. it help you to install / uninstall framework very easily. it's also very nice when you work in team.
Note : change YourApp by your target name

Error setting up Firebase in Xcode

I have tried to set up Firebase to work on Xcode using both the quick setup instructions and the manual alternate instructions on Firebase website.
When I used CocoaPods and followed the instructions on the quick setup page, I was able to import Firebase, but I was not able to reference Firebase inside the class. I got the error: Cannot call value of non-function type 'module' xcode
When I tried to set it up manually, I was not able to import or reference Fire base and I got the error: No such module 'Firebase'
I had the same issue when updating my project to the new version of Firebase. A TON of changes were announced at Google I/O and thus there is a good amount of updating to be done.
It sounds like you might be using the old version of Firebase with the new SDK. You should do everything with Firebase 3.0. Hence var rootRef = Firebase(url:"https://<YOUR-FIREBASE-APP>.firebaseio.com") will now be var rootRef = FIRDatabase.database().reference().
Take a look at the setup guide at: https://firebase.google.com/docs/ios/setup#prerequisites (be sure you aren't looking at the legacy docs!). If you want to convert code from the old version of Firebase to 3.0, check out the Upgrading tutorial: https://firebase.google.com/support/guides/firebase-ios#get_a_database_reference_numbered
You should try to manually edit your podfile to something like:
use_frameworks!
pod 'Firebase/Core'
pod 'Firebase/Database'
pod 'Firebase/Auth'
I use these directives to get it working with Xcode 7.3.

Which pod should we use instead of GoogleAnalytics-iOS-SDK?

I am using pod GoogleAnalytics-iOS-SDK in my application. I see that it is deprecated now. Which one is replacement for that with all the existing functions. Thanks in advance.
Open the Podfile created for your application and add the following:
pod 'Google/Analytics', '~> 1.0.0'
https://developers.google.com/analytics/devguides/collection/ios/v3/
Having wasted an inordinate amount of time keeping Google Analytics running cleanly in an existing app, I finally found this statement by Google:
"Note: The Firebase SDK is the recommended method to track iOS apps"
https://developers.google.com/analytics/devguides/collection/ios/v3/?ver=swift

Resources