IPhone Simulator versus testing iPhone OS: file does not have the required architecture

I am working on an iphone application (sdk 3.1.3) and I have added a corelocation and mapkit structure. I used the iphonesimulator package, but added them using "relative to the current sdk". When I test my application on iphone simulatore, everything works. But when I switch to the 3.1.3 iphone device, I get 2 warnings and 4 build errors:

warnings:

.../corelocation file does not have the required architecture
.../mapkit file does not have the required architecture

errors:

 "_OBJC_CLASS_$_MKReverseGeocoder", referenced from:<br /> __objc_classrefs__DATA@0 in VMLViewController.o<br /> "_OBJC_CLASS_$_MKPinAnnotationView", referenced from:<br /> __objc_classrefs__DATA@0 in VMLViewController.o<br /> "_OBJC_CLASS_$_CLLocationManager", referenced from:<br /> __objc_classrefs__DATA@0 in VMLViewController.o<br /> "_kCLLocationAccuracyBest", referenced from:<br /> _kCLLocationAccuracyBest$non_lazy_ptr in VMLViewController.o<br /> ld: symbol(s) not found<br /> collect2: ld returned 1 exit status<br /> Build failed (4 errors, 2 warnings)<br /> 

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

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

hello

Thomas

+4
source share
3 answers

I have the same problem too, I solved it by adding CoreLocation.framework inside the Frameworks folder.

+16
source

In this information window, check the "full path" of the MapKit.framework package, then use the "file" command in the terminal window to check which architecture is the library. Must 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 
0
source

Go to Goals → Form Phases → Add CoreLocation Framework.

0
source

Source: https://habr.com/ru/post/1303242/


All Articles