I am getting an "Undefined symbol: _sampleTextMethod" error when archiving via xcode. I've been trying all day but still haven't found a solution - unity3d

I've adjusted the arm64 settings properly, but I'm still getting an error.
Error 1 : Undefined symbol: _sampleTextMethod
Error 2 : Undefined symbol: _sampleMethod
ld: warning: arm64 function not 4-byte aligned: _unwind_tester from /Users/xxxxxx/Desktop/xxxxxx/Libraries/libiPhone-lib.a(unwind_test_arm64.o)
Undefined symbols for architecture arm64:
"_sampleTextMethod", referenced from:
_share_sampleTextMethod_m44B1FCFDBA728CA7A0D9FE1EAA24957D8575A8F3 in Assembly-CSharp4.o
_share_OniOSTextSharingClick_m685A2DF9E3A15CA3E071041B699A84CF9AA20BEC in Assembly-CSharp4.o
(maybe you meant: _share_sampleTextMethod_m44B1FCFDBA728CA7A0D9FE1EAA24957D8575A8F3)
"_sampleMethod", referenced from:
_share_sampleMethod_m8BEC2F040645B44AA6F065C2B02BC2CD329B4CE0 in Assembly-CSharp4.o
(maybe you meant: _share_sampleMethod_m8BEC2F040645B44AA6F065C2B02BC2CD329B4CE0)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Also, why are the pod files red, is it just me?
enter image description here

Related

How to fix "undefined symbols" for compiling mplayer

When I try to compile mplayer on MacOS (12.4) I get an error
Undefined symbols for architecture x86_64:
"_x264_encoder_open_163", referenced from:
_X264_init in libavcodec.a(libx264.o)
Undefined symbols for architecture x86_64:
"_x264_encoder_open_163", referenced from:
_X264_init in libavcodec.a(libx264.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [mencoder] Error 1
make: *** Waiting for unfinished jobs....
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [mplayer] Error 1
Any ideas how to fix this?
The issue seem to have been with the x264 library.
And for some reasons a first reinstall of x264 did not work. But when (after some other attempts to install what is missing) I did again
brew reinstall x264
something was compiled. But then I did run the following three commands in exactly this order:
./configure
make clean
make
And to my total surprise it did compile finally mplayer. And it works (and fixes a bug only I seem to have).

Compilation error: ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

I am facing this error in compiling a project. Basically its showing error for Material components pod. Here is the detail error:
ld: warning: ignoring file /Users/rj/Library/Developer/Xcode/DerivedData/ProjectName/Build/Products/Stage-iphonesimulator/MDFInternationalization/MDFInternationalization.framework/MDFInternationalization, missing required architecture i386 in file /Users/rj/Library/Developer/Xcode/DerivedData/ProjectName/Build/Products/Stage-iphonesimulator/MDFInternationalization/MDFInternationalization.framework/MDFInternationalization (2 slices)
Undefined symbols for architecture i386:
"_MDFInsetsMakeWithLayoutDirection", referenced from:
-[MDCCollectionViewTextCell contentWrapperFrame] in MDCCollectionViewTextCell.o
-[MDCNavigationBar layoutSubviews] in MDCNavigationBar.o
"_MDFTrailingMarginAutoresizingMaskForLayoutDirection", referenced from:
-[MDCCollectionViewCell updateInterfaceForEditing] in MDCCollectionViewCell.o
-[MDCCollectionViewTextCell commonMDCCollectionViewTextCellInit] in MDCCollectionViewTextCell.o
"_MDFInsetsFlippedHorizontally", referenced from:
-[MDCFloatingButton insetBoundsForBounds:] in MDCFloatingButton.o
"_MDFLeadingMarginAutoresizingMaskForLayoutDirection", referenced from:
-[MDCCollectionViewCell updateInterfaceForEditing] in MDCCollectionViewCell.o
"_MDFRectFlippedHorizontally", referenced from:
-[MDCAlertControllerView layoutHorizontalButtons:actionSize:] in MDCAlertControllerView+Private.o
-[MDCAlertControllerView layoutVerticalButtons:] in MDCAlertControllerView+Private.o
-[MDCChipFieldTextField textRectForBounds:] in MDCChipField.o
-[MDCChipField layoutSubviews] in MDCChipField.o
-[MDCChipView layoutSubviews] in MDCChipView.o
-[MDCCollectionViewCell layoutForegroundSubviews] in MDCCollectionViewCell.o
-[MDCCollectionViewCell drawSeparatorIfNeeded] in MDCCollectionViewCell.o
...
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
As a solution i tried removing and reinstalling pods, clearing derive data and some other solutions from google. Still facing this same error.
Any help is appreciated.
Xcode 13.2, Swift

Trying to implement sharekit getting errors

Hello I am new to iphone development. I'm trying to implement share kit and am getting this error
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_SSReadingList", referenced from:
objc-class-ref in libShareKit.a(SHKReadingList.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
dont know what to do i tried using https://github.com/ShareKit/ShareKit/wiki/Installing-sharekit this link and all the steps are done still what is this error about have no clue about

Error in coredata?

I am developing an app that saving an url using coredata.I am defining NSManagedObjectContext,NsManagedObjectModel,NSPersistentStoreCoordinator in CoreDataRepository object class instead of AppDelegate.I am saving this url using reference of CoreDataRepository.I am getting below error.
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_CoreDataRepository", referenced from:
objc-class-ref in HomeViewController.o
objc-class-ref in DashBoardUrlViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any idea about this error.Thanks.
The linker can't find your CoreDataRepository class. Look in your target's Build Phases and add that source or library to either the compile or link phase, depending on where it's defined.

i386 symbols not found

Am getting this error, when using CFReadStreamRef
Undefined symbols for architecture i386:
"_CFReadStreamCreateWithFTPURL", referenced from:
-[FtpTestViewController clickMeToStart:] in FtpTestViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Am getting no where, can someone please help?
Thanks !
In your target's "link binary with libraries" build phase is "CFNetwork.framework" included?