Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/2.0.0 #20

Merged
merged 16 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ jobs:
runs-on: macOS-latest

steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
- uses: actions/checkout@v3
- name: Bundle install
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6.5
bundler: "Gemfile.lock"
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

- name: Bundle install
run: bundle install
- name: Publish release
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
Expand Down
21 changes: 6 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,15 @@ jobs:
runs-on: macOS-latest

steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
- uses: actions/checkout@v3
- name: Bundle install
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6.5
bundler: "Gemfile.lock"
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

- name: Ruby cache
uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Bundle install
run: |
bundle config path vendor/bundle
bundle check || bundle install
- name: Pods cache
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: Pods
key: ${{ runner.os }}-cocoapods-${{ hashFiles('**/Podfile.lock') }}
Expand Down
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.1.2
122 changes: 96 additions & 26 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
disabled_rules: # rule identifiers to exclude from running
# - blanket_disable_command
# - block_based_kvo
# - class_delegate_protocol
# - closing_brace
# - closure_parameter_position
# - colon
# - comma
# - comment_spacing
# - compiler_protocol_init
# - computed_accessors_order
# - control_statement
# - custom_rules
# - cyclomatic_complexity
# - discarded_notification_center_observer
# - deployment_target
# - discouraged_direct_init
# - duplicate_conditions
# - duplicate_enum_cases
# - duplicate_imports
# - duplicated_key_in_dictionary_literal
# - dynamic_inline
# - empty_enum_arguments
# - empty_parameters
# - empty_parentheses_with_trailing_closure
# - fallthrough
# - file_length
# - for_where
# - force_cast
Expand All @@ -25,31 +31,41 @@ disabled_rules: # rule identifiers to exclude from running
# - generic_type_name
# - identifier_name
# - implicit_getter
# - inert_defer
# - inclusive_language
# - invalid_swiftlint_command
# - is_disjoint
# - large_tuple
# - leading_whitespace
# - legacy_cggeometry_functions
# - legacy_constant
# - legacy_constructor
# - legacy_nsgeometry_functions
# - legacy_hashing
# - legacy_nsgeometry_functions
# - legacy_random
# - line_length
# - mark
# - multiple_closures_with_trailing_closure
# - nesting
- no_fallthrough_only
# - no_space_in_method_call
# - notification_center_detachment
# - ns_number_init_as_function_reference
# - nsobject_prefer_isequal
# - opening_brace
# - operator_whitespace
# - orphaned_doc_comment
# - private_over_fileprivate
# - private_unit_test
# - protocol_property_accessors_order
# - reduce_boolean
# - redundant_discardable_let
# - redundant_objc_attribute
# - redundant_optional_initialization
# - redundant_set_access_control
# - redundant_string_enum_value
# - redundant_void_return
# - return_arrow_whitespace
# - self_in_property_initialization
# - shorthand_operator
# - statement_position
# - superfluous_disable_command
Expand All @@ -62,7 +78,10 @@ disabled_rules: # rule identifiers to exclude from running
# - trailing_whitespace
# - type_body_length
# - type_name
# - unavailable_condition
# - unneeded_break_in_switch
# - unneeded_override
# - unneeded_synthesized_initializer
# - unused_closure_parameter
# - unused_control_flow_label
# - unused_enumerated
Expand All @@ -71,47 +90,69 @@ disabled_rules: # rule identifiers to exclude from running
# - valid_ibinspectable
# - vertical_parameter_alignment
# - vertical_whitespace
# - void_function_in_ternary
# - void_return
# - weak_delegate
# - xctfail_message

opt_in_rules:
- anyobject_protocol
- accessibility_label_for_image
- accessibility_trait_for_button
# - anonymous_argument_in_multiline_closure
- array_init
# - attributes
# - balanced_xctest_lifecycle
- closure_body_length
- closure_end_indentation
- closure_spacing
- collection_alignment
- comma_inheritance
# - conditional_returns_on_newline
- contains_over_filter_count
- contains_over_filter_is_empty
- contains_over_first_not_nil
- contains_over_range_nil_comparison
- convenience_type
# - direct_return
- discarded_notification_center_observer
- discouraged_assert
- discouraged_none_name
- discouraged_object_literal
- discouraged_optional_boolean
- discouraged_optional_collection
- empty_collection_literal
- empty_count
- empty_string
- empty_xctest_method
- enum_case_associated_values_count
# - expiring_todo
# - explicit_acl
# - explicit_enum_raw_value
- explicit_init
# - explicit_self
# - explicit_top_level_acl
# - explicit_type_interface
# - extension_access_modifier
- fallthrough
- fatal_error_message
# - file_header
# - file_name
- file_name_no_space
# - file_types_order
- first_where
- flatmap_over_map_reduce
- force_unwrapping
# - function_default_parameter_at_end
- ibinspectable_in_extension
- identical_operands
# - implicit_return
- implicitly_unwrapped_optional
# - indentation_width
# - joined_default_parameter
- last_where
- legacy_random
- legacy_multiple
- legacy_objc_type
# - let_var_whitespace
- literal_expression_end_indentation
- local_doc_comment
- lower_acl_than_parent
# - missing_docs
- modifier_order
Expand All @@ -121,50 +162,81 @@ opt_in_rules:
- multiline_literal_brackets
- multiline_parameters
# - multiline_parameters_brackets
# - nimble_operator
# - no_extension_access_modifier
# - no_grouping_extension
# - no_magic_numbers
- non_overridable_class_declaration
# - nslocalizedstring_key
# - nslocalizedstring_require_bundle
# - number_separator
# - object_literal
- operator_usage_whitespace
- optional_enum_case_matching
- overridden_super_call
- override_in_extension
- pattern_matching_keywords
# - prefer_nimble
- prefer_self_in_static_references
- prefer_self_type_over_type_of_self
- prefer_zero_over_explicit_init
# - prefixed_toplevel_constant
- private_action
- private_outlet
- private_subject
- private_swiftui_state
# - prohibited_interface_builder
# - prohibited_super_call
- quick_discouraged_call
- quick_discouraged_focused_test
- quick_discouraged_pending_test
# - raw_value_for_camel_cased_codable_enum
- reduce_into
- redundant_nil_coalescing
- redundant_objc_attribute
- redundant_set_access_control
- redundant_type_annotation
# - required_deinit
# - required_enum_case
- return_value_from_void_function
- self_binding
- shorthand_optional_binding
- single_test_class
# - sorted_enum_cases
- sorted_first_last
# - sorted_imports
- static_operator
# - strict_fileprivate
- strong_iboutlet
- superfluous_else
- switch_case_on_newline
# - test_case_accessibility
- toggle_bool
# - trailing_closure
# - type_contents_order
- unavailable_function
- unhandled_throwing_task
# - unneeded_parentheses_in_closure_argument
- unowned_variable_capture
- untyped_error_in_catch
- unused_import
- unused_private_declaration
- vertical_parameter_alignment_on_call
# - vertical_whitespace_between_cases
# - vertical_whitespace_closing_braces # Waiting for https://github.com/realm/SwiftLint/issues/2322
# - vertical_whitespace_opening_braces # Waiting for https://github.com/realm/SwiftLint/issues/2322
- weak_delegate
- xct_specific_matcher
- yoda_condition

analyzer_rules:
- capture_variable
# - explicit_self
- typesafe_array_init
- unused_declaration
- unused_import

# rule configuration
closure_body_length:
warning: 20
error: 35
cyclomatic_complexity:
warning: 10
error: 20
Expand All @@ -173,27 +245,34 @@ force_try: warning
function_body_length:
warning: 35
error: 50
closure_body_length:
warning: 20
error: 35
deployment_target:
iOS_deployment_target: 15
# macOS_deployment_target:
# watchOS_deployment_target:
# tvOS_deployment_target:
identifier_name:
min_length:
warning: 0
error: 0
max_length:
warning: 100
error: 200
allowed_symbols: '_'
allowed_symbols: "_"
line_length:
warning: 120
error: 160
ignores_urls: true
type_name:
min_length:
warning: 0
error: 0
max_length:
warning: 100
error: 200
nesting:
type_level: 2
multiline_arguments:
only_enforce_after_first_closure_on_first_line: true

custom_rules:
double_space:
Expand All @@ -214,18 +293,9 @@ custom_rules:
regex: '((assert|precondition)\(false)'
message: "Use assertionFailure() or preconditionFailure() instead."
severity: warning
comments_space:
name: "Space After Comment"
regex: '(^ *//(?!(MARK|TODO))\w+)'
message: "There should be a space after //"
severity: warning
uppercamelcased_enum:
name: "Enum in UpperCamelCase"
regex: '(?:enum) [a-z0-9]'
message: "Enum names should be in UpperCamelCase"
severity: warning

excluded: # paths to ignore during linting. Takes precedence over `included`.
- Carthage
- Pods

- vendor
- Packages
8 changes: 4 additions & 4 deletions ADNavigationBarExtension.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@

Pod::Spec.new do |s|
s.name = 'ADNavigationBarExtension'
s.version = '1.0.4'
s.version = '2.0.0'
s.author = 'Fabernovel Technologies'
s.homepage = 'https://technologies.fabernovel.com/'
s.homepage = 'https://fabernovel.com/'
s.summary = 'ADNavigationBarExtension is a UI library written in Swift to show and hide an extension to your UINavigationBar'
s.license = { :type => 'MIT', :text => 'Created and licensed by Fabernovel Technologies. Copyright 2014-2018 Fabernovel Technologies. All rights reserved.' }
s.source = { :git => 'https://github.com/faberNovel/ADNavigationBarExtension.git', :tag => "v#{s.version}" }

s.ios.deployment_target = '11.0'
s.ios.deployment_target = '14.0'
s.swift_versions = ['5.0', '5.1']

s.source_files = 'NavigationBarExtension/Classes/**/*'

s.frameworks = 'UIKit'
s.dependency 'ADUtils', '~> 11.0'
s.dependency 'ADUtils', '~> 12.0'
end
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## [Unreleased]

## [2.0.0] - 2024-03-04

### Changed
- Bump ADUtils requirements to 12+

### Fix
- Fix safe area when setting the child VCs directly

### Removed
- Drop support of iOS 11, 12 and 13
- Remove workaround property `ad_isTranslucent`, use `UINavigationBar.appearance().isTranslucent` instead.

## [1.0.4]

### Fix
Expand Down
Loading
Loading