App Invite configuration failed Firebase iOS cocoapods

后端 未结 4 1883
清歌不尽
清歌不尽 2021-02-08 10:22

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         


        
相关标签:
4条回答
  • 2021-02-08 10:37

    Firebase Invites works over Firebase Dynamic Links so, by following the Dynamic Links guide, you need to setup 2 things in your project:

    1. 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.

    1. 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.

    0 讨论(0)
  • 2021-02-08 10:39
    1. Click on your project
    2. Navigate to Info tab
    3. Scroll down you will see the URL Types
    4. Click the + button and add your bundleID to URL Schemes
    5. 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

    0 讨论(0)
  • 2021-02-08 10:45

    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'
    
    0 讨论(0)
  • 2021-02-08 10:55

    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:

    1. Your bundle ID. e.g. "com.foo.bar"
    2. 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.

    0 讨论(0)
提交回复
热议问题