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

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

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.

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

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'

Firebase error even if I don't use it

In my objective-c application, I added Google Analytics using Pods (this is how I add it: pod 'Google/Analytics'). In the Pods folder, I found those Firebase packages FirebaseAnalytics, FirebaseCore and the FirebaseInstanceId). When I run my application, sometimes it crash and this is what I'm getting in the console:
[Firebase/Core][I-COR000003] The default Firebase app has not
yet been configured. Add [FIRApp configure] to your application
initialization.
I don't call the Firebase classes anymore and I don't want to use them.
Why am I having Firebase even if I didn't add them? Why am I having this error? How can I resolve this? If I delete the packages will that cause a problem?
Google Analytics is not recommended anymore for mobile applications:
The Firebase SDK is the recommended method to track iOS apps.
And AFAIK, the development of the features + pod maintenance is not a priority as they fully shifted towards Firebase.
I know some legacy code has to remain on GA because of outstanding history of logs. But if you have a fresh app, I strongly recommend doing analytics with Firebase.
The Google pod depends on Firebase. Change your Podfile to directly depend upon GoogleAnalytics without the slash.
pod 'GoogleAnalytics'

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

Where can I find the google cloud messaging library, before it used firebase?

Does any one have, or know where i can find the google cloud messaging library from before it started using firebase?
I know that it is advised to update to firebase but this is out of scope.
Thanks
I believe you can just install it with Cocoapods with the last version of the pod before Firebase:
pod 'Google/CloudMessaging', '2.0.4'

Resources