mapkit framework is not present in xcode - iphone

I am working on a project where I am using mapView, in projects build phases mapkit framework is not present what could be the problem, please check the image below

Take the mapkit framework from another xcode or download it from the frameworks section in the apple developers website. You simply have to copy it and add it to xcode or you can even add it to your project from the folder which contains all the frameworks. If they still don't come then you will have to reinstall your xcode. Hope it works out just fine.
Or you can directly download from here MapKit.framework

Check if you can retrieve frameworks from the original folder :
Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/System/Library

In any previous application making you had delete the framework directly that's why it was not showing in xcode. please reinstall the xcode you will get it. or you can download it from apple site.

Related

CFNetwork.framework deleted by mistake in xcode4

I have included CFNetwork.framework in my app. And later when not required i just right click and deleted by mistake. Now my iPhone app is not getting built saying CFNetwork.h is missing.
In add libraries I searched but couldn't find the framework in the list.
(1) Is there any way to recover the deleted CFNetwork.framework.
(2) Is there any way to download this framework and add it to the Xcode or SDK ?
Try this
1.Go to summary in xcode
2.Click the + button below linked binaries and frameworks
3.From there select your desired frame work and then click add
Now you have successfully added your framework to your project

How do I locate/obtain the CoreMedia.framework and begin working with it?

I tried googling it but it's hard to find it. Is there any way to download the CoreMedia framework to include in my app?
In your Xcode project, there will be several frameworks (in the "Frameworks" folder). If you right click any of these and then click "Show in Finder" you can have a complete list of all the frameworks, ready to drag and drop into your project. CoreMedia.framework is one of these. This applies to all versions of Xcode.
It's included with XCode, just add a new framework under the "link to other libraries" build phase.
This is included with the iOS SDK. You can link against the Core Media framework in Xcode. The reason why you don't find it anywhere is because it doesn't come separately.
It's already there if you have installed the iOS SDK. You need to add the framework to your project. Which version of Xcode are you using?

iPhone framework paths?

I recently moved my projects to a new mac, along with a newer version of Xcode.
When i opened my project i noticed that some files were red. So i remapped them by setting the path (by project path) and then providing the proper path location.
Now my problem is that the frameworks that i have are red, and i cant find their location! I did set the framework paths to be "relative to current SDK" however.
Can anybody help me get my frameworks mapped correctly?
The frameworks im using are:
- QuartzCore.framework
- libsqlite3.0.dylib
- UIKit.framework
- Foundation.frameowrk
- CoreGraphics.framework
The XCode version is 3.1.4 (the only one installed).
The iPhone app was originally created using a prior version of Xcode (i dont remember which version).
I still dont have an answer. Im going deeper into this mess of a problem that Apple created.
In all my .m files im importing
How can i add this UIKit framework to my project Target with respect to the current SDK?
In fact, forget about the ref w/ respect to the SDK, let's just get the framework from the 3.0 SDK as a referenced framework. Right now when i reference it is red.
Note: references related to frameworks, everything about it, is driving me insane, and making me more frustrated at apple for this sloppiness, more than ever.
Any help is greatly appreciated.
I had exactly this problem. Somehow 'Base SDK' in Build Settings of a project was set to Mac OS X after I have installed Xcode 4.2.
Click on your project, change Base SDK to 'Latest iOS' and enjoy the vibe.
If you double click on your target to bring up the info pane you will see a tab labeled "Linked Libraries". From here you can click the plus button to add the libraries and xcode will do the right thing when you add the desired frameworks
I was having the same issue with red frameworks and bad pathing. If you're getting an error that says, "Base SDK Missing" you'll need to Get Info on your Xcode Project and check that it can find the right SDK.
Near the bottom of the General Info tab there will be an option Base SDK for All Configurations. Select a different SDK and see if that helps.
I ran into issues when I upgraded to a beta SDK and it was loading up deprecated frameworks from an old SDK.

Adding SDK-specific frameworks to Xcode

Xcode 3.2 kind of broke the build process of my iPhone app. I need to add a new framework to my project (MediaPlayer.framework).
So I go into my Target settings and try to add it to the "Linked Libraris" by hitting the [+] button. In the list the MediaPlayer.framework is missing, as well as other frameworks, such as UIKit, CoreGraphic and others. Some frameworks are still there.
I can add the frameworks by adding the SDK-specific ones (going into /Developer/Platforms/iPhoneOs.platform/...yadayadayada../frameworkd/) but then of course I can only compile for the iPhone platform and not for the simulator any more.
So basically I wonder how I can get Xcode back to chose the appropriate framework, depending on platform and SDK version for me?
Thanks and kind regards, Hans Schneider
Edit: Things I tried: Setting the Base SDK to 3.0 (was still 2.2.1), reinstalling 3.0 iPhone and Simulator SDK from the "packages" directory of the Xcode 3.2 DMG. Didn't help. The frameworks still wont show up in the list...
Edit 2: Ok, I now have the frameworks back in the list, I was previously in my AdHoc configuration. In Debug I have the frameworks back. But it still wont compile for the Simualtor (lots of Symbols(s) not found errors).
Looks like the linker doesn't choose the correct libraries and always uses the iPhoneOs3.0 path for the frameworks.
Goto 'Framework Search Path' in build section in target's property.
Add path:
$(SDKROOT)/Library/System/Frameworks
Then it should work well.
And once you press 'OK', you should be able to see the path is set to '/Library..."

Missing AVFoundation.framework

AVFoundation.framework is not where the documentation says it should be. I have iPhone SDK 2.2 installed (never had previous sdk versions installed) and I can't find that folder under /System/Library/Frameworks
I did find it under
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.2.sdk/System/Library/Frameworks/
folder but if I add it from that location, then the compiler can't find the header files. I tried copying the entire AVFoundation.framework folder to /System/Library/Framework, but it still can't find the header files.
How can I use AVFoundation classes?
Thanks,
Alex
I've used the AVFoundation classes in my code, and added it the same way you did. You cannot browse the headers for some unknown reason, but putting this in your classes header file compiles just fine:
#import <AVFoundation/AVAudioPlayer.h>
I've submitted my app and had it approved, so I don't think there's anything wrong with this approach. The AVFoundation reference remains red in XCode, but it seems to work fine. Deleting the framework reference causes compile errors, so it definitely needs to be there.
I was having all sorts of problem until I realized I have to change the "active executable" to "iPhone Simulator 2.2" too. Here's the steps I took:
Add the AVFoundation framework to your project. Ctrl-click on Frameworks folder and select "Add existing frameworks". The default framework directory in "/System/Frameworks" may not contain the new AVFoundation framework file, so you will need to navigate very deep into the iPhone SDK directory to find the file. I found mine in /Developer/Platforms/iPhoneSimulator.platform/developer/SDKs/iPhoneSimulator2.2.sdk/System/Library/Framework. (Yes, it is that deep!!).
Now from your XCode, select your Active SDK to be "Simulator - iPhone OS 2.2" and select your "Active Executable" to be "iPhone Simulator (2.2)"
That solved the problem for me. Hope yours is the same issue.
I found mine at:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/Frameworks