Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] App store rejection due to App Tracking Transparency Framework. Better way to manage Pod deps #994

Closed
DaniilKarpenko opened this issue Mar 1, 2021 · 26 comments
Labels
api: analytics blocked-by-dependencies Issues which is blocked by native Android/iOS SDK, backend or third-party dependencies. type: feature request

Comments

@DaniilKarpenko
Copy link

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2018.4.23f1
  • Firebase Unity SDK version: 6.16.1
  • Source you installed the SDK: Unity Package Manager
  • Problematic Firebase Component: probably Analytics
  • Other Firebase Components in use: Firebase App, Firebase Dynamic Links, Firebase Remote Config, Google Analytics for Firebase
  • Additional SDKs you are using: none
  • Platform you are using the Unity editor on: Windows
  • Platform you are targeting: iOS
  • Scripting Runtime: IL2CPP

[REQUIRED] Please describe the question here:

Hello. I tried to publish the app in Kids Category and received the reject:

Your app implements the App Tracking Transparency framework, which is used when apps collect data about users and share it with third-parties for tracking purposes. Since Kids Category apps are not allowed to collect, transmit or share identifiable information with third-parties, you should not implement App Tracking Transparency in your app.

To resolve this issue, please check the NSUserTrackingUsageDescription located within Firebase framework -[APMIdentity retrieveAdTrackingConsentStatus] and remove this functionality or revise your app so that no personally identifiable information or device information is sent to third parties.

Can you help me?
What should I do to remove this part from Firebase?

@daneric
Copy link

daneric commented Mar 4, 2021

Same issue! Is there any solution?

@daneric
Copy link

daneric commented Mar 4, 2021

My environment:
Unity editor version: 2019.2.21f1
Firebase Unity SDK version: 7.0.2
Firebase Components in use: Analytics, Remote Config, Google Analytics for Firebase

@chkuang-g
Copy link
Contributor

chkuang-g commented Mar 6, 2021

@DaniilKarpenko @daneric I suspect this is because you are using Google Analytics for Firebase. However, I am not an expert in Apple policy here.

I will transfer you to firebase-ios-sdk repo. They should be able to give you a better answer.

@google-oss-bot
Copy link

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@chkuang-g chkuang-g transferred this issue from firebase/quickstart-unity Mar 6, 2021
@chkuang-g
Copy link
Contributor

chkuang-g commented Mar 6, 2021

Hi firebase-ios-sdk folks,

Our Firebase Unity SDK users had trouble publishing their app in Kids Category due to the use of App Tracking Transparency framework. This seems like something related to Analytics. Could you give them some guideline for this situation?

Shawn

@paulb777
Copy link
Member

paulb777 commented Mar 6, 2021

This is a duplicate of firebase/firebase-ios-sdk#7652. We have a fix staged for Firebase iOS SDK 7.8.0 planned to release within the next week. Please have any follow up discussion there.

@paulb777 paulb777 closed this as completed Mar 6, 2021
@chkuang-g
Copy link
Contributor

@paulb777 Thanks for the information.

Seems like Firebase iOS 7.8.0 has been released. However, the latest Firebase Unity SDK 7.1.0 still depends on iOS SDK 7.5.0.

Since we have not release a Unity SDK which includes this change yet, let me transfer this back to quickstart-unity and assign a Milestone to it.

@DaniilKarpenko
If you need to resolve this immediately, you can try to bump up Pod version to 7.8.0. However, we have not tested the latest Unity SDK again Pod 7.8.0 yet. Make sure if you test your app thoroughly after making the change.

If this is the risk you can take, here is the steps to bump up Pod version:

  • Upgrade Firebase Unity SDK to 7.1.0 first. There are many breaking changes from 6.16.1 to 7.1.0. But I am 100% sure Unity SDK 6.16.1 will NOT be compatible to iOS Pod 7.8.0
  • There are two ways you can bump up Pod version, both have pros and cons
    • Modify Podfile in Xcode project directly.
      • Pro: easiest to change.
      • Con: EDM4U may override your change after rebuilding Xcode project. To prevent EDM4U from override your changes, you can disable Podfile Generation settings in Assets > External Dependency Manager > iOS Resolver > Settings menu item.
    • Modify all files in your project which ends with Dependencies.xml and bump up the iosPod version to 7.8.0
      • Pro: EDM4U will use this version number when rebuilding Xcode project
      • Con: Since you will need to modify a file in the package, you will need to migrate from Unity Package Manager to .unitypackage. Otherwise, Unity Package Manager tend to revert your changes after modification. Make sure Firebase and EDM4U are uninstalled from Unity Package Manager before installing .unitypackage version.

Hope this helps!
Shawn

@chkuang-g chkuang-g reopened this Mar 12, 2021
@chkuang-g chkuang-g transferred this issue from firebase/firebase-ios-sdk Mar 12, 2021
@chkuang-g chkuang-g added this to the 7.2.0 milestone Mar 12, 2021
@chkuang-g
Copy link
Contributor

[Update]
Cool. We just found out the iOS SDK 7.8.0 does NOT work.
firebase/firebase-ios-sdk#7695

Let's wait for iOS team to fix this first.

@chkuang-g chkuang-g removed this from the 7.2.0 milestone Mar 12, 2021
@chkuang-g chkuang-g added needs-attention Need Googler's attention blocked-by-dependencies Issues which is blocked by native Android/iOS SDK, backend or third-party dependencies. and removed needs-attention Need Googler's attention labels Mar 12, 2021
@chkuang-g chkuang-g changed the title [Question] App Tracking Transparency Framework [Part Of Firebase] [Bug] App store rejection due to App Tracking Transparency Framework Mar 12, 2021
@chkuang-g chkuang-g added this to the 7.2.0 milestone Mar 12, 2021
@chkuang-g
Copy link
Contributor

chkuang-g commented Mar 12, 2021

Seems like it is fixed in 7.8.1.

Please try the instruction here #994 (comment), and let us know if you run into any issue.

And we will include this in the next release

@Seleznov
Copy link

Seleznov commented Mar 17, 2021

We`ve tried to pop up pod version to the latest 7.8.1 and still got reject.
@daneric were you able to fix it with this instruction?

@adityathoutam
Copy link

We`ve tried to pop up pod version to the latest 7.8.1 and still got reject.
@daneric were you able to fix it with this instruction?

We were trying to update to 7.8.1 and stopped because of your comment
Are you sure that you are not using other SDK's?
AppsFlyer had similar issue and they patched it yesterday

@Seleznov
Copy link

Seleznov commented Mar 19, 2021

Are you sure that you are not using other SDK's?

@adityathoutam we use only Firebase Remote Config and Firebase Analytics

@adityathoutam
Copy link

Are you sure that you are not using other SDK's?

@adityathoutam we use only Firebase Remote Config and Firebase Analytics

Cool. We removed Firebase Analytics completely and our app passed through the App review yesterday.

@chkuang-g chkuang-g removed this from the 7.2.0 milestone Mar 22, 2021
@Seleznov
Copy link

If I understand the situation about Unity SDK now we have to wait this issue firebase/firebase-ios-sdk#7736 to be fixed first. @chkuang-g am I correct?

@ArnauKokoro
Copy link

Same here! We have been rejected since 1st of March and found this issue few days ago. We removed Firebase Analytics iOS sdk and we passed the Apple review. I guess we have to wait for a fix.

@patm1987
Copy link

patm1987 commented Mar 25, 2021

Hi all!

Sorry for the silence, I've been digging around to find the current state of the matter.
As mentioned by @Seleznov : this is blocked by firebase/firebase-ios-sdk#7736 -- the games SDKs are dependent on the underlying platform SDKs (in this case iOS), so fixing that should fix this. I won't mark this as a duplicate since I figure that this bug will get resolved in two steps:

  1. the iOS SDK eventually gets patched, and the workaround becomes modify your AnalyticsDependencies.xml file as mentioned here
  2. the games/Unity SDK will get a subsequent update to make this version default (and to run it through our own unit testing framework to ensure stability) fully resolving the issue at hand

Sorry for the inconvenience, this is obviously not the developer experience Firebase wants to deliver and folks are working on it

@bilck
Copy link

bilck commented Mar 31, 2021

We use(d) Firebase Analytics and other Firebase SDKs on our app through Unity Package Manager.
To submit our app successfully we we had to do the following:

  1. Remove Firebase Analytics from Package Manager
  2. Create a Post Processing Build editor script that removes "Firebase/Core" dependency from the Pod file:
using System.IO;
public class PostProcessIOS : MonoBehaviour {
	[PostProcessBuildAttribute(45)]//must be between 40 and 50 to ensure that it's not overriden by Podfile generation (40) and that it's added before "pod install" (50)
	private static void PostProcessBuild_iOS(BuildTarget target, string buildPath)
	{
		string podfileFilePath = Path.Combine(buildPath, "Podfile");
				
		Debug.LogFormat("[FixFirebasePodfile] Processing file at path: {0}", podfileFilePath);
		var lines = File.ReadAllLines(podfileFilePath);
		
		var sb = new StringBuilder();
		foreach (string line in lines)
		{
			if (line.Contains("Firebase/Core"))
			{
				Debug.LogFormat("[FixFirebasePodfile] Skipping line to ignore 'Firebase/Core' Pod Dependency. It is a workaround to prevent it dragging along 'FirebaseAnalytics'.\n" +
								"Line content: \"{0}\"\n" +
								"File path: {1}",
					line, podfileFilePath);
				continue;
			}

			sb.AppendLine(line);
		}
		
		File.WriteAllText(podfileFilePath, sb.ToString());
	}
}

@kenMarquez
Copy link

@patm1987
Copy link

@bilck
You can probably achieve the same solution by switching to using the unitypackage version of the SDK, opening Assets/Firebase/Editor/AppDependencies.xml, and deleting the lines:

    <iosPod name="Firebase/Core" version="7.5.0" minTargetSdk="9.0">
    </iosPod>

According to the linked iOS bug, it looks like there's a new pod for Firebase/Analytics that might fix the kids thing. To fix that open Assets/Firebase/Editor/AnalyticsDependencies.xml and change:

    <iosPod name="Firebase/Analytics" version="7.5.0" minTargetSdk="9.0">
    </iosPod>

To:

    <iosPod name="Firebase/Analytics" version="7.9.0-k2" minTargetSdk="9.0">
    </iosPod>

This configuration won't have gone through the same level of testing as an official games release, but should work (I'm not aware of any problematic api changes).

These files are what generates the Podfile at the end. If switching to unitypackage releases isn't an option for you then you can probably apply the same changes with the script.

For folks in this thread, let us know if these changes work!

@patm1987 patm1987 added the needs-info Need information for the developer label Mar 31, 2021
@bilck
Copy link

bilck commented Mar 31, 2021

@patm1987 Thanks for the feedback.

I would try that out, but since we use Unity Package Manager, the files keep getting changed back to their original versions.

I omitted the code here, but I also was replacing "7.5.0" with "7.9.0" on the Podfile, which is the version that it was mentioned that contained the Analytics fix (which is not true, as lots of people reported that they keep getting rejected - myself included).

Using the Build Post Processing script was the cleanest way to fix the issue without having to resort to the "Unity Package" SDK version (which commits lots of files on the repository).

By the way, where did you get this "7.9.0-k2" from? (especially the k2 part)
Do I need to change other Firebase SDK dependencies as well?
If I change all of them, will it work?

@paulb777
Copy link
Member

All Firebase dependencies in the Podfile specified with a forward slash to indicate a subspec of the Firebase pod need to change to indicate the 7.9.0-k2 version of the Firebase pod.

@patm1987
Copy link

-k2 came from firebase/firebase-ios-sdk#7736

It's a specific build to address this issue, to my knowledge there isn't any additional documentation around it at this time.

@Seleznov
Copy link

FYI, 7.9.0-k2 version works for us as a temporary solution and our app was approved 🎉

Also, thanks for this and that help about how to adapt iOS SDK fix to Unity project.

So waiting for the new release of Unity SDK with this fix.

@chkuang-g
Copy link
Contributor

chkuang-g commented Apr 23, 2021

Got back from iOS team.

Seems like this duo Pods situation will stay for a bit until we know the next step from Apple, and make appropriate changes.

That is,

Check our release note for future changes.
https://firebase.google.com/support/release-notes/unity
https://firebase.google.com/support/release-notes/ios

Judged by the available workaround and the situation, allow me to change this to feature request.

The feature can be done in two ways:

  • A Unity editor setting to to automatically modify Analytics pods if the project is set to publish for kids. (We need to evaluate if this duo Pods nature will last for a very long time.)
  • iOS team figure out a way to unify two pods into one.

Shawn

@chkuang-g chkuang-g added type: feature request and removed needs-info Need information for the developer type: bug labels Apr 23, 2021
@chkuang-g chkuang-g changed the title [Bug] App store rejection due to App Tracking Transparency Framework [FR] App store rejection due to App Tracking Transparency Framework. Better way to manage Pod deps Apr 23, 2021
@chkuang-g
Copy link
Contributor

chkuang-g commented Apr 23, 2021

Got an update from iOS team.

From iOS SDK 7.11.0, instead of changing version number, you need to change the Pod name to Firebase/AnalyticsWithoutAdIdSupport.
https://firebase.google.com/support/release-notes/ios

Here is a table to help you.

Pod name version Kid? 👧 👦
Firebase/Analytics 7.9.0 or below
Firebase/Analytics 7.9.0-k2
Firebase/Analytics 7.9.1
Firebase/Analytics 7.10.0
Firebase/Analytics 7.11.0 or above
Firebase/AnalyticsWithoutAdIdSupport 7.11.0 or above

Still duo pod spec/subspec situation but hope this clarify it.

@cynthiajoan
Copy link
Contributor

Close since the iOS SDK has fixed the issue.

@firebase firebase locked and limited conversation to collaborators Oct 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: analytics blocked-by-dependencies Issues which is blocked by native Android/iOS SDK, backend or third-party dependencies. type: feature request
Projects
None yet
Development

No branches or pull requests