Crashlytics error: Undefined symbols for architecture arm64
Asked Answered
S

11

25

After I updated Fabric Crashlytics in my app I cant anymore run it on my iOS device. On simulator it works fine. Error is:

Undefined symbols for architecture arm64: "_gzopen", referenced from: -[CLSPackageReportOperation compressFile:] in Crashlytics(CLSPackageReportOperation.o) "_gzwrite", referenced from: ___42-[CLSPackageReportOperation compressFile:]_block_invoke in Crashlytics(CLSPackageReportOperation.o) "_gzclose", referenced from: -[CLSPackageReportOperation compressFile:] in Crashlytics(CLSPackageReportOperation.o) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

enter image description here

Slam answered 25/8, 2015 at 9:22 Comment(3)
It looks like you need link to zlib.Cupbearer
add libc++ and you are done.Lucic
I've already answered that question on this post: https://mcmap.net/q/269238/-crashlytics-in-ios-won-39-t-proceed-past-quot-build-your-project-quot-in-fabric-appEsperanto
S
5

Solved. I removed Crashlytics.framework and reinstall it.

Slam answered 22/9, 2015 at 13:20 Comment(0)
B
50

Crashlytics and Fabric require you to link your target against the following:

  • Security.framework
  • SystemConfiguration.framework
  • libc++
  • libz

Just select your target -> Build Phases -> Link Binary with Libraries -> add the ones missing.

I hope it helped.

Bala answered 29/6, 2016 at 11:51 Comment(1)
This works. Make sure you also add this to any test targets! That was my problem.Yancey
J
20

I solved this issue by just adding $(inherited) to other linker flags in Build Settings.

Julienne answered 28/7, 2017 at 6:47 Comment(0)
Y
16

I run into a similar issue, when I was updating an app that was created before Xcode 5.

Since Xcode 5 new projects build with modules enabled by default. In my old app "Enable Modules" was set to "No". So this was the solution.

In the Build Settings set Enable Modules (C and Objective-C) to YES

Yellow answered 3/4, 2016 at 16:43 Comment(0)
M
6

For me, the solution was Build Phases - Link Binary With Libraries add libc++ and works, in my legacy project.

Midwife answered 6/3, 2016 at 16:33 Comment(0)
S
5

Solved. I removed Crashlytics.framework and reinstall it.

Slam answered 22/9, 2015 at 13:20 Comment(0)
A
4

My solution for this problem was:

Change "Build Active Architecture Only" to "Yes" also for "Release".

The setting can be found selecting your project > "Build Settings" > "Targets" (your target) > "Architectures"

enter image description here

do it in your project targets and also do it in your projectTest targets

enter image description here

Abolition answered 17/11, 2020 at 17:23 Comment(0)
C
3

Extending Ricardo's answer here. Select the “Build Phases” tab, click the “+” next to “Link Binary With Libraries” and add -

  1. Security.framework
  2. SystemConfiguration.framework
  3. StoreKit.framework
  4. libsqlite3.tbd
  5. libz.tbd
  6. libc++.tbd

As per Google, developers should use Crashlytics via Firebase. This worked for me as of Firebase v5.16.0 and Fabric v1.9.0 (Xcode 10.1).

Carlisle answered 23/1, 2019 at 23:10 Comment(0)
A
3

I solved the issue by adding $(inherited) $(OTHER_LDFLAGS) -ObjC -l"sqlite3" -l"z" -l"c++" -framework "Crashlytics" -framework "Fabric" -framework "Security" -framework "SystemConfiguration" -framework "UIKit" to other linker flags in Build Settings.

Aksum answered 15/5, 2019 at 6:37 Comment(0)
S
1

On M1 Mac

In Excluded Architectures Add "Any iOS Simulator SDK" - "arm64" in Target, Test, and all libraries you added.

enter image description here

Stretchy answered 6/4, 2021 at 13:53 Comment(0)
C
0

In Project(not target) Info tab set the configuration file to none and run pod install again

Crankpin answered 21/8, 2018 at 13:47 Comment(0)
F
0

I solved it by removing "library which causes the error" from other linker flags.

Fieldwork answered 21/9, 2021 at 19:45 Comment(1)
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.Ataraxia

© 2022 - 2024 — McMap. All rights reserved.