Error adding iOS segment frame manually

I am trying to add the iOS framework manually to my application. When I build the project, it ends up with the following error: "Undefined symbols for i386 architecture" and logs.

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_Amplitude", referenced from:
      objc-class-ref in Analytics(SEGAmplitudeIntegration.o)
  "_OBJC_CLASS_$_AppsFlyerTracker", referenced from:
      objc-class-ref in Analytics(SEGAppsFlyerIntegration.o)
  "_OBJC_CLASS_$_Bugsnag", referenced from:
      objc-class-ref in Analytics(SEGBugsnagIntegration.o)
  "_OBJC_CLASS_$_Countly", referenced from:
      objc-class-ref in Analytics(SEGCountlyIntegration.o)
  "_OBJC_CLASS_$_Crittercism", referenced from:
      objc-class-ref in Analytics(SEGCrittercismIntegration.o)
  "_OBJC_CLASS_$_CrittercismConfig", referenced from:
      objc-class-ref in Analytics(SEGCrittercismIntegration.o)
  "_OBJC_CLASS_$_Flurry", referenced from:
      objc-class-ref in Analytics(SEGFlurryIntegration.o)
  "_OBJC_CLASS_$_GAI", referenced from:
      objc-class-ref in Analytics(SEGGoogleAnalyticsIntegration.o)
  "_OBJC_CLASS_$_GAIDictionaryBuilder", referenced from:
      objc-class-ref in Analytics(SEGGoogleAnalyticsIntegration.o)
  "_OBJC_CLASS_$_KahunaAnalytics", referenced from:
      objc-class-ref in Analytics(SEGKahunaIntegration.o)
  "_OBJC_CLASS_$_Localytics", referenced from:
      objc-class-ref in Analytics(SEGLocalyticsIntegration.o)
  "_OBJC_CLASS_$_Mixpanel", referenced from:
      objc-class-ref in Analytics(SEGMixpanelIntegration.o)
  "_OBJC_CLASS_$_QuantcastMeasurement", referenced from:
      objc-class-ref in Analytics(SEGQuantcastIntegration.o)
  "_OBJC_CLASS_$_TRVSDictionaryWithCaseInsensitivity", referenced from:
      objc-class-ref in Analytics(SEGAnalyticsIntegration.o)
  "_OBJC_CLASS_$_TSConfig", referenced from:
      objc-class-ref in Analytics(SEGTapstreamIntegration.o)
  "_OBJC_CLASS_$_TSEvent", referenced from:
      objc-class-ref in Analytics(SEGTapstreamIntegration.o)
  "_OBJC_CLASS_$_TSTapstream", referenced from:
      objc-class-ref in Analytics(SEGTapstreamIntegration.o)
  "_kGAIScreenName", referenced from:
      -[SEGGoogleAnalyticsIntegration screen:properties:options:] in Analytics(SEGGoogleAnalyticsIntegration.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

      

How to solve this error, I strictly follow all instructions here . However, it simply cannot be solved.

Please, help!

+3


source to share


4 answers


I used to add Segment frames with Cocoa pods and everything works great! But still I am waiting for an answer to help add it manually.



+1


source


This means more frameworks are required. In the beginning there were 21 errors, but after adding CoreLocation.Framework there were only 19, so you need to find out which frameworks you need to add to your project.



+1


source


I got it by adding the following files to my project (and without frameworks):

Files needed for Segment.IO to work correctly

I also added the line

#import "Analytics.h"

to my header file (as I am using Swift).

This works for me because I am not using any client side integrations (they are used on the server though).

I got these files using cocoapods on a separate branch with a podfile line

pod 'Analytics/Segmentio'

Once I did that, I switched back to my main branch (where no cocoapods were used) and pulled those files (and none of the CocoaPods config files) from the Pods folder.

+1


source


You may have missed some library or framework. Remove Analytics.framework once and add again. Make sure your path is correct for both the project and the target under Build Setup (linker path).

0


source







All Articles