CocoaPods Guides - Keeping Secrets | Latest TMZ Celebrity News & Gossip | Watch TMZ Live

Keeping Secrets

<The Problem

You want to keep secrets like API access tokens outside of your source code. This is considered a good engineering practice in general (least privilege) and you may want to have different environments like staging and production.

<The answer

CocoaPods Keys adds a few commands, and uses the installation hooks:

  • bundle exec pod keys set ARKeyName value - lets you store a value in your computer's keychain
  • bundle exec pod keys get ARKeyName - prints out the value from your computer's keychain

Then inside your Podfile, add the plugin section. Noting the name of the project, the target to attach the pod to, and the keys that you want to use:

plugin 'cocoapods-keys',
       project: 'Artsy',
       target: 'Artsy',
       keys: [
         'ArtsyAPIClientSecret',      # Auth for the Artsy API
         'ArtsyAPIClientKey',         #
         'ArtsyFacebookAppID',        # Supporting FB Login
       ]

When you run bundle exec pod install, CocoaPods Keys will add a new Pod that has all of of your keys embedded inside it.

To find out more, check out orta/cocoapods-keys.

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.