Errors in demo for video streaming - ios

From this link MediaLibDemos3x , I downloaded source code and I am running it in X-Code 6.3.2 but I am getting following two errors . Can any one check it please give me a solution?
Error 1-
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_BroadcastStreamClient", referenced from:
objc-class-ref in ViewController.o
Error 2-
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

It seems the included library are not compiled for i386 (or simulators) so you must run code on real device. See author comment here and here

Undefined symbols for architecture i386
You can get this type of error if your class' .m file is not listed under the "Compile Sources" step of the "Build Phases" tab of your target.
To do this:
Target Settings -> Build Phases -> Compile Sources -> add your .m class ->Build and Run
run your app on device.

Related

xcode build fails with : "_RCTSetLogFunction", referenced from: -[AppTests testRendersWelcomeScreen] in AppTests.o

After upgrade xcode to 10.1 the project's compile fails with :
ld: warning: directory not found for option '-L/Users/divanov/Desktop/<projectName> AppTests'
Undefined symbols for architecture arm64:
"_RCTSetLogFunction", referenced from:
-[AppTests testRendersWelcomeScreen] in AppTests.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The following work around worked for me:
in XCode select the project in the left panel
Click on "Build Settings"
In the "Linking" section, find"Dead Code Stripping" section and change it "No"
Clean and Build
*** In another project I got the same error but in that case the libraries were missing in "Settings of the failing Target"/"Build Phases"/"Link Binary With", so I had to add them manually!

cocoapods linker error when i added it to my project

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

MPMusicPlayerController linker error in Xcode 5.1

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

Error with CJSONDeserializer IOS

I am new with XCode and iOS. I want to create a BD at a remote web service.
My problem is with this error:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_CJSONDeserializer", referenced from:
objc-class-ref in ViewController.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 a target, with the group of project with viewController.h and .m And other group with JSON libraries. Maybe, i have to configure something. I don't know.
It's very similar:
Select the project in the project navigator.
Select the Target in the detail view.
Select the Build Phase tab.
Expand the Compiled Sources section
Add the file CJSONDeserializer.m if it is not present there.
This will hopefully solve your problem

Architecture armv7

I´m new into OS develop and i try to run an app but got an error
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_MMPDeepSleepPreventer", referenced from:
objc-class-ref in vista.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This is the line of the problem
self.timer = [[MMPDeepSleepPreventer alloc] init];
I trying to run this example
http://blog.marcopeluso.com/2009/08/23/how-to-prevent-iphone-from-deep-sleeping/
If this is not a unit test then you need to make sure that MMPDeepSleepPreventer.m is included in your targets compile sources.
Xcode 4 Instructions:
Project Navigator -> "[Project Name]" -> Under Targets select your
target -> Build Phases -> Expand Compile Sources -> Click + at bottom
of Compile sources and add the source file.
If you continue to get similar errors then make sure all the source files are added and that you have added the necessary frameworks form the tutorial. The place to add frameworks also in the Build Phases of your target.
If this is is a unit test see the answer below the accepted one here.

Resources