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: "Gary L. Wade" <email@hidden>
- Date: Tue, 19 Apr 2016 10:38:45 -0700
Another thing I do is add FOUNDATION_EXPORT before my constants in headers, which will give you the right stuff whether C or C++; C++ name mangling is a common reason for odd link errors if you include a header in a C++/Objective-C++ source file.
I'm sure you can find examples of this in open source, and Apple's own open source has these, too. If something isn't working, you're better off showing concrete examples from here on out.
--
Gary L. Wade (Sent from my iPhone)
http://www.garywade.com/
> On Apr 19, 2016, at 10:20 AM, Alex Zavatone <email@hidden> wrote:
>
>
>> On Apr 16, 2016, at 7:19 AM, Uli Kusterer wrote:
>>
>> A precompiled prefix header is a compile-time construct that only applies to the interior of your framework. You can't really tell people linking to your framework to add a certain prefix header. So you can use a pch for actually writing the framework implementation,
>
> That is all I am trying to accomplish.
>
> So, since we have to create a constants file in a framework with .h and .m files, I've never seen a .m compliment to a .pch. I have no idea how this would work at all or how I would be able to set this up.
>
> What I am trying to achieve is simply declare constants for all my classes within a framework (and only for the framework) and do it in one spot.
>
> It is my understanding that in a framework we need .h and .m files to declare the constants and I have set these up.
>
> Now, I am trying to get this constants.m imported in one area that will allow every class within my framework to have access to them.
>
> Thanks, Uli.
_______________________________________________
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