No commit activity in last 3 years
No release in over 3 years
Fastlane plugin to remove settings from an iOS settings bundle
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.15
~> 2.55
~> 0.10
~> 12.1
~> 3.6
~> 0.49

Runtime

 Project Readme

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.