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, 12 Apr 2016 12:54:45 -0700
> On Apr 12, 2016, at 10:30 AM, Alex Zavatone <email@hidden> wrote:
>
> How should they be initialized in the .m? Within an init method?
No, just
NSString * const ABC_MY_IMPORTANT_CONSTANT = @"abc";
> Also, I'm quite familiar with the .pch for iOS apps, but are frameworks allowed a file like this or is that the myAwesomeFramework.h file?
That’s what the framework header is.
> Thank you sir. Searching for instructions on how to do this is quite challenging.
The ‘extern’ stuff is basic C, although it’s not stuff you deal with much using Obj-C. You might want to grab a book on C and read up on global variables.
—Jens
_______________________________________________
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