views:

770

answers:

1

hi there,

i'm working on an iphone app ( sdk 3.1.3 ) and I have added the corelocation and mapkit framework. I used the iphonesimulator package, but added them using 'relative to current sdk'. When I test my app in the iphone simulatore everything works. But when I switch to iphone device 3.1.3 i'm getting 2 warnings and 4 build errors:

warnings:

.../corelocation file is not of required architecture
.../mapkit file is not of required architecture

errors:

"_OBJC_CLASS_$_MKReverseGeocoder", referenced from:
__objc_classrefs__DATA@0 in VMLViewController.o
"_OBJC_CLASS_$_MKPinAnnotationView", referenced from:
__objc_classrefs__DATA@0 in VMLViewController.o
"_OBJC_CLASS_$_CLLocationManager", referenced from:
__objc_classrefs__DATA@0 in VMLViewController.o
"_kCLLocationAccuracyBest", referenced from:
_kCLLocationAccuracyBest$non_lazy_ptr in VMLViewController.o
ld: symbol(s) not found

collect2: ld returned 1 exit status
Build failed (4 errors, 2 warnings)

I right-clicked on the mapkit framework package, checked get info and the path is set as: System/Library/Frameworks/MapKit.framework

I have basic iphone dev knowledge, but i don't know what the problem is... Can anyone help me out?

Greets,

Thomas

A: 

In that get info window, check the "full path" of the MapKit.framework package, then in a Terminal window use the "file" command to verify what architecture the library is. Should see something like:

file /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.2.sdk/System/Library/Frameworks/MapKit.framework/MapKit
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.2.sdk/System/Library/Frameworks/MapKit.framework/MapKit: Mach-O universal binary with 2 architectures
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.2.sdk/System/Library/Frameworks/MapKit.framework/MapKit (for architecture armv6): Mach-O dynamically linked shared library arm
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.2.sdk/System/Library/Frameworks/MapKit.framework/MapKit (for architecture armv7): Mach-O dynamically linked shared library arm
David Gelhar
thanks for the quick reply, this is the full path/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.2.sdk/System/Library/Frameworks/MapKit.frameworkin the terminal, after adding /mapkit to the url i get: Mach-O universal binary with 2 architectures(for architecture cputype (12) cpusubtype (6)): Mach-O dynamically linked shared library arm(for architecture cputype (12) cpusubtype (9)): Mach-O dynamically linked shared library arm
Thomas Joos
I believe cputype (12) is arm, so that looks correct. Not sure what else to suggest other than the usual voodoo of removing/re-adding the offending frameworks etc.
David Gelhar