I’m currently building an iOS app via Xcode that utilises the corelocation.framework, but unfortunately I’m having some trouble. I downloaded Apple’s LocateMe example app, and it worked fine (no errors or warnings) when I ran it via the simulator.
I then built an empty, single-page app and added the corelocation.framework files to it. When I compile and run it, I get a warning:
(null): Ignoring file/Users/Andrew/Documents/GoogleDrive/Developer/
Xcode/Apps/GetLocation/CoreLocation.framework/CoreLocation, file
was built for unsupported file format ( 0xce 0xfa 0xed 0xfe 0x c 0x
0 0x 0 0x 0 0x 9 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not
the architecture being linked (i386):/Users/Andrew/Documents/
GoogleDrive/Developer/Xcode/Apps/GetLocation/CoreLocation.framework
/CoreLocation
I’ve tried finding the framework with Finder and adding it, and also dragging the framework from Apple’s app to mine. Both generate the same warning.
I can’t say much about the above error other than the file directory seems fine (that’s where my app is stored), and i386 I believe represents my MacBook Air’s integrated graphics chipset.
I’ve also tried skimming Apple’s app down to a basic level, but it’s tough – they decided to make a fairly complicated app to represent the technology.
Unfortunately my knowledge of all this needs improvement and I do feel like I’m jumping the gun with this task, but I have a bet riding on this – need to get this working by the 15th!
So if anyone could provide some guidance about why this warning is being generated, and how I can resolve it, it would be much appreciated.
UPDATE
I had a closer look at Apple’s LocateMe app, and I noticed that the build is for iOS 3.2. When I change it to iOS 5.1, it’s all fine except for a single error – locationServicesEnabled is deprecated.
Looking at your error report, it looks like you’ve managed to copy the
CoreLocation.frameworkinto your project directory.I don’t know how you’ve managed to get it here, but the first thing you need to do is delete the .framework file from that location, then remove the now red reference to CoreLocation.framework in your Xcode project.
Then do the following:
A side note:
When you select the CoreLocation.framework in the 5th bullet point above, make sure you’re selecting the CoreLocation.framework that’s underneath the iOS 5.1 folder reference.