My media player app was compiling fine and working seamlessly in older versions.
I upgraded my Xcode and i get the following errors
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_MPMusicPlayerController", referenced from:
objc-class-ref in libvolumectrl_r.a(PlayerVolumeControl.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have tried the following based on my previous solutions search
Added MediaPlayer.framework in build phase link libraries
included following imports in my source files
#import <MediaPlayer/MediaPlayer.h>
#import <MediaPlayer/MPMusicPlayerController.h>
i am still unable to compile. Please let me know if there are any other missing steps
Go to the Build Settings -> Valid Architectures -> remove armv7 Architecture.
Only arm64 in Architecture.
Then clean application and build it.No any linker error come.
Please follow this steps.
Regards,
Kinjal
Related
When trying to build my iOS app in Xcode, I get the following error message.
Undefined symbols for architecture i386: "OBJC_CLASS$UIPresentationController", referenced from: _OBJC_CLASS$SSSidebarPresentationController in libtools.a(SSSidebarPresentationController.o) "_OBJC_METACLASS$UIPresentationController", referenced from: _OBJC_METACLASS$_SSSidebarPresentationController in libtools.a(SSSidebarPresentationController.o) ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have the latest version of Xcode. I have tried cleaning and deleting derived data but that did not help. I've noticed a lot of other people on the internet have similar error messages but the solutions did not help me.
Add the AVFoundation and CoreLocation frameworks to your target. After you do this, delete derived data, clean, and build again.
Also, check in your architectures under build settings and make sure that you have armv7 and armv7s listed under valid architectures. If the above answer does not fix your problem then try adding or removing arm64.
i'm using cocoapods for the first time and after everything goes well
i get to run my project that was always wor˚ and got those 2 errors in lin˚er
can anyone please tell me what is it
than˚s
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_PECropViewController", referenced from:
objc-class-ref in addProductViewController.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The addProductViewController object is not found and it was referenced within AppDelegate. You do not link addProductViewController into your app. Check if your Compile Sources section within the Build Phases of your project shows addProductViewController.m
than˚s every body for your help
the problem was with arm 64 i just added it in my target and everything work fine
in architectures filed add standard architectures armv7,arm64
I have a project that uses CocoaPods. It was working but something got broken.
It does compile if I target the simulator, but If I target the devise (Build or Archive) it throws a linker error.
ld: warning: ignoring file /Users/myuser/ios/share/share/libPods.a, file was built for archive which is not the architecture being linked (armv7s): /Users/myuser/ios/share/share/libPods.a
Undefined symbols for architecture armv7s:
"_OBJC_CLASS_$_AFHTTPRequestOperationManager", referenced from:
objc-class-ref in BackendProxy.o
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I really need some help because I am really stucked.
Thanks!
EDIT: i deleted that libPods.a, that was an old one, and now it's giving me:
ld: library not found for -lPods
But only on Archive or Build for iosDevice, this is still working on the simulator.
Try removing armv7s from valid architectures section.
Build Settings -> Architectures -> Valid Architectures
I seem to be getting the error message while trying to compile TestFlightSDK in my app via cocoapods
Im my Podfile i have the line:
pod 'TestFlightSDK'
And the pod update works fine.
When i try and compile the app i get the message:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_TestFlight", referenced from:
objc-class-ref in OurDealAppDelegate_iPhone.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
my app is only supporting Architecture armv7 (because if i add armv7s or arm64 older libraries fail to compile - so i assume its something to do with this.
Is there any work around for this?
Okay, you need to confirm whether Cocoapods has included libTestFlight.a library in your project. Cocoapods has never added the library for me.
So, please follow the steps below:
Open the Pods-TestFlightSDK target in the Pods.xcodeproj project
Open Build Phases tab and add libTestFlight.a
libTestFlight.a can be found at [$SRCROOT]/Pods/TestFlightsSDK
I need to incorporate QR in my app, im using zxing,
the scan test works wonderfully, and when importing the widget after following all instructions, all goes fine,
but
I have this errors when implementing the code for the widget and QRCodeReader
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_ZXingWidgetController", referenced from:
objc-class-ref in AttendanceVC.o
"_OBJC_CLASS_$_QRCodeReader", referenced from:
objc-class-ref in AttendanceVC.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
so how to fix this please?
edit:
my Architectures on build settings is: i386 armv6 armv7
thanks a lot!
Double check step 2 in the README. Under Link Binary with Libraries you must have libZXingWidget.a and it sounds like you don't.
Check the Valid Architectures in the build settings. Check out these links.
Undefined symbols for architecture i386: _OBJC_CLASS_$_SKPSMTPMessage", referenced from: error
Undefined symbols for architecture i386
EDIT : Usually these type of linker errors occur due to the link issue in your compiler or link issue with your added frameworks or your libraries. check whether you are using a suitable compiler, check whether you have added all the required libraries and frameworks. Also check whether you have imported all the libraries and frameworks properly. Please check all these things too once. For guidance on this check the below links
http://forums.macrumors.com/showthread.php?t=956090
Apple Mach-O Linker Error when compiling for device
Linker error (only simulator) with own library after update to iPhone SDK 4.0
clang: error: linker command failed with exit code 1
Hope This Helps..
I had the same issue and following configuration in "Build Settings" works for me.
C Language Dialect: GNU99 [-std=gnu99]
C++ Language Dialect: Compiler Default
C++ Standard Library: Compiler Default