Im trying to import the StoreKit Framwork.
#import <StoreKit/StoreKit.h>
and in the BuildPhases its also added.
but It gives me an "No such File or Directory" Error.
I tried the iAd Framework to Compare -> Works.
I tried a new Project and added the StoreKit Framework -> Works.
I tried#import "/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/System/Library/Frameworks/StoreKit.framework/Headers/StoreKit.h"
Which importet me the StoreKit.h File but all the I开发者_开发百科mports in that File then threw the "No such File" Error.
I Have no idea where else I can look for the Error.
You need to add the framework to your project before you can import any header files that are inside the framework.
Like the UIKit and foundation frameworks are included into a template project by default so you can use those header files and the goodies they bring, like NSString etc.
I'm not able to reproduce that error on my machine. If you link your project with the StoreKit framework and import it in one of your header files you shouldn't get any "no such directory" error messages.
I guess you're using Xcode 4. Is there an older version of Xcode installed on your computer along with older iOS SDK versions?
You can not use codes like
#import "/Developer/Plat..."
You need to include the framework as a framework in your build, not try to link to local files that only exists on your drive. If you compiled anything with absolute paths like this, you will end up with apps that only works on your computer, not on any devices or other machines.
精彩评论