Fastlane plugin to remove settings in an iOS settings bundle
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples/RemoveSettingExample
fastlane
lib/fastlane/plugin
spec
.gitignore
Gemfile
Gemfile.lock
LICENSE
README.md
Rakefile
circle.yml
fastlane-plugin-remove_setting.gemspec

README.md

remove_setting plugin

fastlane Plugin Badge Gem Downloads License CircleCI

Getting Started

This project is a fastlane plugin. To get started with fastlane-plugin-remove_setting, run the following command:

fastlane add_plugin remove_setting

About settings_bundle

Fastlane plugin to remove settings in an iOS settings bundle

remove_setting

This action removes a specified NSUserDefaults key in the project's Settings.bundle.

remove_setting(
  key: "DevelopmentMode"  
)

This removes the key named DevelopmentMode in the Root.plist in the Settings.bundle.

Specifying the project file

By default, the action looks for a single .xcodeproj file in the repo, excluding any under Pods. If more than one is present, use the :xcodeproj parameter:

remove_setting(
  xcodeproj: "./MyProject.xcodeproj",
  key: "DevelopmentMode"  
)

Files other than Root.plist

remove_setting(
  file: "About.plist",
  key: "DevelopmentMode"  
)

The file argument specifies a file other than Root.plist in the Settings.bundle. If you have multiple projects, keys or files, run the action multiple times.

Bundle name parameter

By default, this action looks for a file called Settings.bundle in the project. To specify a different name for your settings bundle, use the :bundle_name option:

remove_setting(
  key: "DevelopmentMode",
  bundle_name: "MySettings.bundle"
)

Also see the example app and example Fastfile in the repo.

Examples

RemoveSettingExample

See the examples/RemoveSettingExample subdirectory for a simple example project that makes use of this action.

First build and run the sample project on a simulator or device. Tap 'Open Settings' to view the settings for RemoveSettingExample in the Settings app. You'll see the version number as well as a development mode switch.

Now run Fastlane:

bundle install
bundle exec fastlane test

Run the sample app again. Tap 'Open Settings' again to see the updated settings. The development mode switch should no longer be visible.

Run tests for this plugin

To run both the tests, and code style validation, run

rake

To automatically fix many of the styling issues, use

rubocop -a

Issues and Feedback

For any other issues and feedback about this plugin, please submit it to this repository.

Troubleshooting

If you have trouble using plugins, check out the Plugins Troubleshooting doc in the main fastlane repo.

Using fastlane Plugins

For more information about how the fastlane plugin system works, check out the Plugins documentation.

About fastlane

fastlane is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out fastlane.tools.