Problems with Cocoapods project settings

I seem to have a problem with my project settings in Xcode 8. The problem is this:

When adding a new one Pod- let's say Pod Firebase- the installation works and adds the necessary files to my project. Then i can do@Import Firebase

All is well, up to this point. However, as soon as I make a link to an example API Firebase: [FirApp configure];- still good - autocompletion on Xcode works as expected, and no problems. However, when building, I get a compilation that says:

Undefined characters for arm64 architecture: "_OBJC_CLASS _ $ _ FIRAppIndexing" referenced: objc-class-ref in AppDelegate.o ld: character not found for arm64 architecture clang: error: linker command did not work with exit code 1 (use - v to call the call)

The only way to solve this problem is to manually add _FIRAppIndexing.frameworkto my projects, build settings, underLink Libraries with Libraries

To do this, I simply drag the frame from the project navigator to the desired section in the link libraries.

It works sometimes; as in other parts of the Firebase SDK, I get crashes while working.

So, in order to try to figure out the main reason, I created a completely new test project, installed Pods using Pod install- I didn’t, however, have to frameworkmanually add it to the libraries - it wasn’t even indicated there,

Everything in the test project worked perfectly, at the time of compilation and launch.

It makes me believe in something in my project settings that trigger this.

Things i tried

  • Completely removed cocapods with pod deintegrateand removed all other traces of this. Then he made a clean assembly. ThenPod install
  • Added -objc to linker flag

Podfile

    # Uncomment the next line to define a global platform for your project
    # platform :ios, '9.0'

    target 'MyApp' do
      # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
       use_frameworks!

      # Pods for MyApp
        pod 'Crashlytics'
        pod 'AsyncDisplayKit', '>= 2.0'
        pod 'Firebase'
        pod 'Firebase/Messaging'
        pod 'FBSDKCoreKit'
        pod "HockeySDK", :subspecs => ['AllFeaturesLib']
        pod 'Fabric'
        pod 'FirebaseAppIndexing'
        pod 'AFNetworking', '~> 3.0'
        pod '1PasswordExtension', '~> 1.8.4'

  target 'MyAppTests' do
    inherit! :search_paths
    # Pods for testing

  end

end

GitHub sample project

https://github.com/TanderZA/MyApp

. . , - , AP Firebase. Link Libraries , . , . infoplist.strings, . .

+4
4

, , .

, pods , , Obj-C, podfile.

, # use_frameworks!

, pod update

.

, .

+1

xcode, ,

:

  • xcode Pods
  • .

.

+2

?

# platform :ios, '10.0'
use_frameworks!

target 'MyApp' do
+1

, , , pod 'Firebase/Core'. pod 'Firebase'.

Firebase, .

- , , , podfile , .

I assume that they mislead us in some places where they had pod 'Firebase'. I do not think that they meant that he should carry out this work.

som try the following:

# Pods for MyApp
    pod 'Firebase/Core'
    pod 'Firebase/Messaging'
    .
    .

I know that you said you were working on a new project.

+1
source

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


All Articles