Re: Proper way to set up constants when building an iOS framework
Re: Proper way to set up constants when building an iOS framework
- Subject: Re: Proper way to set up constants when building an iOS framework
- From: Jens Alfke <email@hidden>
- Date: Tue, 19 Apr 2016 12:47:53 -0700
> On Apr 19, 2016, at 11:19 AM, Alex Zavatone <email@hidden> wrote:
>
> How might I create one that the framework knows how to use? Should I create some .pch, then include the constants.h in it? If so, once I create the .pch, where is the setting to tell my framework that it needs to use it?
OH. Now I understand what’s going wrong — you’re actually asking how to set up a prefix header for a target.
Make a .pch file. Enter something like
#import <Foundation/Foundation.h>
#import "Constants.h"
Go to the target build settings.
Use the filter field to search for “prefix header” (it’s under “Apple LLVM - Language”). *
Set the value to the path to your .pch file (relative to the project directory).
You probably want to enable Precompile Prefix Header.
—Jens
* The target might already have a prefix header set. In that case you can just edit that one instead. Or delete it and set the path to your own.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden