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!
source to share
I got it by adding the following files to my project (and without frameworks):
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.
source to share