Skip to content

Commit c683e85

Browse files
author
Nolan Warner
committed
Add basic project setup files
1 parent 932d7cc commit c683e85

File tree

5 files changed

+175
-0
lines changed

5 files changed

+175
-0
lines changed

projectSetup/ios/.swiftlint.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# View https://github.com/realm/SwiftLint/blob/master/Rules.md
2+
# for a list of all rules and their explanations
3+
4+
opt_in_rules:
5+
- array_init
6+
- attributes
7+
- closure_end_indentation
8+
- closure_spacing
9+
- contains_over_first_not_nil
10+
- empty_count
11+
- explicit_enum_raw_value
12+
- explicit_init
13+
- extension_access_modifier
14+
- fatal_error_message
15+
- first_where
16+
- force_unwrapping
17+
- implicit_return
18+
- implicitly_unwrapped_optional
19+
- joined_default_parameter
20+
- let_var_whitespace
21+
- literal_expression_end_indentation
22+
- multiline_arguments
23+
- multiline_parameters
24+
- nimble_operator
25+
- number_separator
26+
- operator_usage_whitespace
27+
- overridden_super_call
28+
- pattern_matching_keywords
29+
- private_action
30+
- private_outlet
31+
- prohibited_super_call
32+
- quick_discouraged_call
33+
- quick_discouraged_focused_test
34+
- quick_discouraged_pending_test
35+
- redundant_nil_coalescing
36+
- required_enum_case
37+
- sorted_first_last
38+
- strict_fileprivate
39+
- unneeded_parentheses_in_closure_argument
40+
- vertical_parameter_alignment_on_call
41+
- yoda_condition
42+
excluded:
43+
- ProjectName/Assets/Rswift
44+
- Carthage
45+
- Pods
46+
47+
# Rule configuration
48+
49+
identifier_name:
50+
excluded:
51+
- to
52+
- id

projectSetup/ios/Cartfile

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
github "mac-cain13/R.swift.Library" ~> 4.0
2+
3+
## Add if required
4+
# github "ReactiveX/RxSwift" ~> 4.0
5+
6+
## Libraries to look into
7+
# github "antitypical/Result" ~> 3.2
8+
# github "Carthage/ReactiveTask" ~> 0.14
9+
# github "Carthage/Commandant" ~> 0.14
10+
# github "jdhealy/PrettyColors" ~> 5.0
11+
# github "ReactiveCocoa/ReactiveSwift" ~> 3.1
12+
# github "mdiep/Tentacle" ~> 0.11
13+
# github "thoughtbot/Curry" ~> 4.0
14+
15+
## Potential pods to look into
16+
# pod 'FLEX', :configurations => ['Debug', 'Internal']
17+
# pod 'Argo'
18+
# pod 'Curry'
19+
# pod 'R.swift'
20+
# pod 'Moya', '~> 8.0'
21+
# pod 'RxSwift', '~> 4.0'
22+
# pod 'RxCocoa', '~> 4.0'
23+
# pod 'RxSwiftExt'
24+
# pod 'RxDataSources'
25+
# pod 'Moya/RxSwift'
26+
# pod 'NSObject+Rx', '~> 4.0'
27+
# pod 'Action'
28+
# pod 'SwiftyUserDefaults'
29+
# pod 'Alamofire', '~> 4.0'
30+
# pod 'AlamofireImage'
31+
# pod 'Kanna', '~> 2.0'
32+
# pod 'SwiftLint'
33+
# pod 'ReactiveReSwift'
34+
# pod 'ReSwift', '~> 4.0'
35+
# pod 'Shallows', '~> 0.9'
36+
# pod 'XCGLogger', '~> 6.0'

projectSetup/ios/Mintfile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

projectSetup/ios/Podfile

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
platform :ios, '11.0'
2+
3+
inhibit_all_warnings!
4+
use_frameworks!
5+
6+
target 'ProjectName' do
7+
pod 'R.swift', '~> 4.0'
8+
pod 'RxSwift', '~> 4.0'
9+
pod 'RxCocoa', '~> 4.0'
10+
pod 'NSObject+Rx', '~> 4.0'
11+
pod 'XCGLogger', '~> 6.0'
12+
pod 'SwiftLint'
13+
end
14+
15+
post_install do |installer_representation|
16+
require 'fileutils'
17+
FileUtils.cp_r(Dir.glob("Pods/**/Pods-ProjectName-acknowledgements.plist")[0], 'ProjectName/SupportingFiles/Settings.bundle/Licenses.plist', :remove_destination => true)
18+
installer_representation.pods_project.targets.each do |target|
19+
target.build_configurations.each do |config|
20+
config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
21+
config.build_settings['GCC_WARN_INHIBIT_ALL_WARNINGS'] = 'YES'
22+
end
23+
end
24+
end
25+
26+
pre_install do |installer_representation|
27+
license_check = true
28+
installer_representation.aggregate_targets.each do |aggregate_target|
29+
aggregate_target.specs.each do |spec|
30+
unless spec.license.empty? || /ISC|MIT|BSD|Copyright|Apache/i =~ spec.license[:type]
31+
puts "######## License Error ########"
32+
puts "Target Name : #{spec.name}"
33+
puts "License Type : #{spec.license[:type]}"
34+
license_check = false
35+
end
36+
end
37+
end
38+
unless license_check
39+
exit
40+
end
41+
end
42+

projectSetup/ios/Readme.md

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
2+
# Xcode plugins
3+
4+
- SwiftLintXcode
5+
- Xvim2
6+
7+
# Build phase scripts
8+
9+
## SwiftLint
10+
11+
```
12+
"${PODS_ROOT}/SwiftLint/swiftlint"
13+
```
14+
15+
## R.swift
16+
17+
```
18+
"$PODS_ROOT/R.swift/rswift" generate "$SRCROOT/ProjectName/Assets/Rswift"
19+
```
20+
21+
# Project structure
22+
23+
- ProjectName/
24+
- Assets/
25+
- Images/
26+
- AppResources.xcassets
27+
- Localization/
28+
- en.lproj/
29+
- Localizable.strings
30+
- Rswift/
31+
- R.generated.swift
32+
- Classes/
33+
- App/
34+
- AppDelegate.swift
35+
- Controllers/
36+
- Extensions/
37+
- Protocols/
38+
- Styles/
39+
- Utilities/
40+
- ViewControllers/
41+
- Views/
42+
- SupportingFiles/
43+
- Info.plist
44+
- Settings.bundle/

0 commit comments

Comments
 (0)