device not working with mapkit - iphone

my device doenst work at all when i load an project that contains any mapkit framework files
it says
ld: warning: in /APP/MapKit.framework/MapKit, file was built for i386 which is not the architecture being linked (armv6)
and it doesnt let me test it on the device, however when i load this on my simulator it works.
Any help?

Maybe this post help you : Error building my app to my ipod touch:building with 'Targeted Device Family' set to iPhone only ('1') not supported with SDK 'Device - iPhone OS 3.2

It appears to be loading MapKit from the wrong directory; it's somehow trying to link against the simulator MapKit. Switch to the simulator build, right-click the framework, and make the path "relative to SDK directory" or so, and then switch back to the device build.
Alternatively, delete and re-add MapKit under "Add Existing Frameworks", which should do it correctly.

Related

Spotify Simple Player Runs on iPhone simulator, but not actual iPhone

Basically, the Simple Player Spotify sample app runs perfectly on the iPhone 6.0 simulator, but it will not run on my iPhone when I tried to test it on there. This also happens when I try to test the app I built out of the "empty cocoalibspotify project". It runs perfectly on the simulator, but gives a ton of error messages when it tries to build on my iPhone.
Am I just missing a step before I build on the actual phone?
for examples of the errors, please see the following link
here
The Spotify library you are trying to use here does not have armv7s code which is the default architecture of your iPhone 5. You need to remove the armv7s architecture from your build settings so that it compiles with armv7 instead.
It is a problem that all vendors of static libraries are having since Apple released armv7s devices (iPhone 5, iPad 4) because you cannot have a statib lib that supports i386+armv6+armv7+armv7s.

Why does XCode say that my iPhone app is only able to run on iPad?

I have a project in XCode with two targets. One target is for the iPhone only and the other is for iPad only.
The iPad target works as expected, but the iPhone target does not.
If I try to run it in the simulator, it starts the iPad simulator every time, but in iPhone compatibility mode with the 2x button.
If I try to run in on my iPhone 4 device, I get this message:
Can’t install application. The application at /Users/jacob/Documents/code/Projects/TVGuide/build/Debug-iphoneos/TVGuidePlus.app can only be installed on iPads.
This is XCode 3.2.6 and the iOS 4.3 SDK.
I have TARGETED_DEVICE_FAMILY defined at the target level and it looks like it is set correctly. The problem is the same for debug/release/...
have you selected the simulator as iphone?
most iphone apps are supposed to work on ipad too.
otherwise you may need to go to the project tab and go to project settings. there are some setting involving the choice of ios. i have not tried this since i havent recieved the error but i hope that it works.
Actually it turned out that I had Armv7 selected as architecture for my iPhone build. After changing that to armv6, I can now install and run the build on my device.

XCode 3.2.3 running on iOS3 - Wired framework

I looked around on Stack Overflow and I didn't find the solution of a strange problem.
I started developing a project on XCode 3.1 then I decided to upgrade on XCode 3.2.4 and targeting iOS3 iPhones. I then followed the topics dealing with that and I changed the Base SDK to iOS 4.1 and the target os to 3.0. Everything worked fine until I made changes to my project.
Indeed I added CoreMedia.framework to my project.
It worked well on simulator, but crashed at launch on the iPhone. Here is the log I can get:
<Notice>: dyld: Library not loaded: /System/Library/Frameworks/CoreMedia.framework/CoreMedia
Referenced from: /var/mobile/Applications/72F009B5-82A8-49DC-A5CD-708EE1A4553C/myapp.app/myapp
Reason: image not found
(I had the same problem with other frameworks like CoreVideo for example)
I tried on an iOS4 iPhone and it worked well, so I think XCode doesn't link/copy the right framework on the iPhone. When I get info on a framework under XCode, here is the path I get:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.1.sdk/System/Library/Frameworks/MediaPlayer.framework
But I get the same path when I get info on a framework of the first version of the project (when I was using XCode 3.1). It sounds like the new frameworks added have a wrong reference.
Does anybody have an idea of how to solve this problem? Any help would be greatly appreciated. :)
You have to weak link your libraries.
On xcode go to targets-> right click get info. on General tab on the lower section you will see your libs, change the CoreMedia type to be weak.
Ofcourse the lib won't be available on os3 so you'll need to add checks in your code so you wont call the lib on os3

Weird iOS4 XCode framework error

I'm converting a OS3 application to the new iOS4 release. What I did was download the new XCode and the new SDK, and just opened the application. I clicked on the "Build & Run" and I'm getting an error that looks like this for every the Foundation, CoreGraphics and CoreLocation frameworks-
warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/System/Library/Frameworks/CoreLocation.framework/CoreLocation, missing required architecture i386 in file
The application worked perfectly under 3.0 and I never had any issues. I did make sure that the Base SDK is set to iPhone Device 4.0.
Would you guys be able to tell me what I'm doing wrong or point me in the right direction to get this fixed? Thanks for any help!
Open up the Target Info and make sure that "Framework search paths" only has the $(inherited) option.

Universal iPhone/iPad Windows-based app with Core Data crashes on iPhone SDK 4 beta 3

I installed iPhone OS 4.0 Beta 3. When I create a new Windows-based universal app with Core Data (File > New Project > Windows-based Application ---> select Universal in drop down and check the "Use Core Data for storage" check box) the app launches fine into the iPhone simulator but crashes in the iPad simulator.
The console message returned is:
dyld: Symbol not found: _OBJC_CLASS_$_NSURL
Referenced from: /Users/tarfa/Library/Application Support/iPhone Simulator/3.2/Applications/5BB644DC-9370-4894-8884-BAEBA64D9ED0/Universal.app/Universal
Expected in: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
I'm stumped. Anyone else experiencing this problem?
Any legitimate answer to your question is under NDA. You might consider, though, looking to see if anything like this is mentioned in the Known Issues section of the beta release notes.
Ok, got it. Place this snippet at the top of source files using NSURL:
#ifndef __GNUC__
#define __asm__ asm
#endif
__asm__(".weak_reference _OBJC_CLASS_$_NSURL");
Now the app launches properly in the iPad simulator.