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

Crashes on startup when added to a project the also uses Firebase #81

Closed
supermoos opened this issue Nov 24, 2023 · 8 comments
Closed
Labels
bug Something isn't working ios Issues that affect iOS

Comments

@supermoos
Copy link

It was working ok before adding firebase to the project. So there's some incompatibility between this and firebase. I'm using firebase dynamic links only.

Here's the error that happens immediately on ios when running:
Error loading /var/containers/Bundle/Application/A280EF83-DCF6-4421-BB88-8356E20B0C94/MYAPP.app/Frameworks/UnityFramework.framework/UnityFramework (134): dlopen(/var/containers/Bundle/Application/A280EF83-DCF6-4421-BB88-8356E20B0C94/MYAPP.app/Frameworks/UnityFramework.framework/UnityFramework, 0x0109): Library not loaded: @rpath/NatML.framework/NatML Referenced from: <90CAC92F-9B4D-3115-B84D-2CCEAEF63B8A> /private/var/containers/Bundle/Application/A280EF83-DCF6-4421-BB88-8356E20B0C94/MYAPP.app/Frameworks/UnityFramework.framework/UnityFramework Reason: tried: '/usr/lib/swift/NatML.framework/NatML' (no such file, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/NatML.framework/NatML' (no such file), '/private/var/containers/Bundle/Application/A280EF83-DCF6-4421-BB88-8356E20B0C94/MYAPP.app/Frameworks/NatML.framework/NatML' (no such file), '/usr/lib/swift/NatML.framework/NatML' (no such file, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/NatML.framework/NatML' (no such file), '/private/var/containers/Bundle/Application/A280EF83-DCF6-4421-BB88-8356E20B0C94/MYAPP.app/Frameworks/NatML.framework/NatML' (no such file), '/private/var/containers/Bundle/Application/A280EF83-DCF6-4421-BB88-8356E20B0C94/MYAPP.app/Frameworks/NatML.framework/NatML' (no such file) Error loading /var/containers/Bundle/Application/A280EF83-DCF6-4421-BB88-8356E20B0C94/MYAPP.app/Frameworks/UnityFramework.framework/UnityFramework (134): dlopen(/var/containers/Bundle/Application/A280EF83-DCF6-4421-BB88-8356E20B0C94/MYAPP.app/Frameworks/UnityFramework.framework/UnityFramework, 0x0109): Library not loaded: @rpath/NatML.framework/NatML Referenced from: <90CAC92F-9B4D-3115-B84D-2CCEAEF63B8A> /private/var/containers/Bundle/Application/A280EF83-DCF6-4421-BB88-8356E20B0C94/MYAPP.app/Frameworks/UnityFramework.framework/UnityFramework Reason: tried: '/usr/lib/swift/NatML.framework/NatML' (no such file, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/NatML.framework/NatML' (no such file), '/private/var/containers/Bundle/Application/A280EF83-DCF6-4421-BB88-8356E20B0C94/MYAPP.app/Frameworks/NatML.framework/NatML' (no such file), '/usr/lib/swift/NatML.framework/NatML' (no such file, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/NatML.framework/NatML' (no such file), '/private/var/containers/Bundle/Application/A280EF83-DCF6-4421-BB88-8356E20B0C94/MYAPP.app/Frameworks/NatML.framework/NatML' (no such file), '/private/var/containers/Bundle/Application/A280EF83-DCF6-4421-BB88-8356E20B0C94/MYAPP.app/Frameworks/NatML.framework/NatML' (no such file)

Firebase creates a cocoapods file - could this be an issue?

@olokobayusuf olokobayusuf added bug Something isn't working ios Issues that affect iOS labels Nov 27, 2023
@olokobayusuf
Copy link
Contributor

I think it could be because of Firebase. In Xcode, can you select the Unity-iPhone target and in the general tab, take a screenshot of the Frameworks, Libraries, and Embedded Content section? That list should include NatML.framework.

@supermoos
Copy link
Author

Yes indeed, NatML.framework wasn't included in the main Unity-iPhone target. I added it manually using add framework files, could you provide an example on how to do this in a post build script perhaps so it can be automated? I already have something setup like this, but since it's a direct file reference needed to NatML.framework I'm unsure how to reference it.

    public static void OnPostprocessBuild (BuildTarget target, string pathToBuiltProject)
    {
        if (target == BuildTarget.iOS)
        {
            OnPostProcessBuildIOS(pathToBuiltProject);
        }
    }

    private static void OnPostProcessBuildIOS(string pathToBuiltProject)
    {

@olokobayusuf
Copy link
Contributor

According to @Tillmania, this can be solved by downgrading to Unity 2022.3.13f1. Can you check?

@olokobayusuf
Copy link
Contributor

This issue will be fixed once we deprecate and remove the NatML dependency from VideoKit. ETA for this is ~3 weeks.

@tmlop
Copy link

tmlop commented Jan 26, 2024

I was super excited to add this asset to my project but I still have the exact same issue. Makes the entire thing unusable unfortunately 😥
@olokobayusuf any updates on this?

@olokobayusuf
Copy link
Contributor

@tmlop working very hard on getting this resolved ASAP! Should have something this coming week.

@tmlop
Copy link

tmlop commented Jan 29, 2024

@olokobayusuf Awesome, thank you so much!!
Please let me know if you need more info from my end or if there is anything I can help with :)
Just in case, I'm using the following sdks from Firebase: Authentication, Analytics, Realtime DB, Firestore and Cloud Messaging (ie. push notifications)

@olokobayusuf
Copy link
Contributor

Fixed in VideoKit 0.0.18. Feel free to try out the latest VideoKit alpha build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ios Issues that affect iOS
Projects
None yet
Development

No branches or pull requests

3 participants