How to add project prefix file to photo extension target?

The main target usually contains the -Prefix.pch file, where all import amenities are defined. For example when using opencv with C ++ there is

#ifdef __cplusplus
    #import <opencv2/opencv.hpp>
#endif

#ifdef __OBJC__
    #import <UIKit/UIKit.h>
    #import <Foundation/Foundation.h>
#endif

      

Unfortunately, when using the new photo extension target in iOS 8, this file is ignored, making it difficult to add all the files needed for the extension target. Is there a way to make this prefix file work for the new target too?

THH

+3


source to share


1 answer


You can change the title of the extension prefix by changing the build settings of the project. First, open the main project window in Xcode and select a target for adding photos from the list on the left. Go to the Build SettingsApple's the LLVM 6.0 - Language , and then set the header prekompilyatsionnogo prefix Yes and prefix header in your prefix header header (you can copy it from the corresponding parameters in the target program target). If you don't see these options, make sure All is selected and not Basic at the top of the window .



+5


source







All Articles