SKAdNetwork using Firebase SDK and Firebase Analytics - ios

I am looking to integrate Firebase Analytics SDK into my apps, to be able to link with Google Ads so we can track ad campaign and attribution. Since our apps target kids space, we are not allowed to use any IDFA capabilities by Apple, so using anything like AdSupport.framework or ATT (App Tracking Transparency) it will risk app rejection. So, that leaves SKAdNework. According to Firebase Notes (https://firebase.google.com/support/release-notes/ios#version_6290_-_july_28_2020), SKAdNetwork will register for AdNetwork attribution automatically called on first open by default, and by setting the following key GOOGLE_ANALYTICS_REGISTRATION_WITH_AD_NETWORK_ENABLED YES in our Info.plist file, should opt in to this default behaviour. However, I have no way to verify this on device (i.e. I see no console message on the device, nor can't find this call in the code [SKAdNetwork registerAppForAdNetworkAttribution])
Is there anything else I am missing? Do I need to add SKAdNetwork Identifiers to my plist file, like this (https://developers.google.com/admob/ios/ios14#skadnetwork)?
Bellow is a sample copy of my pod file:
target 'UnityFramework' do
pod 'Firebase/AnalyticsWithoutAdIdSupport', '8.6.0'
pod 'Firebase/DynamicLinks', '8.6.0'
pod 'Firebase/InAppMessaging'
pod 'Firebase/Messaging', '8.6.0'
pod 'Firebase/RemoteConfig', '8.6.0'
end

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

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'

Integrating Parse in App extension

I’m trying to implement parse functionality in a app extension. The main app uses Parse to push and retrieve data. The problem is I can't install the parse SDK to my app extension. Is this even possible? I've been on google for about three hours and I’m starting to think not. I've tried to init another pod file and I’ve tried the the abstract_target function. No matter what I do, I can't seem to import it. Has anyone achieved this before? Im using swift 2.0 if that helps.
If there is another way to carry out the following, please let me know:
(This happens in the share popup view)
1.Grab user input text
2.Push it to the parse backend
in order to use Parse ios SDK in your app extension you are require to do the following:
enable local data store (local data store is where your data is being saved locally on your device)
Enable app groups and keychain sharing in both of your targets (your main app and your extension) this allows you to share the data and the session between your app and your extension.
When i did it. I follow this guide which explain how to integrate apple watch and app extension with parse IOS SDK.
If you are using CocoaPods in your project please make sure that you load the Parse pod also to your extension..
so let's assume that the only pod that you have in your Podfile is pod 'Parse' you Podfile should look like the following
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
def my_pods
pod 'Parse'
end
# Change the MainAppTargetName to your main app target
target 'MainAppTargetName' do
my_pods
end
# change MyExtensionTargetName to your extension target name
target 'MyExtensionTargetName' do
my_pods
end

App Invite configuration failed Firebase iOS cocoapods

I got a build error with this in it while trying out the new version of firebase
*** Terminating app due to uncaught exception 'com.firebase.appinvite', reason: 'App Invite configuration failed.'
Click on your project
Navigate to Info tab
Scroll down you will see the URL Types
Click the + button and add your bundleID to URL Schemes
Click the + button again and add your REVERSED_CLIENT_ID to URL Schemes. This can be found in your GoogleService-Info.plist
Finally your URL types should look something like this
The Invites pod does require setting up a couple of custom URL schemes, which is easy to skip over. You can do this in you Info.plist, or in the General tab of the target in Xcode. The two custom URL schemes are:
Your bundle ID. e.g. "com.foo.bar"
Your Google Sign In client ID with the components reversed. e.g. "com.googleusercontent.apps.12345678-xxxxxxxxx".
The second one is trickier! In the GoogleService-Info.plist you downloaded there should be a key REVERSED_CLIENT_ID you can copy the value of. For what its worth, I find that the first build after I edit the custom URL types doesn't seem to register it properly, so if it doesn't work right away, just try again.
My podfile had the following. I just had to uncomment the Firebase/Invites pod. There seems to be a problem with it for now.
pod 'Firebase'
pod 'Firebase/AdMob'
pod 'Firebase/Analytics'
pod 'Firebase/AppIndexing'
pod 'Firebase/Auth'
pod 'Firebase/Crash'
pod 'Firebase/Database'
pod 'Firebase/DynamicLinks'
#pod 'Firebase/Invites' this caused an exception!!
pod 'Firebase/Messaging'
pod 'Firebase/RemoteConfig'
pod 'Firebase/Storage'
Firebase Invites works over Firebase Dynamic Links so, by following the Dynamic Links guide, you need to setup 2 things in your project:
Add Url type
At Target settings, info tab, add the new url. Set the schema your bundle ID. If you use other schema you have to set it on Dynamic Links page at Firebase console.
Associate the Firebase Dynamic link domain in your app.
Go to Firebase console and copy from Dynamic links section the
Firebase-generated Dynamic Link Domain of your app.
Go to target settings, capability tab, and enable Associated Domains.
Add the Firebase-generated Dynamic Link Domain you just copied.
This should fix the configuration error as it did in my case. Anyway i advise to read the full guide.

Resources