Location Manager with iMac - objective-c

I am using CLLocationManager.
I got this compile error:
Ld /Users/Teguh/Library/Developer/Xcode/DerivedData/BadgerNew-bjopcgcgsjkcvcevflfbvsjwfgnu/Build/Products/Debug-iphonesimulator/BadgerNew.app/BadgerNew normal i386
cd /Users/Teguh/Dropbox/badgers/BadgerNew
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-g++-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk -L/Users/Teguh/Library/Developer/Xcode/DerivedData/BadgerNew-bjopcgcgsjkcvcevflfbvsjwfgnu/Build/Products/Debug-iphonesimulator -F/Users/Teguh/Library/Developer/Xcode/DerivedData/BadgerNew-bjopcgcgsjkcvcevflfbvsjwfgnu/Build/Products/Debug-iphonesimulator -filelist /Users/Teguh/Library/Developer/Xcode/DerivedData/BadgerNew-bjopcgcgsjkcvcevflfbvsjwfgnu/Build/Intermediates/BadgerNew.build/Debug-iphonesimulator/BadgerNew.build/Objects-normal/i386/BadgerNew.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -framework UIKit -framework Foundation -framework CoreGraphics -framework CoreData -o /Users/Teguh/Library/Developer/Xcode/DerivedData/BadgerNew-bjopcgcgsjkcvcevflfbvsjwfgnu/Build/Products/Debug-iphonesimulator/BadgerNew.app/BadgerNew
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_CLLocationManager", referenced from:
objc-class-ref in UtilitiesQuick.o
"_kCLLocationAccuracyBest", referenced from:
-[BNUtilitiesQuick init] in UtilitiesQuick.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
So how am I supposed to program CLLocationmanager? I mean does that mean location manager is not available on iMac?

You need to add CoreLocation.framework to your project.

I got the same issue.. after a long struggle I found the issue..
I resolved it this way..
Go to Build Settings
Search for 'framework search path'
And delete the pre filled path.
Now it works perfectly.. I have given the answer in this question.. hope it helps some one..

Related

Google Mobile Ad SDK Ios7 missing audio framework

Trying to add Google Mobile Ad SDK to a project and looks like i'm missing a frame work. I've added the AVfoundation frame work to the project but still triggering these.
Ld /Users/kevzettler/Library/Developer/Xcode/DerivedData/ForgeInspector-hatfxtfbvtjkzgalvydfjjdmgdvi/Build/Products/Debug-iphonesimulator/ForgeInspector.app/ForgeInspector normal i386
cd /Users/kevzettler/checkiday/forge-admob/inspector/ios-inspector
setenv IPHONEOS_DEPLOYMENT_TARGET 5.0.1
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk -L/Users/kevzettler/Library/Developer/Xcode/DerivedData/ForgeInspector-hatfxtfbvtjkzgalvydfjjdmgdvi/Build/Products/Debug-iphonesimulator -F/Users/kevzettler/Library/Developer/Xcode/DerivedData/ForgeInspector-hatfxtfbvtjkzgalvydfjjdmgdvi/Build/Products/Debug-iphonesimulator -F/Users/kevzettler/checkiday/forge-admob/inspector/ios-inspector -filelist /Users/kevzettler/Library/Developer/Xcode/DerivedData/ForgeInspector-hatfxtfbvtjkzgalvydfjjdmgdvi/Build/Intermediates/ForgeInspector.build/Debug-iphonesimulator/ForgeInspector.build/Objects-normal/i386/ForgeInspector.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -ObjC -all_load -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=5.0.1 /Users/kevzettler/Library/Developer/Xcode/DerivedData/ForgeInspector-hatfxtfbvtjkzgalvydfjjdmgdvi/Build/Products/Debug-iphonesimulator/libForgeModule.a -framework SystemConfiguration -framework AssetsLibrary -framework UIKit -framework Foundation -framework CoreGraphics -framework ForgeCore -Xlinker -dependency_info -Xlinker /Users/kevzettler/Library/Developer/Xcode/DerivedData/ForgeInspector-hatfxtfbvtjkzgalvydfjjdmgdvi/Build/Intermediates/ForgeInspector.build/Debug-iphonesimulator/ForgeInspector.build/Objects-normal/i386/ForgeInspector_dependency_info.dat -o /Users/kevzettler/Library/Developer/Xcode/DerivedData/ForgeInspector-hatfxtfbvtjkzgalvydfjjdmgdvi/Build/Products/Debug-iphonesimulator/ForgeInspector.app/ForgeInspector
Undefined symbols for architecture i386:
"_AVAudioSessionPortBuiltInSpeaker", referenced from:
-[GADDevice audioRouteUsingAVAudioSession] in libForgeModule.a(GADDevice.o)
"_AVAudioSessionPortHeadphones", referenced from:
-[GADDevice audioRouteUsingAVAudioSession] in libForgeModule.a(GADDevice.o)
"_AudioServicesPlaySystemSound", referenced from:
-[GADDefaultGMSGHandler didReceiveVibrateNotification:] in libForgeModule.a(GADDefaultGMSGHandler.o)
"_AudioSessionGetProperty", referenced from:
-[GADDevice audioRouteUsingAudioToolkit] in libForgeModule.a(GADDevice.o)
"_AudioSessionInitialize", referenced from:
-[GADDevice audioRouteUsingAudioToolkit] in libForgeModule.a(GADDevice.o)
"_OBJC_CLASS_$_ASIdentifierManager", referenced from:
objc-class-ref in libForgeModule.a(GADDevice.o)
"_OBJC_CLASS_$_AVAudioSession", referenced from:
objc-class-ref in libForgeModule.a(GADDevice.o)
"_OBJC_CLASS_$_MFMailComposeViewController", referenced from:
objc-class-ref in libForgeModule.a(GADOpener.o)
"_OBJC_CLASS_$_MFMessageComposeViewController", referenced from:
objc-class-ref in libForgeModule.a(GADOpener.o)
"_OBJC_CLASS_$_SKStoreProductViewController", referenced from:
objc-class-ref in libForgeModule.a(GADOpener.o)
"_SKStoreProductParameterITunesItemIdentifier", referenced from:
-[GADOpener openInAppStore:fallbackURLString:] in libForgeModule.a(GADOpener.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
frameworks in build phase:
You need the AudioToolbox framework for those remaining AVAudioSession... and AudioSession... symbols.
You also need the StoreKit and MessageUI frameworks for the other symbols.
Ok looks like the problem was that I am building a module for trigger.io and it has nested xcode projects. I was adding the frameworks to a child project when the parent project was what actually needed them.

New Apple Mach-O link (id) error

Last night, when I finished working on my project, there were no errors. But today, when I opened my project, I had the Apple Mach-O link (id) error. Here is the error: `Ld /Users/chandlerdeangelis/Library/Developer/Xcode/DerivedData/WhereAmI-bdyziqhatjrwffgkgfvwvtoxdroa/Build/Products/Debug-iphonesimulator/WhereAmI.app/WhereAmI normal i386
cd "/Users/chandlerdeangelis/Desktop/Real Estate App"
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -L/Users/chandlerdeangelis/Library/Developer/Xcode/DerivedData/WhereAmI-bdyziqhatjrwffgkgfvwvtoxdroa/Build/Products/Debug-iphonesimulator -F/Users/chandlerdeangelis/Library/Developer/Xcode/DerivedData/WhereAmI-bdyziqhatjrwffgkgfvwvtoxdroa/Build/Products/Debug-iphonesimulator -filelist /Users/chandlerdeangelis/Library/Developer/Xcode/DerivedData/WhereAmI-bdyziqhatjrwffgkgfvwvtoxdroa/Build/Intermediates/WhereAmI.build/Debug-iphonesimulator/WhereAmI.build/Objects-normal/i386/WhereAmI.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50100 -framework MapKit -framework CoreLocation -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/chandlerdeangelis/Library/Developer/Xcode/DerivedData/WhereAmI-bdyziqhatjrwffgkgfvwvtoxdroa/Build/Products/Debug-iphonesimulator/WhereAmI.app/WhereAmI
duplicate symbol _OBJC_IVAR_$_WhereAmIAppDelegate._window in:
/Users/chandlerdeangelis/Library/Developer/Xcode/DerivedData/WhereAmI-bdyziqhatjrwffgkgfvwvtoxdroa/Build/Intermediates/WhereAmI.build/Debug-iphonesimulator/WhereAmI.build/Objects-normal/i386/WhereAmIAppDelegate.o
/Users/chandlerdeangelis/Library/Developer/Xcode/DerivedData/WhereAmI-bdyziqhatjrwffgkgfvwvtoxdroa/Build/Intermediates/WhereAmI.build/Debug-iphonesimulator/WhereAmI.build/Objects-normal/i386/WhereAmIViewController.o
duplicate symbol _OBJC_IVAR_$_WhereAmIAppDelegate._viewController in:
/Users/chandlerdeangelis/Library/Developer/Xcode/DerivedData/WhereAmI-bdyziqhatjrwffgkgfvwvtoxdroa/Build/Intermediates/WhereAmI.build/Debug-iphonesimulator/WhereAmI.build/Objects-normal/i386/WhereAmIAppDelegate.o
/Users/chandlerdeangelis/Library/Developer/Xcode/DerivedData/WhereAmI-bdyziqhatjrwffgkgfvwvtoxdroa/Build/Intermediates/WhereAmI.build/Debug-iphonesimulator/WhereAmI.build/Objects-normal/i386/WhereAmIViewController.o
duplicate symbol _OBJC_METACLASS_$_WhereAmIAppDelegate in:
/Users/chandlerdeangelis/Library/Developer/Xcode/DerivedData/WhereAmI-bdyziqhatjrwffgkgfvwvtoxdroa/Build/Intermediates/WhereAmI.build/Debug-iphonesimulator/WhereAmI.build/Objects-normal/i386/WhereAmIAppDelegate.o
/Users/chandlerdeangelis/Library/Developer/Xcode/DerivedData/WhereAmI-bdyziqhatjrwffgkgfvwvtoxdroa/Build/Intermediates/WhereAmI.build/Debug-iphonesimulator/WhereAmI.build/Objects-normal/i386/WhereAmIViewController.o
duplicate symbol _OBJC_CLASS_$_WhereAmIAppDelegate in:
/Users/chandlerdeangelis/Library/Developer/Xcode/DerivedData/WhereAmI-bdyziqhatjrwffgkgfvwvtoxdroa/Build/Intermediates/WhereAmI.build/Debug-iphonesimulator/WhereAmI.build/Objects-normal/i386/WhereAmIAppDelegate.o
/Users/chandlerdeangelis/Library/Developer/Xcode/DerivedData/WhereAmI-bdyziqhatjrwffgkgfvwvtoxdroa/Build/Intermediates/WhereAmI.build/Debug-iphonesimulator/WhereAmI.build/Objects-normal/i386/WhereAmIViewController.o
ld: 4 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
`
Can anyone help me out?
Several symbols, (WhereAmIAppDelegate._window, WhereAmIAppDelegate._viewController, ...) are defined duplicate: in WhereAmIAppDelegate.o and in WhereAmIViewController.o.
A likely cause for this error is that you have imported an ".m" file instead of the ".h" file somewhere. Perhaps you have an #import "WhereAmIAppDelegate.m" in WhereAmIViewController.m" ?

Xcode 4.3.3 - Error Undefined Symbols

hy all,
I am building an application to create a simple tableview, with a search bar on top to search between the elements of the table.
I have followed a tutorial and no coding errors were found, but when building, it always fails showing the following message:
Ld /Users/gouyoun/Library/Developer/Xcode/DerivedData/ERCDictionnary-atjolczeormaykcscwvnhlxdcnvk/Build/Products/Debug-iphonesimulator/ERCDictionnary.app/ERCDictionnary normal i386
cd /Users/gouyoun/Desktop/ERCDictionnary/ERCDictionnary
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Volumes/Xcode/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Volumes/Xcode/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -L/Users/gouyoun/Library/Developer/Xcode/DerivedData/ERCDictionnary-atjolczeormaykcscwvnhlxdcnvk/Build/Products/Debug-iphonesimulator -F/Users/gouyoun/Library/Developer/Xcode/DerivedData/ERCDictionnary-atjolczeormaykcscwvnhlxdcnvk/Build/Products/Debug-iphonesimulator -filelist /Users/gouyoun/Library/Developer/Xcode/DerivedData/ERCDictionnary-atjolczeormaykcscwvnhlxdcnvk/Build/Intermediates/ERCDictionnary.build/Debug-iphonesimulator/ERCDictionnary.build/Objects-normal/i386/ERCDictionnary.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50100 -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/gouyoun/Library/Developer/Xcode/DerivedData/ERCDictionnary-atjolczeormaykcscwvnhlxdcnvk/Build/Products/Debug-iphonesimulator/ERCDictionnary.app/ERCDictionnary
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_OverlayViewController", referenced from:
objc-class-ref in tableView.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
"_OBJC_CLASS_$_OverlayViewController", referenced from:
objc-class-ref in tableView.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I'm a newb in OBjective C, any ideas?
Your tableView class refers to a class called OverlayViewController which is not in your project.
Its done, it only needed to remove the files and re-add them later, it worked like a charm
I've had the exact same error. It occured because I had 2 xCode Projects open, an Dragged & Dropped a class from one project to the other one. I checked "Copy to project" and the files where in the new projects folder. But it crashed every time.
I deleted the classes and IMPORTED them into the project and then it worked... So be careful when using Drag'n'Drop!

Apple Mach-o linke(Id) error undefined symbols for architecture i386 AppDelegate.o

Hi I have been having this problem for a very long time and its driving me insane.
Ld /Users/soc/Library/Developer/Xcode/DerivedData/friendSpotted-dohwbjpnqfiztkcphlehsjqjusjk/Build/Products/Debug-iphonesimulator/friendSpotted.app/friendSpotted normal i386
cd /Users/soc/Desktop/friendSpotted
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -L/Users/soc/Library/Developer/Xcode/DerivedData/friendSpotted-dohwbjpnqfiztkcphlehsjqjusjk/Build/Products/Debug-iphonesimulator -F/Users/soc/Library/Developer/Xcode/DerivedData/friendSpotted-dohwbjpnqfiztkcphlehsjqjusjk/Build/Products/Debug-iphonesimulator -filelist /Users/soc/Library/Developer/Xcode/DerivedData/friendSpotted-dohwbjpnqfiztkcphlehsjqjusjk/Build/Intermediates/friendSpotted.build/Debug-iphonesimulator/friendSpotted.build/Objects-normal/i386/friendSpotted.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 -framework MobileCoreServices -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/soc/Library/Developer/Xcode/DerivedData/friendSpotted-dohwbjpnqfiztkcphlehsjqjusjk/Build/Products/Debug-iphonesimulator/friendSpotted.app/friendSpotted
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_ViewController", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This has literally put me at a dead end, and I have tried some solutions on this site to no avail. I have checked the viewController.m to see if it was targeting the right project which it was, and as far as I can see I have all the right frameworks added. See below:
http://imgur.com/AeLny
Please I really do need help with this, I will greatly appreciate it.

libmms linking error

i have downoaded the wunder radio project, i have copy the MMS project in my workspace.
if i try to use mms_connect Xcode4 give me this error:
Ld
/Users/Alex/Library/Developer/Xcode/DerivedData/test1-gevnovbiecnctxguaabsznvdybxa/Build/Products/Debug-iphonesimulator/test1.app/test1
normal i386
cd /Users/Alex/Source/test1
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH
"/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2
-arch i386 -isysroot
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk
-L/Users/Alex/Library/Developer/Xcode/DerivedData/test1-gevnovbiecnctxguaabsznvdybxa/Build/Products/Debug-iphonesimulator
-F/Users/Alex/Library/Developer/Xcode/DerivedData/test1-gevnovbiecnctxguaabsznvdybxa/Build/Products/Debug-iphonesimulator
-filelist
/Users/Alex/Library/Developer/Xcode/DerivedData/test1-gevnovbiecnctxguaabsznvdybxa/Build/Intermediates/test1.build/Debug-iphonesimulator/test1.build/Objects-normal/i386/test1.LinkFileList
-mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -lz.1
-framework UIKit -framework Foundation -framework CoreGraphics -o
/Users/Alex/Library/Developer/Xcode/DerivedData/test1-gevnovbiecnctxguaabsznvdybxa/Build/Products/Debug-iphonesimulator/test1.app/test1
Undefined symbols for architecture i386: "_mms_connect", referenced
from:
-[test1AppDelegate application:didFinishLaunchingWithOptions:]
in test1AppDelegate.o ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
have any idea to resolve it?
It looks like the linker is failing to link to libmms because it is of the wrong architecture. The project you are building appears to be for the iPhone simulator. Since the simulator runs on your computer it's architecture is i386 (or perhaps x86_64 depending upon the machine you are using). So basically you are compiling using i386 but when the linker tried to link to libmms it did not find that libmms had been compiled using the same architecture.
Since iOS devices use armv6 or armv7 architectures and the simulator uses i386, it can be quite difficult to switch back and forth between building for the actual device or building for the simulator since any external static libraries need to be built for all 3 architectures.
You'll likely need to rebuild libmms using the i386 architecture.