Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Bug Report: iOS SDK 6.4.0 introduces "Undefined symbols for architecture i386" issue

ios

#1

Hi New Relic,

I just tracked down and verified a bug I was seeing with the newly release New Relic Agent 6.4.0 on iOS. I have the library integrated via CocoaPods and have specified ~> 6.3 as my version lock. Everything was working fine until today when we ran pod install on a clean machine and were upgraded to version 6.4.0 from version 6.3.2. This immediately caused the following error when building a Release build for Simulator:

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_NewRelicAgent", referenced from:
      objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)```

After trying just about everything on the internet regarding missing i386 symbols and verifying that this was only affecting Simulator + Release builds (i.e. we could build Release for archive and build Debug for Simulator, but not build Release for Simulator, which we need for testing), I finally tried rolling back to 6.3.2 and discovered it fixed the issue. My guess is that there's some issue with the .zip file you've pointed your podspec to that has stripped the old 32-bit symbols from it?

Thanks for any help and updates you can provide here,
Zack

#2

Ha well… I almost got the formatting correct on that text snippet… The end of the post says:

After trying just about everything on the internet regarding missing i386 symbols and verifying that this was only affecting Simulator + Release builds (i.e. we could build Release for archive and build Debug for Simulator, but not build Release for Simulator, which we need for testing), I finally tried rolling back to 6.3.2 and discovered it fixed the issue. My guess is that there’s some issue with the .zip file you’ve pointed your podspec to that has stripped the old 32-bit symbols from it?

Thanks for any help and updates you can provide here,
Zack


#3

Hi @zack.sheppard,
This is an intended change to reduce agent size. The i386 architecture is only for non-64-bt simulators, and the only one still supported by Xcode is the iPhone 4S simulator. Additional release notes for the agent can be found here: https://docs.newrelic.com/docs/release-notes/mobile-release-notes/ios-release-notes/ios-agent-640


#4

Hi @bryce, thanks for pointing me to that doc. It was very frustrating to debug but I’m glad to hear it was at least intentional. Now I guess I’ll have to figure out how to fix our ability to test the release version of the app in the simulator (if NR has a document like that it would probably be useful to link to it from the release docs since it’s acknowledged that this will be a breaking change for this edge case).
Cheers,
Zack


#6

I’m having the same issue as @bryce . +1 on getting some guidance on resolving the linker error when building in Xcode 10 for simulators? We’re just going to use v 6.3.2 of the CocoaPod in the interim.


#7

It’s hard to debug your exact problem without seeing your build settings, but here are some things you can try at if you’re having this problem:

  • remove i386 from your valid architectures
  • avoid targeting iPhone4s on the simulator
  • use “build active architecture only = yes” for debugging

#8

I just experienced the same issue after updating to the SDK 6.4.0 via cocoapods
use “build active architecture only = yes” for debugging
Worked for me… The weird thing is that I was targeting to run this on a iPhone 6 iOS 12 Simulator in Xcode 10. FYI, i386 is not part of my valid architectures.


#9

Thanks for your sharing, @mike14. Glad to hear it worked for you. :slight_smile:


#10

This is bad – were people complaining about the agent size? Please consider adding it back.


#11

Hey @New.Relic.User1 - Are you facing problems with the iOS agent due to this?
As @bryce mentioned, this only impacts non-64 bit simulators - Which in xCode is only iPhone 4S Devices, so we expect this to be minimally impactful.

To your question - we had a number of feature requests to reduce agent size as applications with the full iOS agent built in were hitting user’s Github file size / file transfer size limits.


#12

There is also the iPhone 5. But can I assume that I cannot run the app on 32-bit simulators anymore?


#13

Hi @j.bakker

There shouldn’t be any issues when testing an iPhone 5 on a 32-bit simulator; that being said, if you are having any trouble please let me know and we can certainly investigate this further.