Skip to content

Commit 63498f6

Browse files
Set up the package and the sample application
1 parent 2458c85 commit 63498f6

File tree

96 files changed

+40205
-38
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+40205
-38
lines changed

.gitignore

+39-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,41 @@
1-
.DS_Store
2-
/.build
3-
/Packages
1+
# Xcode
2+
#
3+
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4+
5+
## User settings
46
xcuserdata/
7+
8+
## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
9+
*.xcscmblueprint
10+
*.xccheckout
11+
12+
## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
13+
build/
514
DerivedData/
6-
.swiftpm/configuration/registries.json
7-
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
8-
.netrc
15+
*.moved-aside
16+
*.pbxuser
17+
!default.pbxuser
18+
*.mode1v3
19+
!default.mode1v3
20+
*.mode2v3
21+
!default.mode2v3
22+
*.perspectivev3
23+
!default.perspectivev3
24+
25+
## Obj-C/Swift specific
26+
*.hmap
27+
28+
## App packaging
29+
*.ipa
30+
*.dSYM.zip
31+
*.dSYM
32+
33+
## Playgrounds
34+
timeline.xctimeline
35+
playground.xcworkspace
36+
37+
Package.resolved
38+
39+
## Files
40+
SampleApplication/SampleApplication/Configuration/env.xcconfig
41+
EnvironmentVars.generated.swift

.swiftlint.yml

+174
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
included:
2+
- "Sources"
3+
- "SampleApplication"
4+
5+
excluded:
6+
7+
opt_in_rules:
8+
- accessibility_label_for_image
9+
- accessibility_trait_for_button
10+
- array_init
11+
- block_based_kvo
12+
- class_delegate_protocol
13+
- closing_brace
14+
- closure_end_indentation
15+
- closure_parameter_position
16+
- closure_spacing
17+
- collection_alignment
18+
- colon # promote to error
19+
- comma
20+
- compiler_protocol_init
21+
- conditional_returns_on_newline
22+
- contains_over_filter_count
23+
- contains_over_filter_is_empty
24+
- contains_over_first_not_nil
25+
- contains_over_range_nil_comparison
26+
- convenience_type
27+
- control_statement
28+
- custom_todo
29+
- direct_return
30+
- discouraged_direct_init
31+
- discouraged_object_literal
32+
- discouraged_optional_boolean
33+
- discarded_notification_center_observer
34+
- duplicate_enum_cases
35+
- duplicate_imports
36+
- dynamic_inline
37+
- empty_collection_literal
38+
- empty_count
39+
- empty_enum_arguments
40+
- empty_parameters
41+
- empty_parentheses_with_trailing_closure
42+
- empty_string
43+
- empty_xctest_method
44+
- enum_case_associated_values_count
45+
- explicit_init
46+
- fallthrough
47+
- fatal_error_message
48+
- file_header
49+
- first_where
50+
- flatmap_over_map_reduce
51+
- for_where
52+
- force_cast
53+
- force_try
54+
- force_unwrapping
55+
- identical_operands
56+
- implicit_getter
57+
- implicitly_unwrapped_optional
58+
- is_disjoint
59+
- joined_default_parameter
60+
- last_where
61+
- leading_whitespace
62+
- legacy_cggeometry_functions
63+
- legacy_constant
64+
- legacy_constructor
65+
- legacy_hashing
66+
- legacy_multiple
67+
- legacy_nsgeometry_functions
68+
- legacy_random
69+
- literal_expression_end_indentation
70+
- local_doc_comment
71+
- lower_acl_than_parent
72+
- mark
73+
- multiline_arguments
74+
- multiline_function_chains
75+
- multiline_literal_brackets
76+
- multiline_parameters
77+
- multiline_parameters_brackets
78+
- multiple_closures_with_trailing_closure
79+
- nslocalizedstring_key
80+
- no_space_in_method_call
81+
- non_overridable_class_declaration
82+
- notification_center_detachment
83+
- opening_brace
84+
- operator_usage_whitespace
85+
- operator_whitespace
86+
- overridden_super_call
87+
- override_in_extension
88+
- pattern_matching_keywords
89+
- period_spacing
90+
- prefer_self_in_static_references
91+
- prefer_self_type_over_type_of_self
92+
- prefer_zero_over_explicit_init
93+
- private_action
94+
- private_outlet
95+
- private_over_fileprivate
96+
- private_subject
97+
- private_swiftui_state
98+
- private_unit_test
99+
- prohibited_super_call
100+
- protocol_property_accessors_order
101+
- redundant_discardable_let
102+
- redundant_nil_coalescing
103+
- redundant_objc_attribute
104+
- redundant_optional_initialization
105+
- redundant_type_annotation
106+
- redundant_void_return
107+
- reduce_boolean
108+
- required_enum_case
109+
- return_arrow_whitespace
110+
- return_value_from_void_function
111+
- shorthand_operator
112+
- single_test_class
113+
- sorted_first_last
114+
- statement_position
115+
- strict_fileprivate
116+
- superfluous_disable_command
117+
- switch_case_alignment
118+
- syntactic_sugar
119+
- test_case_accessibility
120+
- toggle_bool
121+
- trailing_closure
122+
- trailing_comma
123+
- trailing_newline
124+
- trailing_semicolon
125+
- unavailable_function
126+
- unneeded_break_in_switch
127+
- unneeded_override
128+
- unneeded_parentheses_in_closure_argument
129+
- unneeded_synthesized_initializer
130+
- unused_closure_parameter
131+
- unused_control_flow_label
132+
- unused_enumerated
133+
- unused_import
134+
- unused_optional_binding
135+
- unused_setter_value
136+
- valid_ibinspectable
137+
- vertical_parameter_alignment
138+
- vertical_parameter_alignment_on_call
139+
- vertical_whitespace
140+
- vertical_whitespace_closing_braces
141+
- void_return
142+
- weak_delegate
143+
- xctfail_message
144+
- yoda_condition
145+
146+
disabled_rules:
147+
- trailing_whitespace
148+
149+
# - blanket_disable_command
150+
# - discarded_notification_center_observer
151+
# - notification_center_detachment
152+
# - orphaned_doc_comment
153+
# - unused_capture_list
154+
# - switch_case_alignment
155+
# - multiline_arguments
156+
# - multiline_parameters_brackets
157+
# - multiline_literal_brackets
158+
# - class_delegate_protocol
159+
# - nesting
160+
161+
line_length:
162+
warning: 160
163+
error: 210
164+
ignores_urls: true
165+
166+
identifier_name:
167+
allowed_symbols:
168+
- "_"
169+
excluded:
170+
- id
171+
172+
file_header:
173+
required_pattern: |
174+
\/\/ Copyright (©|\(c\)) \d{4} .*?\. All rights reserved\.

.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

+26-18
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,32 @@
1-
// swift-tools-version: 6.0
1+
// swift-tools-version: 5.10
22
// The swift-tools-version declares the minimum version of Swift required to build this package.
33

44
import PackageDescription
55

66
let package = Package(
7-
name: "checkout-ios-components",
8-
products: [
9-
// Products define the executables and libraries a package produces, making them visible to other packages.
10-
.library(
11-
name: "checkout-ios-components",
12-
targets: ["checkout-ios-components"]),
13-
],
14-
targets: [
15-
// Targets are the basic building blocks of a package, defining a module or a test suite.
16-
// Targets can depend on other targets in this package and products from dependencies.
17-
.target(
18-
name: "checkout-ios-components"),
19-
.testTarget(
20-
name: "checkout-ios-componentsTests",
21-
dependencies: ["checkout-ios-components"]
22-
),
23-
]
7+
name: "CheckoutComponents",
8+
defaultLocalization: "en-GB",
9+
platforms: [
10+
.iOS(.v15)
11+
],
12+
products: [
13+
.library(
14+
name: "CheckoutComponents",
15+
targets: [
16+
"CheckoutComponentsSDK"
17+
]
18+
),
19+
],
20+
dependencies: [
21+
.package(
22+
url: "https://github.com/checkout/NetworkClient-iOS.git",
23+
branch: "main"
24+
),
25+
],
26+
targets: [
27+
.binaryTarget(
28+
name: "CheckoutComponentsSDK",
29+
path: "SDK/CheckoutComponentsSDK.xcframework"
30+
)
31+
]
2432
)

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# checkout-ios-components
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>AvailableLibraries</key>
6+
<array>
7+
<dict>
8+
<key>BinaryPath</key>
9+
<string>CheckoutComponentsSDK.framework/CheckoutComponentsSDK</string>
10+
<key>LibraryIdentifier</key>
11+
<string>ios-arm64_x86_64-simulator</string>
12+
<key>LibraryPath</key>
13+
<string>CheckoutComponentsSDK.framework</string>
14+
<key>SupportedArchitectures</key>
15+
<array>
16+
<string>arm64</string>
17+
<string>x86_64</string>
18+
</array>
19+
<key>SupportedPlatform</key>
20+
<string>ios</string>
21+
<key>SupportedPlatformVariant</key>
22+
<string>simulator</string>
23+
</dict>
24+
<dict>
25+
<key>BinaryPath</key>
26+
<string>CheckoutComponentsSDK.framework/CheckoutComponentsSDK</string>
27+
<key>LibraryIdentifier</key>
28+
<string>ios-arm64</string>
29+
<key>LibraryPath</key>
30+
<string>CheckoutComponentsSDK.framework</string>
31+
<key>SupportedArchitectures</key>
32+
<array>
33+
<string>arm64</string>
34+
</array>
35+
<key>SupportedPlatform</key>
36+
<string>ios</string>
37+
</dict>
38+
</array>
39+
<key>CFBundlePackageType</key>
40+
<string>XFWK</string>
41+
<key>XCFrameworkFormatVersion</key>
42+
<string>1.0</string>
43+
</dict>
44+
</plist>

0 commit comments

Comments
 (0)