Using Firebase in the app and Today Extension does not work

I use Firebase in my application, I used it through pod , and everything worked correctly,

Then we add Today Extensions (2 extensions) to our application, and we also need to use Firebase in it, so I added it to the podfile as follows:

use_frameworks! project 'projectName.xcodeproj' target 'appName' do pod 'Firebase/Core' post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['SWIFT_VERSION'] = '3.0' end end end end target 'todayExtension1_Name' do pod 'Firebase/Core' end target 'todayExtension2_Name' do pod 'Firebase/Core' end 

and I am creating two applications for TodayExtensions and correctly deploying .plist files and successfully creating the application.

but when I try to execute the launch of the application, I got this exception at runtime:

dyld: Symbol not found: _OBJC_CLASS _ $ _ GTMLogLevelFilter Link from: / Users / rawanal-omari / Library / Developer / CoreSimulator / Devices / 33A7DC45-EFD9-4245-8989-7C6B4194481F / data / Containers / Bundle / Application / 84C060C2 A4 -4AF3-8804-ADA8CFBCABB3 / appName.app / Application Name Expected in: / Users / rawanal-omari / Library / Developer / CoreSimulator / Devices / 33A7DC45-EFD9-4245-8989-7C6B4194481F / data / Containers / Bundle / Application / 84C060C -A4AE-4AF3-8804-ADA8CFBCABB3 / appName.app / Wireframes / GoogleToolboxForMac.framework / GoogleToolboxForMac in / Users / rawanal -omari / Library / Developer / CoreSimulator / Devices / 33A7DC45-EFD9-4245-8989-7C6B4194 Bundle / Application / 84C060C2-A4AE-4AF3-8804-ADA8CFBCABB3 / appName.app / appName

Has anyone encountered such a problem?

+1
source share
1 answer

Not sure if targeting extensions with modules is enough, but the following steps are needed

Step 1. Go to the firebase console.

Step 2. Click on the project you are working on.

Firebase Dashboard

Step 3. Within the project, click "Add another application", add another application

Step 4. Select iOS, and then enter the BUNDLE ID of your TODAY EXTENSION bundle id

Step 5. Complete the wizard and load the generated GoogleService-Info.plist file. Add the plist file to the Today Extension root folder

Here you can try adding firebase via containers to your extensions.

+1
source

Source: https://habr.com/ru/post/1013118/


All Articles