This project is a fastlane plugin. To get started with fastlane-plugin-remove_setting, run the following command:
fastlane add_plugin remove_setting
Fastlane plugin to remove settings in an iOS settings bundle
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.
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"
)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.
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.
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 testRun the sample app again. Tap 'Open Settings' again to see the updated settings. The development mode switch should no longer be visible.
To run both the tests, and code style validation, run
rake
To automatically fix many of the styling issues, use
rubocop -a
For any other issues and feedback about this plugin, please submit it to this repository.
If you have trouble using plugins, check out the Plugins Troubleshooting doc in the main fastlane repo.
For more information about how the fastlane plugin system works, check out the Plugins documentation.
fastlane is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out fastlane.tools.