ios – Getting a linker error for a pod utilized in one app extension however the identical pod is utilized in different extensions which do hyperlink


I’ve obtained an app which is utilizing 5 app extensions. I’ve simply added Cocoalumberjack to the app and all the extension nevertheless there is a linker error with the CallKit extension, nevertheless the opposite extensions construct and hyperlink with out situation.

Here is the related part of the pod file displaying the CallKit extension and a few different extensions for comparability:

workspace 'MyProject'
<snip>
goal 'CallExtension' do 
   mission 'MyProject.xcodeproj'
   pod 'Firebase/Crashlytics', :modular_headers => true
   pod 'GoogleUtilities', :modular_headers => true
   pod 'CocoaLumberjack/Swift'
finish


goal 'UnwantedCommunicationExtension' do
    mission 'MyProject.xcodeproj'
    pod 'PhoneNumberKit'
    pod 'Firebase/Crashlytics', :modular_headers => true
    pod 'GoogleUtilities', :modular_headers => true
    pod 'CocoaLumberjack/Swift'
finish

goal 'NotificationContentExtension' do
    mission 'MyProject.xcodeproj'
    pod 'PhoneNumberKit'
    pod 'RealmSwift'
    pod 'Firebase/Crashlytics', :modular_headers => true
    pod 'GoogleUtilities', :modular_headers => true
    pod 'CocoaLumberjack/Swift'
finish

The error is

Hyperlink CallExtension (arm64)
<snip>
ld: library not discovered for -lCocoaLumberjack

The opposite extensions construct and hyperlink, its solely the decision extension that will not hyperlink.

I observed that within the Construct Phases part of Xcode, all the opposite extension have a Copy Pod Sources part, nevertheless the Name Extension doesn’t.

First query is – is the absence of the Copy Pod Sources part liable for the linker error?

Second query – why did the pod set up command not create the Copy Pod Sources part for the decision extension, but it did for the opposite extensions?

I attempted to do a pod deintegrate adopted by a pod set up, however there’s nonetheless no Copy Pod Sources part for the decision extension.

Third query – subsequently how can I power pod instal to create the Copy Pod Sources part?

(The hyperlink binary with libraries part has the pods current:
enter image description here)

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles