ios - .pch replacement to put constant file -


projectname-prefix.pch missing in xcode 6.

we can create .h file , use #define create constants , include file prefix file of our project before xcode 6.

sample constant.h file

 #define ok @"ok" 

go view controller include file in header #import "constants.h" or define in pch file ,so view controllers can access file

in viewdidload

nslog(@"%@",ok); 

my question is

where include constant.h file can access file view controllers did using .pch file?

edit: my question replacement of .pch file ? if apple remove xcode must alternate achieve goal without adding .pch , include in every single file used

you answered question yourself. here

we can create .h file , use #define create constants , include file prefix file of our project before xcode 6.

you include common.h file inside pch file. , dont have #import anything, pch file available in classes, , import inside pch file available in classes. hence pch files termed pre-compiled header files.


Comments