Closed adampsst closed 3 years ago
Hi @adampsst,
I noticed that your to log an event within the Start() function. It's possible that the event is not being reported because the FirebaseApp is not initiated yet. Naturally, the event cannot be enforced when you instantiate the object during gameplay.
With that, could you try the quickstart and see if the events aren't being reported from an iOS device?
Hi @adampsst,
I noticed that your to log an event within the Start() function. It's possible that the event is not being reported because the FirebaseApp is not initiated yet. Naturally, the event cannot be enforced when you instantiate the object during gameplay.
With that, could you try the quickstart and see if the events aren't being reported from an iOS device?
Yeah, I will set some time aside to try this in the quickstart project as well. The even you can see in the code above is actually just there as a test, we have around 15-20 more events that are not being captured either throughout the project, but are on Android.
Hey @adampsst. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@adampsst if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.
Hi,
I have tested the quickstart project and I can see events coming through on iOS (custom events), but still not in our own project (only default events that the SDK logs as mentioned before).
Any suggestions where to go from here? Would a list of other packages we are using help?
Adam
It would appear the issue is related to having ARCore Extentions and the Firebase SDK's in the same project. Once they are both added in I am no longer able to fire custom events, they never get logged. I can also see that there are errors relating to classes being implemented in multiple frameworks, which only occurs when the ARCore packages are added in.
To also be clear, we are part of the partner program with Google using the ARCorePartner versions.
Since there haven't been any recent updates here, I am going to close this issue.
@adampsst if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.
Please re-open
Hi @adampsst,
Could you try using version 8.0.0 of the SDK and see if this resolves the issue?
Hi @adampsst,
Could you try using version 8.0.0 of the SDK and see if this resolves the issue?
I have tried this version and it is still not working.
I have attached a file which contains various build errors inside xcode once i have Firebase products and ARCore Extensions installed in the same project.
Ah interesting. Did you install both Firebase and ARCore using .tgz
? Like the instruction described here?
And what is the version number of ARCorePartner version?
Here is my observation:
${YOUR_PROJECT_ROOT}/Library/PackageCache/com.google.ar.core.arfoundation.extensions@${SOME_RANDOM_STRING}/Editor/ExternalDependencyManager
exists.target 'UnityFramework' do
pod 'Firebase/Core', '7.11.0'
end
And the newer version (1.2.164+) will generate Podfile like the following:
target 'UnityFramework' do
pod 'Firebase/Core', '7.11.0'
end
target 'Unity-iPhone' do
end
use_frameworks!
Just curious about which version of EDM4U is in your project. Could you tell us the version number you saw on top of the settings windows using Assets > External Dependency Manager > iOS Resolver > Settings
menu item?
.unitypackage
:(. Like Firebase SDK from here and ARCore ones from hereCould you verify if either the removal of ARCore extension package works or installing everything using .unitypackage
works?
If so, this is unfortunately. Since you are ARCore partner, I would recommend you to escalate this to ARCore team. I will escalate using internal channel as well once I hear from you.
Please let us know! Thank you.
@chkuang-g Thanks for the long response.
So to be clear I am having the same issue with both the partner SDK version of ARCore as well as the current public release version. However the installation for these is slightly different:
Public Version This is installed by placing the pacakge into a GooglePackages folder, and then updating the manifest to point to the tgz file manually.
Partner Version This is installed by placing the extracted SDK inside its own folder under the Packages folder inside the project.
Now, in either case, I am able to fix the EDM4U issue, and I am able to build without issue. However, as linked above, we get a lot of errors relating to duplicate classes on iOS, which I believe is the root cause of the issue.
For reference, we are using 1.2.166 EDM4U.
I have struck up a conversation with ARCore Partner team as well, if you can push this along that would be great. But the fact this is also causing issues with the public release version is something we need to resolve.
Could you post the content in your Podfile
and Podfile.lock
?
Also, did you see any error if you run pod install
under your Xcode project?
POD file contents below.
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '13.0'
target 'UnityFramework' do
pod 'ARCorePartner/CloudAnchorsPartner', :path => './../../../ARCorePartner/'
pod 'Firebase/Analytics', '8.1.1'
pod 'Firebase/Core', '8.1.1'
pod 'Firebase/Crashlytics', '8.1.1'
pod 'Firebase/RemoteConfig', '8.1.1'
end
target 'Unity-iPhone' do
end
use_frameworks!
Here is the pod install
output:
adamgoodchild@Adams-Mac-mini Artly - iOS Artly - 1.3.0 % pod install
Analyzing dependencies
Downloading dependencies
Generating Pods project
Integrating client project
Pod installation complete! There are 5 dependencies from the Podfile and 16 total pods installed.
[!] The `UnityFramework [Release]` target overrides the `LD_RUNPATH_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-UnityFramework/Pods-UnityFramework.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `UnityFramework [ReleaseForProfiling]` target overrides the `LD_RUNPATH_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-UnityFramework/Pods-UnityFramework.releaseforprofiling.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `UnityFramework [ReleaseForRunning]` target overrides the `LD_RUNPATH_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-UnityFramework/Pods-UnityFramework.releaseforrunning.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `UnityFramework [Debug]` target overrides the `LD_RUNPATH_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-UnityFramework/Pods-UnityFramework.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
adamgoodchild@Adams-Mac-mini Artly - iOS Artly - 1.3.0 %
I have also attached the Podfile.lock
file for you to look over.
Also, as mentioned earlier, this occurs when using the quickstart project along with the public ARCore Extensions SDK. Could someone in your team look at replicating this which may help resolve the issue?
@adampsst Interesting. So you are using later version EDM4U. I will started some investigation this week.
A couple of question about your project
com.google.external-dependency-manager:1.2.166
com.google.firebase.app:8.0.0
com.google.firebase.analytics:8.0.0
com.google.firebase.crashlytics:8.0.0
com.google.ar.core.arfoundation.extensions:1.25.0
Podfile
when you attempted to reproduce the FCM quickstart with public version of ARCore? Thank you, Shawn
@adampsst
TL;DR; I finally was able to reproduce the issue you described. I think the issue is with ARCore's pod, since by removing it, the Analytics event worked as intended. Also I found a workaround with a caveat: remove the following block in Podfile
and run pod install
again.
target 'Unity-iPhone' do
end
use_frameworks!
To prevent iOS resolver from adding this block back, disable the following settings in Assets > External Dependency Manager > iOS Resolver > Settings
menu item.
CAVEAT: By doing so, your project will NOT be compatible to some other Unity packages which uses Swift framework, ex. Facebook Unity SDK, since their editor code add this block to Podfile
regardlessly without any option. See #862
Unfortunately we have not found a solution that works for all scenario yet. That is why EDM4U added the options to add the following block to Podfile
by default.
target 'Unity-iPhone' do
end
use_frameworks!
And we noticed that Admob and ARCore Pod may not compatible to these configuration. For some reason, this incompatibility broke Firebase Analytics custom event reporting.
I think ARCore team and Admob probably should update their Pod to make it works. At this point, the workaround with caveat is probably the only better option you have, or downgrade your Unity to 2019.2 or below before Unity introduce multi-target in Xcode project.
Let me contact our iOS team.
8.1.0
and Unity 2020+. It does not matter Firebase is installed using .unitypackage
or .tgz
. I was using Unity 2020.1.17f1 as @adampsst specified in the first post. But I think this should be reproducible using Unity 2019.3+.-FIRAnalyticsDebugEnabled
and -FIRDebugEnabled
Log Login
button. Observe the event login
show up on Firebase console. It usually takes less than 1 minutes.Podfile
to add ARCore/CloudAnchors
like the following.
target 'UnityFramework' do
pod 'Firebase/Analytics', '8.3.0'
pod 'Firebase/Core', '8.3.0'
pod "ARCore/CloudAnchors", '~> 1.25.0'
end
target 'Unity-iPhone' do
end
use_frameworks!
pod install
.Log Login
button. Debug Device
. You should see the device count increased. Use the dropdown menu to switch to different device.
screen_view
is logged but NOT login
.Podfile
to remove target 'Unity-iPhone'
and use_frameworks!
, like the following:
target 'UnityFramework' do
pod 'Firebase/Analytics', '8.3.0'
pod 'Firebase/Core', '8.3.0'
pod "ARCore/CloudAnchors", '~> 1.25.0'
end
pod install
.Log Login
button. Debug Device
. You should see the device count increased. Use the dropdown menu to switch to a different device.login
is logged properly along with default Firebase events like screen_view
.Hi @adampsst
We did a full investigation. Thanks to @paulb777!
TL;DR; The workaround for you is simple: link pods statically. Analytics and ARCore pods are static binary libraries which does not work very well with the Xcode project generated by Unity after 2019.3
. Static binary pods are pretty common and are not going anyway anytime soon. Therefore, your best bet is to make sure pods are linked statically.
You can turn on the settings in Assets > External Dependency Manager > iOS Resolver > Settings
Once checked, you should see this line in the newly generated Podfile
use_frameworks! :linkage => :static
This means the pods should be linked statically. This should work no matter pods are static libraries or dynamic libraries.
FBSDKCoreKit
from Facebook does not work very well with use_frameworks! :linkage => :static
and you may see error like Undefined Symbol
. What you need to do is to add a Dummy.swift
to UnityFramework
with the content like the following:
import Foundation
This will force Xcode project to link Swift libraries.
use_frameworks!
to Podfile
no matter there is such line presented already or now. See code. As a result, you will see duplicated lines like the following:
use_frameworks! :linkage => :static
use_frameworks!
Since latter line will take effect, this will make Xcode project links pods dynamically again. Your best coarse of action is to remove the second line manually. I will file a bug to Facebook SDK to get this fixed.
That's it. Let us know if you are still experiencing the issue with these workarounds. I am thinking about adding some additional logic in EDM4U to turn on static linkage automatically. But that will be a FR from EDM4U side.
Hey @adampsst. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@adampsst if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.
[REQUIRED] Please fill in the following fields:
[REQUIRED] Please describe the issue here:
When building to iOS, custom analytics are not being captured on the Firebase dashboard. However on Android they are. The only events on iOS which are captured are the default Firebase events, no custom evert data is showing. I have tried enablling Debug mode to check to see if they appear and it still does not show the data, again only the default Firebase events. We also have a test event being fired when the Firebase SDK's have been initialised and that is also not being captured on the dashboard (or debug view).
Steps to reproduce:
This occurs for all builds of our project on iOS, I have tried two different Firebase projects linked to Unity and neither show the data coming through.
Relevant Code:
Here is the initialisation code we are using: