Mac Tutorial: How To Enable an App Extension

Update on May 8, 2025: If you are running macOS Ventura or later the steps for enabling app extensions have changed. Steps to enable Finder extensions on newer versions of macOS can be found here.


Starting with OS X 10.10 (Yosemite), Mac applications can include embedded app extensions. App extensions add custom functionality to your Mac. How you can use an app extension depends on what kind of extension it is.

At the time of this writing, there are four different kinds of app extensions available on the Mac:

Action: Action extensions can manipulate content in another supporting app. Action extensions often work in text editing applications like Text Edit.

Finder: Finder extensions add functionality to the Finder.

Share Menu: Share extensions allow you to share content with other

Today: These are widgets that can be added to the Today view in the Notification Center.

While there are several different kinds of app extensions available, every app extensions requires the user to enable them in System Preferences before they can be used. If you recently purchased an app and cannot figure out why you are unable to use a feature advertised in the app description, there is a chance that the feature you are looking for requires you to enable an app extension.

How to Enable an App Extension

To enable an app extension, open the System Preferences app on your Mac. In the System Preferences window, click on “Extensions.”

Screenshot of System Preferences on OS X El Capitan annotated instructions 'Go to extensions pane.'

Once you are in the “Extensions” section of System Preferences, you will see a list of all the app extensions you have on your Mac. To enable or disable an app extension, simply check or uncheck the box next to each extension in the list. That’s all there is to it.

App extensions pane in System Preferences on Mac.

How to Disable NSScrollView Scrolling

Unlike UIScrollView on iOS, NSScrollView on Mac does not have a handy scrollEnabled property you can use to temporarily disable scrolling.

If you Google around, you can find several posts on websites like stackoverflow that ask questions like How can I disable the vertical scrolling of a NSScrollView? Some have suggested setting the hasVerticalScroller property to NO as the answer. However, the hasVerticalScroller property only effects the visibility of the scroller, a value of NO does not actually prevent scrolling.

There are also ways to constrain scrolling from an NSView subclass, as described in Apple’s documentation here. Constraining scrolling from a view subclass can be useful, but what if you want to just temporarily disable scrolling?

The easiest way to disable scrolling is to subclass NSScrollView and add a BOOL property with a name like scrollingEnabled. Then you can simply override the designated initializers (initWithFrame: and initWithCoder:) and set the ivar of the property to YES as the default value:

-(instancetype)initWithFrame:(NSRect)frameRect 
{ 
   self = [super initWithFrame:frameRect]; 
   if (self) 
   { 
       [self setUpOnInit]; 
   } 
   return self; 
}
 
- (instancetype)initWithCoder:(NSCoder *)coder 
{ 
    self = [super initWithCoder:coder]; 
    if (self) 
    { 
         [self setUpOnInit]; 
    } 
    return self; 
}
 
-(void)setUpOnInit
{
   // Set all default values. 
   _scrollingEnabled = YES; 
}

Now you can override the scrollWheel: method and check the property:

-(void)scrollWheel:(NSEvent *)theEvent 
{ 
    if (self.scrollingEnabled) {  
      [super scrollWheel:theEvent];  
     } 
    else {  
       // scrolling is disabled. 
    } 
}

This technique will work in most cases, but it isn’t enough to completely disable scrolling. If there is a view inside of a scroll view that implements autoscrolling behavior (if the view is a dragging destination) the scrollWheel: override won’t block scrolling during an attempted drag and drop operation. To disable scrolling in all cases, you should also subclass NSClipView and block scrolling by overriding the -constrainBoundsRect: method like this:

-(NSRect)constrainBoundsRect:(NSRect)proposedBounds
{
    MyScrollViewSubclass *mainScrollView = (MyScrollViewSubclass*)self.superview;
 
    if (mainScrollView.scrollingEnabled)
    {
        return [super constrainBoundsRect:proposedBounds];
    }
    else
    {
        // Disabled
        return self.documentVisibleRect;
    }
}

After you do that, scrolling should be disabled whenever you set the scrollingEnabled property to NO. But there may be cases where the scroll bar remains visible even when you have scrolling disabled (depending on what type of mouse is being used). To deal with this you should also make sure you set the hasVerticalScroller property to NO when you disable scrolling. If desired, you can implement the setter of the scrollingEnabled property and set hasVerticalScroller at the same time.

Tutorial: How to Redeem a Promo Code for a Free Download on the Mac App Store

Update on April 17th, 2023: The Mac App Store has been redesigned since this tutorial was written. You can read an updated version of this tutorial for macOS Ventura here.

Sometimes, Mac developers are kind enough to give promo codes out so people can download a copy of their paid applications for free. A promo code is simply a combination of characters you can use on the Mac App Store to get the app for free, but how do you use them? It’s easy. First, open up the Mac App Store application. After the window has finished loading, you will see to your right a link that says Redeem. Click it.

Screenshot of the Mac App Store  window, annotated  with an arrow pointing to the 'redeem link'.

After you click the link a sheet will pop up asking you to log in with your Apple ID to redeem your code, so go ahead and log in!

Mac App Store screenshot of login sheet.

After you log in, you will be brought to a screen with a title that says “Redeem Code”. At the bottom, you will see a text field where you can enter your redeem code. Enter it and the application will start downloading! That’s it!

Mac App Store screenshot of the "Redeem Code"  window.