fastlane-plugin-shield_ios 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: c27fcda8a05cb9bf1ea7dae37d2ebad5e83f569a7cd45df44fa2ec0bbe237147
4
+ data.tar.gz: 91ac33e8943c85f83857def2a0ef0ffe42df56c517ec33240127f8e451d58609
5
+ SHA512:
6
+ metadata.gz: ec4e3631ac117a774671e3ab38544be738922915fc46b0512f074eef5f31579712ff5bb3aa88299e20015bf5df6ee1af1518ac5f85879582db806420d470a7ab
7
+ data.tar.gz: 70bb95940d9a7813e6e502148bcb760a12032e041e642abbbeef8b476265b4492b48596da6ffc976c6295385cbb10139823e53ee2467f4a5b0743c35161d9da0
data/LICENSE ADDED
@@ -0,0 +1,56 @@
1
+ ByteHide Shield iOS - Commercial License
2
+
3
+ Copyright (c) 2024-2026 ByteHide Solutions S.L. All rights reserved.
4
+
5
+ This software and associated documentation files (the "Software") are the
6
+ proprietary property of ByteHide Solutions S.L. and are protected by copyright
7
+ law and international treaties.
8
+
9
+ GRANT OF LICENSE
10
+
11
+ Subject to the terms of a valid commercial license agreement between you (or
12
+ your organization) and ByteHide Solutions S.L., you are granted a limited,
13
+ non-exclusive, non-transferable license to use the Software solely in accordance
14
+ with the terms of your subscription plan.
15
+
16
+ RESTRICTIONS
17
+
18
+ You may not, without the prior written consent of ByteHide Solutions S.L.:
19
+
20
+ 1. Copy, modify, or distribute the Software or any portion thereof.
21
+ 2. Reverse engineer, decompile, or disassemble the Software.
22
+ 3. Sublicense, rent, lease, or lend the Software to any third party.
23
+ 4. Remove or alter any proprietary notices, labels, or marks on the Software.
24
+ 5. Use the Software to develop a competing product or service.
25
+
26
+ SUBSCRIPTION AND ACTIVATION
27
+
28
+ Use of this Software requires a valid ByteHide project token linked to an
29
+ active subscription. The Software communicates with ByteHide services for
30
+ license validation and feature entitlement. Unauthorized use, circumvention
31
+ of license checks, or use without a valid subscription is strictly prohibited.
32
+
33
+ DISCLAIMER OF WARRANTIES
34
+
35
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
36
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
37
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
38
+
39
+ LIMITATION OF LIABILITY
40
+
41
+ IN NO EVENT SHALL BYTEHIDE SOLUTIONS S.L. BE LIABLE FOR ANY CLAIM, DAMAGES
42
+ OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
43
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
44
+ DEALINGS IN THE SOFTWARE.
45
+
46
+ GOVERNING LAW
47
+
48
+ This license shall be governed by and construed in accordance with the laws
49
+ of Spain. Any disputes arising under this license shall be subject to the
50
+ exclusive jurisdiction of the courts of Valencia, Spain.
51
+
52
+ CONTACT
53
+
54
+ ByteHide Solutions S.L.
55
+ https://www.bytehide.com
56
+ contact@bytehide.com
data/README.md ADDED
@@ -0,0 +1,120 @@
1
+ # fastlane-plugin-shield_ios
2
+
3
+ [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-shield_ios)
4
+
5
+ Fastlane plugin for [ByteHide Shield iOS](https://www.bytehide.com) — protect your iOS applications with obfuscation, encryption, and runtime security directly from your CI/CD pipeline.
6
+
7
+ ## Getting Started
8
+
9
+ ### Prerequisites
10
+
11
+ Install the `shield-ios` CLI:
12
+
13
+ ```bash
14
+ pip install bytehide-shield-ios
15
+ ```
16
+
17
+ ### Add the Plugin
18
+
19
+ ```bash
20
+ fastlane add_plugin shield_ios
21
+ ```
22
+
23
+ Or add it to your `Pluginfile`:
24
+
25
+ ```ruby
26
+ gem "fastlane-plugin-shield_ios", path: "../fastlane-plugin-shield_ios"
27
+ ```
28
+
29
+ ## Usage
30
+
31
+ ```ruby
32
+ # Fastfile
33
+ default_platform(:ios)
34
+
35
+ platform :ios do
36
+ lane :release do
37
+ build_app(
38
+ scheme: "MyApp",
39
+ archive_path: "build/MyApp.xcarchive",
40
+ skip_package_ipa: true
41
+ )
42
+
43
+ shield_ios(
44
+ archive_path: "build/MyApp.xcarchive",
45
+ config: "shield-ios.json"
46
+ )
47
+
48
+ build_app(
49
+ archive_path: "build/MyApp.xcarchive",
50
+ skip_build_archive: true
51
+ )
52
+
53
+ upload_to_app_store
54
+ end
55
+ end
56
+ ```
57
+
58
+ ## Parameters
59
+
60
+ | Parameter | Type | Required | Default | Description |
61
+ |-----------|------|----------|---------|-------------|
62
+ | `archive_path` | String | Yes | — | Path to the `.xcarchive` or `.ipa` to protect |
63
+ | `output_path` | String | No | Same as input | Output path for the protected archive |
64
+ | `config` | String | No | `nil` | Path to `shield-ios.json` configuration file |
65
+ | `no_sign` | Boolean | No | `true` | Skip code signing after protection |
66
+ | `verbose` | Boolean | No | `false` | Enable verbose output |
67
+
68
+ All parameters can also be set via environment variables:
69
+
70
+ - `SHIELD_IOS_ARCHIVE_PATH`
71
+ - `SHIELD_IOS_OUTPUT_PATH`
72
+ - `SHIELD_IOS_CONFIG`
73
+ - `SHIELD_IOS_NO_SIGN`
74
+ - `SHIELD_IOS_VERBOSE`
75
+
76
+ ## Examples
77
+
78
+ ### Basic protection
79
+
80
+ ```ruby
81
+ shield_ios(archive_path: "build/MyApp.xcarchive")
82
+ ```
83
+
84
+ ### With configuration file
85
+
86
+ ```ruby
87
+ shield_ios(
88
+ archive_path: "build/MyApp.xcarchive",
89
+ config: "shield-ios.json"
90
+ )
91
+ ```
92
+
93
+ ### Custom output path with re-signing
94
+
95
+ ```ruby
96
+ shield_ios(
97
+ archive_path: "build/MyApp.xcarchive",
98
+ output_path: "build/MyApp-protected.xcarchive",
99
+ no_sign: false,
100
+ verbose: true
101
+ )
102
+ ```
103
+
104
+ ### Protect an IPA
105
+
106
+ ```ruby
107
+ shield_ios(
108
+ archive_path: "build/MyApp.ipa",
109
+ config: "shield-ios.json"
110
+ )
111
+ ```
112
+
113
+ ## Documentation
114
+
115
+ - [ByteHide Shield iOS Documentation](https://docs.bytehide.com/platforms/ios/products/shield)
116
+ - [ByteHide Website](https://www.bytehide.com)
117
+
118
+ ## License
119
+
120
+ Copyright (c) 2024-2026 ByteHide Solutions S.L. All rights reserved. See [LICENSE](LICENSE) for details.
@@ -0,0 +1,117 @@
1
+ require 'fastlane/action'
2
+ require_relative '../helper/shield_ios_helper'
3
+
4
+ module Fastlane
5
+ module Actions
6
+ class ShieldIosAction < Action
7
+ def self.run(params)
8
+ unless Helper::ShieldIosHelper.shield_ios_installed?
9
+ UI.user_error!("shield-ios CLI not found. Install it with: pip install bytehide-shield-ios")
10
+ end
11
+
12
+ archive_path = params[:archive_path]
13
+ unless File.exist?(archive_path)
14
+ UI.user_error!("Archive not found at path: #{archive_path}")
15
+ end
16
+
17
+ command = Helper::ShieldIosHelper.build_command(params)
18
+
19
+ UI.message("Protecting iOS app with ByteHide Shield...")
20
+ UI.message("Running: #{command}") if params[:verbose]
21
+
22
+ Actions.sh(command)
23
+
24
+ UI.success("ByteHide Shield iOS protection applied successfully!")
25
+ end
26
+
27
+ def self.description
28
+ "Protect your iOS app with ByteHide Shield obfuscation and security"
29
+ end
30
+
31
+ def self.authors
32
+ ["ByteHide"]
33
+ end
34
+
35
+ def self.details
36
+ "Applies ByteHide Shield iOS protections (obfuscation, encryption, and runtime security) " \
37
+ "to an .xcarchive or .ipa file. Requires the shield-ios CLI to be installed."
38
+ end
39
+
40
+ def self.available_options
41
+ [
42
+ FastlaneCore::ConfigItem.new(
43
+ key: :archive_path,
44
+ env_name: "SHIELD_IOS_ARCHIVE_PATH",
45
+ description: "Path to the .xcarchive or .ipa to protect",
46
+ type: String,
47
+ verify_block: proc do |value|
48
+ unless value.end_with?(".xcarchive", ".ipa")
49
+ UI.user_error!("archive_path must be an .xcarchive or .ipa file")
50
+ end
51
+ end
52
+ ),
53
+ FastlaneCore::ConfigItem.new(
54
+ key: :output_path,
55
+ env_name: "SHIELD_IOS_OUTPUT_PATH",
56
+ description: "Output path for the protected archive (defaults to overwriting the input)",
57
+ type: String,
58
+ optional: true
59
+ ),
60
+ FastlaneCore::ConfigItem.new(
61
+ key: :config,
62
+ env_name: "SHIELD_IOS_CONFIG",
63
+ description: "Path to shield-ios.json configuration file",
64
+ type: String,
65
+ optional: true
66
+ ),
67
+ FastlaneCore::ConfigItem.new(
68
+ key: :no_sign,
69
+ env_name: "SHIELD_IOS_NO_SIGN",
70
+ description: "Skip code signing after protection",
71
+ type: Boolean,
72
+ default_value: true
73
+ ),
74
+ FastlaneCore::ConfigItem.new(
75
+ key: :verbose,
76
+ env_name: "SHIELD_IOS_VERBOSE",
77
+ description: "Enable verbose output",
78
+ type: Boolean,
79
+ default_value: false
80
+ )
81
+ ]
82
+ end
83
+
84
+ def self.output
85
+ []
86
+ end
87
+
88
+ def self.return_value
89
+ nil
90
+ end
91
+
92
+ def self.is_supported?(platform)
93
+ platform == :ios
94
+ end
95
+
96
+ def self.example_code
97
+ [
98
+ 'shield_ios(
99
+ archive_path: "build/MyApp.xcarchive",
100
+ config: "shield-ios.json"
101
+ )',
102
+ 'shield_ios(
103
+ archive_path: "build/MyApp.ipa",
104
+ output_path: "build/MyApp-protected.ipa",
105
+ config: "shield-ios.json",
106
+ no_sign: false,
107
+ verbose: true
108
+ )'
109
+ ]
110
+ end
111
+
112
+ def self.category
113
+ :code_signing
114
+ end
115
+ end
116
+ end
117
+ end
@@ -0,0 +1,33 @@
1
+ require 'fastlane_core/ui/ui'
2
+
3
+ module Fastlane
4
+ module Helper
5
+ class ShieldIosHelper
6
+ def self.shield_ios_installed?
7
+ `which shield-ios 2>/dev/null`.strip.length > 0
8
+ end
9
+
10
+ def self.build_command(params)
11
+ cmd = ["shield-ios", "protect", params[:archive_path].shellescape]
12
+
13
+ if params[:output_path]
14
+ cmd << "--output" << params[:output_path].shellescape
15
+ end
16
+
17
+ if params[:config]
18
+ cmd << "--config" << params[:config].shellescape
19
+ end
20
+
21
+ if params[:no_sign]
22
+ cmd << "--no-sign"
23
+ end
24
+
25
+ if params[:verbose]
26
+ cmd << "--verbose"
27
+ end
28
+
29
+ cmd.join(" ")
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,5 @@
1
+ module Fastlane
2
+ module ShieldIos
3
+ VERSION = "0.1.0"
4
+ end
5
+ end
@@ -0,0 +1,13 @@
1
+ require 'fastlane/plugin/shield_ios/version'
2
+
3
+ module Fastlane
4
+ module ShieldIos
5
+ def self.all_classes
6
+ Dir[File.expand_path('**/{actions,helper}/*.rb', File.dirname(__FILE__))]
7
+ end
8
+ end
9
+ end
10
+
11
+ Fastlane::ShieldIos.all_classes.each do |current|
12
+ require current
13
+ end
metadata ADDED
@@ -0,0 +1,126 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fastlane-plugin-shield_ios
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - ByteHide
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2026-03-11 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: fastlane
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 2.0.0
20
+ - - "~>"
21
+ - !ruby/object:Gem::Version
22
+ version: '2.0'
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: 2.0.0
30
+ - - "~>"
31
+ - !ruby/object:Gem::Version
32
+ version: '2.0'
33
+ - !ruby/object:Gem::Dependency
34
+ name: bundler
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '2.0'
40
+ type: :development
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '2.0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: rspec
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '3.0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '3.0'
61
+ - !ruby/object:Gem::Dependency
62
+ name: rake
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '13.0'
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '13.0'
75
+ - !ruby/object:Gem::Dependency
76
+ name: pry
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - "~>"
80
+ - !ruby/object:Gem::Version
81
+ version: '0.14'
82
+ type: :development
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: '0.14'
89
+ description: Protect your iOS applications with ByteHide Shield obfuscation, encryption,
90
+ and runtime security directly from your Fastlane pipeline.
91
+ email:
92
+ - contact@bytehide.com
93
+ executables: []
94
+ extensions: []
95
+ extra_rdoc_files: []
96
+ files:
97
+ - LICENSE
98
+ - README.md
99
+ - lib/fastlane/plugin/shield_ios.rb
100
+ - lib/fastlane/plugin/shield_ios/actions/shield_ios_action.rb
101
+ - lib/fastlane/plugin/shield_ios/helper/shield_ios_helper.rb
102
+ - lib/fastlane/plugin/shield_ios/version.rb
103
+ homepage: https://www.bytehide.com
104
+ licenses:
105
+ - Nonstandard
106
+ metadata: {}
107
+ post_install_message:
108
+ rdoc_options: []
109
+ require_paths:
110
+ - lib
111
+ required_ruby_version: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - ">="
114
+ - !ruby/object:Gem::Version
115
+ version: '2.6'
116
+ required_rubygems_version: !ruby/object:Gem::Requirement
117
+ requirements:
118
+ - - ">="
119
+ - !ruby/object:Gem::Version
120
+ version: '0'
121
+ requirements: []
122
+ rubygems_version: 3.0.3.1
123
+ signing_key:
124
+ specification_version: 4
125
+ summary: Fastlane plugin for ByteHide Shield iOS protection
126
+ test_files: []