How to add ApplicationServices so that I can #import <ImageIO / ImageIO.h>?

Apple Image I / O Programming Guide:

Image I / O is located in the Services Framework application on Mac OS X and in the I / O image structure on iOS. After adding the structure to your application, import the header file including this expression:

#import <ImageIO / ImageIO.h>

I have to "add the framework" incorrectly, because when I add the #import line to my code and compile, I get the error message "ImageIO / ImageIO.h: there is no such file or directory". Can someone tell me what I'm doing wrong?

I did the following in Xcode to get the error.

  • New project (OS X Cocoa application)
  • In the Groups and Files tree, select MyProjectName / Frameworks / Other Frameworks ...
  • Right-click and choose Add> Existing Frames.
  • In the "Mac OSX 10.6 SDK" dialog box, in the dialog box that appears, select "ApplicationServices.framework"
  • In MyProjectName.m (or any other file) add #import <ImageIO / ImageIO.h>

I am using Xcode 3.2.3 for OS X 10.6.4 and have a 10.6 SDK (10M2262).

I also tried to add the framework using Project> Add to Project .. and select the structure from the SDK and from / System / Library / Frameworks and get an error in all cases.

+3
source share
2 answers

You correctly added the framework. What causes your problem is that you do not have to import the ImageIO header specifically; You must import the ApplicationServices header.

, .

+4

, XCode 3.2, , , Foundation , , , Foundation make.

- , XCode .

0

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