Compare commits

..

38 Commits

Author SHA1 Message Date
Loupehope dbc98c1b1a
Merge pull request #39 from TouchInstinct/feature/build_scripts
Feature - build scripts
2021-03-29 15:40:18 +03:00
Vlad 22e4e7416c Change TouchInstinct podspec source to ssh 2021-03-29 11:29:21 +03:00
Vlad 72c9b39413 Add custom schemes 2021-03-28 10:30:22 +03:00
Vlad 5f26513cd3 Correct smart build phases template 2021-03-27 09:13:50 +03:00
Vlad 94cc309f38 Correct smart build phases paths 2021-03-26 23:31:32 +03:00
Vlad c17e62dbcc Correct smart build phases 2021-03-26 23:25:11 +03:00
Vlad 62fa061757 Correct smart build phases and podfile 2021-03-26 23:20:14 +03:00
Vlad 14665ee6c1 Add smart build phases 2021-03-26 22:20:20 +03:00
Vsevolod Ivanov 6728e15dc6
Update README.md 2020-10-21 20:32:51 +03:00
Ivan Smolin 89fb115d33
Merge pull request #38 from TouchInstinct/feature/update_gitignore
update gitignore
2020-10-19 10:35:10 +03:00
Ivan Smolin 71a8ca8b4a update gitignore 2020-10-15 20:16:55 +03:00
Ivan Smolin eadc2ec7b0
Merge pull request #37 from TouchInstinct/feature/matchfile_generation
add Matchfile and configurations.yaml generation
2020-10-13 22:37:09 +03:00
Ivan Smolin 6849d77286 add Matchfile and configurations.yaml generation 2020-10-13 18:25:23 +03:00
Ivan Smolin c99ae7b66a
Merge pull request #36 from TouchInstinct/feature/generamba_templates_update
update Rambafile template
2020-10-09 15:14:29 +05:00
Ivan Smolin 0b0af0318d update Rambafile template 2020-10-09 13:05:15 +03:00
Ivan Smolin c0c08bd922
Merge pull request #34 from TouchInstinct/renew_scripts
renew scripts
2020-08-19 09:19:24 +03:00
Ivan Smolin d118f0aba5 renew scripts 2020-08-18 13:29:13 +03:00
Loupehope 1a65f719b8
Merge pull request #32 from TouchInstinct/feature/add_files
Add missing files
2020-06-24 14:14:51 +03:00
Vlad 1d8643bfe6 Update bootstrap 2020-06-24 13:48:41 +03:00
Vlad 29a37f28a1 Add missing files 2020-06-24 12:41:40 +03:00
Loupehope a7b6d24842
Merge pull request #31 from TouchInstinct/feature/update
Update scripts
2020-06-09 18:21:33 +03:00
Vlad 8ba7409516 Add *.swp to gitignore 2020-06-09 18:18:44 +03:00
Vlad 644078f0d0 Fix PR 2020-06-09 17:59:52 +03:00
Vlad 6b08cb831f Fix PR 2020-06-09 15:37:58 +03:00
Vlad f04a5322e6 Fix PR 2020-06-09 15:36:54 +03:00
Vlad bf61665c9a Fix PR 2020-06-09 15:12:05 +03:00
Vlad 51eeac7334 Fix PR 2020-06-09 15:10:36 +03:00
Vlad f42978b720 Replace struct with enum 2020-06-09 14:58:06 +03:00
Vlad 59a397c663 Add ITSAppUsesNonExemptEncryption 2020-06-09 14:50:40 +03:00
Vlad dff8f7188a Add version to swiftlint 2020-06-09 14:45:41 +03:00
Vlad beaf86b5ea Add String Constants 2020-06-09 14:37:56 +03:00
Vlad 48194befb9 Fix PR 2020-06-09 14:30:06 +03:00
Vlad 812fac8a74 Fix PR 2020-06-09 14:09:55 +03:00
Vlad 4e2142ed0b Remove fabric 2020-06-09 13:45:02 +03:00
Vlad b405367696 Remove romefile 2020-06-09 13:23:09 +03:00
Vlad 24d54a1f9f Update scripts 2020-06-09 13:21:18 +03:00
Vlad 5a8e779117 Fix indent 2020-06-09 12:43:05 +03:00
Vlad 186b7951cc Update scripts 2020-06-09 12:30:48 +03:00
60 changed files with 502 additions and 929 deletions

View File

@ -108,7 +108,7 @@ gem install bundle
- ПАРАМЕТР_3 (Опициональный) = Название репозитория с общими строками, без указания расширения `.git` и названия компании. Пример: `Bank-Common`, `Bank2-Common`. Если не указывать параметр, то будет использоваться имя проекта с постфиксом `-common`. Пример скрипта
```sh
igorkislyuk$ ./bootstrap.sh ~/Documents/projects/ Bank BankSpbJur-common
igorkislyuk$ ./bootstrap.sh ~/Documents/projects/ Bank Bank-common
```
### Шаг 4. После установки:

3
additional/Brewfile Normal file
View File

@ -0,0 +1,3 @@
brew "imagemagick"
brew "SwiftLint"
brew "pmd"

View File

@ -1,5 +1,7 @@
#!/bin/sh
# set -x # debug
function generate {
PARAMS=$1
TEMPLATE_PATH=$2
@ -11,38 +13,15 @@ function generate {
}
# define variables
PROJECT_TYPE=$1
PROJECTS_PATH=$2
PROJECT_NAME=$3
case $PROJECT_TYPE in
project)
PROJECT_NAME_WITH_PREFIX=$3-ios
SCRIPT_MISC_FILES_DIR="project"
;;
library)
PROJECT_NAME_WITH_PREFIX=$3
SCRIPT_MISC_FILES_DIR="library"
;;
*)
echo "Please specify project type: \"project\" or \"library\""
exit 1
;;
esac
DEPLOYMENT_TARGET_IOS="9.0"
DEPLOYMENT_TARGET_WATCH_OS="2.0"
DEPLOYMENT_TARGET_TV_OS="9.0"
SWIFT_VERSION="5.0"
XCODE_VERSION="10.2"
CURRENT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
TEMPLATES=$CURRENT_DIR/$SCRIPT_MISC_FILES_DIR/templates
SOURCES=$CURRENT_DIR/$SCRIPT_MISC_FILES_DIR/sources
COMMON_SOURCES=$CURRENT_DIR/common/sources
FOLDERNAMES=$CURRENT_DIR/$SCRIPT_MISC_FILES_DIR/foldernames.txt
LOWERCASED_PROJECT_NAME=$(echo "$PROJECT_NAME" | tr '[:upper:]' '[:lower:]')
readonly PROJECTS_PATH=$1
readonly PROJECT_NAME=$2
readonly PROJECT_NAME_WITH_PREFIX=$2-ios
readonly COMMON_REPO_NAME=${3:-$2-common}
readonly DEPLOYMENT_TARGET="12.0"
readonly CURRENT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
readonly TEMPLATES=$CURRENT_DIR/templates
readonly MATCH_PASSWORD=`pwgen 8 1`
readonly GIT_URL="git@github.com:TouchInstinct/${PROJECT_NAME_WITH_PREFIX}.git"
cd $PROJECTS_PATH
@ -58,165 +37,126 @@ rm -rf $(ls)
# create git if not exists
if [ ! -d .git ]; then
git init
git remote add origin git@github.com:TouchInstinct/$PROJECT_NAME_WITH_PREFIX.git
git remote add origin ${GIT_URL}
git fetch
git checkout -t origin/master
else
echo "Git exists..."
fi
# source code project folder
echo "Create sources folders..."
mkdir -p $PROJECT_NAME
# copy and generate source files
case $PROJECT_TYPE in
project)
# source code project folder
echo "Create sources folders..."
mkdir -p $PROJECT_NAME
cp -R $CURRENT_DIR/sources/project/. $PROJECT_NAME
cp -R $CURRENT_DIR/sources/fastlane/. fastlane
cp -R $SOURCES/project/. $PROJECT_NAME
cp -R $SOURCES/fastlane/. fastlane
generate "{project_name_lowecased: $LOWERCASED_PROJECT_NAME}" $SOURCES/fastlane/configurations.mustache fastlane/configurations.yaml
# create each empty folder in location from file, except Resources, all folders with files inside
for folder in `cat $FOLDERNAMES`; do
echo "Creating $folder ..."
mkdir -p $PROJECT_NAME/$folder
done
;;
library)
# create each empty folder in location from file, except Resources, all folders with files inside
for folder in `cat $FOLDERNAMES`; do
echo "Creating $folder ..."
mkdir -p Sources/$folder
done
;;
esac
# create each empty folder in location from file, except Resources, Models and Appearance, all folders with files inside
for folder in `cat $CURRENT_DIR/foldernames.txt`; do
echo "Creating $folder ..."
mkdir -p $PROJECT_NAME/$folder
done
# install required gems & brews
cp $SOURCES/Gemfile Gemfile
cp $SOURCES/Gemfile.lock Gemfile.lock
cp $COMMON_SOURCES/Brewfile Brewfile
cp $CURRENT_DIR/sources/Gemfile Gemfile
cp $CURRENT_DIR/sources/Gemfile.lock Gemfile.lock
cp $CURRENT_DIR/sources/Brewfile Brewfile
gem install bundler
bundle install
brew bundle
case $PROJECT_TYPE in
project)
# create info plist
generate "{project_name: $PROJECT_NAME}" $TEMPLATES/Info.mustache $PROJECT_NAME/Info.plist
# create info plist
generate "{project_name: $PROJECT_NAME}" $TEMPLATES/Info.mustache $PROJECT_NAME/Info.plist
# generate services
DATE_SERVICE_NAME="DateFormattingService"
generate "{project_name: $PROJECT_NAME}" $TEMPLATES/dateformatservice.mustache $PROJECT_NAME/Services/"$PROJECT_NAME$DATE_SERVICE_NAME".swift
# generate services
readonly DATE_SERVICE_NAME="DateFormattingService"
generate "{project_name: $PROJECT_NAME}" $TEMPLATES/dateformatservice.mustache $PROJECT_NAME/Services/"$PROJECT_NAME$DATE_SERVICE_NAME".swift
NUMBER_SERVICE_NAME="NumberFormattingService"
generate "{project_name: $PROJECT_NAME}" $TEMPLATES/numberformatservice.mustache $PROJECT_NAME/Services/"$PROJECT_NAME$NUMBER_SERVICE_NAME".swift
readonly NUMBER_SERVICE_NAME="NumberFormattingService"
generate "{project_name: $PROJECT_NAME}" $TEMPLATES/numberformatservice.mustache $PROJECT_NAME/Services/"$PROJECT_NAME$NUMBER_SERVICE_NAME".swift
TABLE_CONTENT_CONTROLLER_NAME="TableContentController"
generate "{project_name: $PROJECT_NAME}" $TEMPLATES/tablecontentcontroller.mustache $PROJECT_NAME/Controllers/"$PROJECT_NAME$TABLE_CONTENT_CONTROLLER_NAME".swift
;;
library)
# create info plists
generate "{project_name: $PROJECT_NAME}" $TEMPLATES/Info.mustache Sources/Info-iOS.plist
generate "{project_name: $PROJECT_NAME}" $TEMPLATES/Info.mustache Sources/Info-iOS-Extension.plist
generate "{project_name: $PROJECT_NAME}" $TEMPLATES/Info.mustache Sources/Info-watchOS.plist
generate "{project_name: $PROJECT_NAME}" $TEMPLATES/Info.mustache Sources/Info-tvOS.plist
readonly TABLE_CONTENT_CONTROLLER_NAME="TableContentController"
generate "{project_name: $PROJECT_NAME}" $TEMPLATES/tablecontentcontroller.mustache $PROJECT_NAME/Controllers/"$PROJECT_NAME$TABLE_CONTENT_CONTROLLER_NAME".swift
# generate public header
generate "{project_name: $PROJECT_NAME}" $TEMPLATES/PublicHeader.mustache Sources/$PROJECT_NAME.h
# copy example class
cp $TEMPLATES/ExampleClass.swift Sources/Classes/ExampleClass.swift
# generate podspec
generate "{
project_name: $PROJECT_NAME,
deployment_target_ios: $DEPLOYMENT_TARGET_IOS,
deployment_target_watch_os: $DEPLOYMENT_TARGET_WATCH_OS,
deployment_target_tv_os: $DEPLOYMENT_TARGET_TV_OS,
swift_version: $SWIFT_VERSION,
xcode_version: $XCODE_VERSION
}" $TEMPLATES/podspec.mustache $PROJECT_NAME.podspec
# copy licence
cp $TEMPLATES/LICENSE LICENSE
;;
esac
# generate file for generate xcodeproj
generate "{
project_name: $PROJECT_NAME,
deployment_target_ios: $DEPLOYMENT_TARGET_IOS,
deployment_target_watch_os: $DEPLOYMENT_TARGET_WATCH_OS,
deployment_target_tv_os: $DEPLOYMENT_TARGET_TV_OS,
swift_version: $SWIFT_VERSION,
xcode_version: $XCODE_VERSION,
project_name_lowecased: $LOWERCASED_PROJECT_NAME}" \
readonly LOWERCASED_PROJECT_NAME=$(echo "$PROJECT_NAME" | tr '[:upper:]' '[:lower:]')
generate "{project_name: $PROJECT_NAME, deployment_target: $DEPLOYMENT_TARGET, project_name_lowecased: $LOWERCASED_PROJECT_NAME}" \
$TEMPLATES/project.mustache \
project.yml
# install carthage
generate "{project_name: $PROJECT_NAME}" $TEMPLATES/Cartfile.mustache Cartfile
carthage bootstrap
# generate xcode project file
echo "Generate xcodeproj file..."
xcodegen --spec project.yml
carting update -f list
# conifgure build_phases folder
cp -r $CURRENT_DIR/sources/build_phases ./build_phases
generate "{project_name: $PROJECT_NAME}" $TEMPLATES/build_phases/code_lint_folders.mustache build_phases/code_lint_folders.xcfilelist
# creating .gitkeep in each folder to enforce git stash this folder
case $PROJECT_TYPE in
project)
for folder in `cat $FOLDERNAMES`; do
touch $PROJECT_NAME/$folder/.gitkeep
done
;;
library)
for folder in `cat $FOLDERNAMES`; do
touch Sources/$folder/.gitkeep
done
;;
esac
for folder in `cat $CURRENT_DIR/foldernames.txt`; do
touch $PROJECT_NAME/$folder/.gitkeep
done
# install pods
generate "{
project_name: $PROJECT_NAME,
deployment_target_ios: $DEPLOYMENT_TARGET_IOS,
deployment_target_watch_os: $DEPLOYMENT_TARGET_WATCH_OS,
deployment_target_tv_os: $DEPLOYMENT_TARGET_TV_OS
}" $TEMPLATES/Podfile.mustache Podfile
pod repo update
pod install
generate "{project_name: $PROJECT_NAME, deployment_target: $DEPLOYMENT_TARGET}" $TEMPLATES/Podfile.mustache Podfile
bundle exec pod install --repo-update
# configure git files
cp $TEMPLATES/gitignore .gitignore
cp $TEMPLATES/gitattributes .gitattributes
# configure git hooks
cp -r $CURRENT_DIR/sources/.githooks .githooks
generate "{project_name: $PROJECT_NAME}" $TEMPLATES/githooks/post-merge.mustache .githooks/post-merge
generate "{project_name: $PROJECT_NAME}" $TEMPLATES/githooks/pre-commit.mustache .githooks/pre-commit
chmod +x .githooks/post-merge
chmod +x .githooks/pre-commit
git config --local core.hooksPath .githooks
# configure fastlane
generate "{git_url: \"$GIT_URL\", match_password: $MATCH_PASSWORD}" $TEMPLATES/fastlane/Matchfile.mustache fastlane/Matchfile
generate "{project_name: $PROJECT_NAME, project_name_lowecased: $LOWERCASED_PROJECT_NAME}" $TEMPLATES/fastlane/configurations.yaml.mustache fastlane/configurations.yaml
# configure rambafile
generate "{project_name: $PROJECT_NAME}" $TEMPLATES/Rambafile.mustache Rambafile
bundle exec generamba template install
# configure README.md
generate "{project_name: $PROJECT_NAME}" $TEMPLATES/README.mustache README.md
# configure submodules
git submodule add git@github.com:TouchInstinct/$COMMON_REPO_NAME.git common
git submodule add git@github.com:TouchInstinct/BuildScripts.git build-scripts
case $PROJECT_TYPE in
project)
# configure rambafile
generate "{project_name: $PROJECT_NAME}" $TEMPLATES/Rambafile.mustache Rambafile
generamba template install
COMMON_REPO_NAME=$PROJECT_NAME-common
git submodule add git@github.com:TouchInstinct/$COMMON_REPO_NAME.git common
;;
esac
git submodule update --init
# final clean up
rm Gemfile*
rm Brewfile*
rm project.yml
# generate models, strings, etc
xcodebuild -workspace $PROJECT_NAME.xcworkspace -scheme $PROJECT_NAME -configuration StandardDebug -sdk iphonesimulator
# install additional brews
cp $CURRENT_DIR/additional/Brewfile Brewfile
brew bundle
#copy package for firebase
cp $CURRENT_DIR/sources/package.json package.json
#yarn
yarn install
# copy setup, install and update commands
cp $CURRENT_DIR/sources/setup.command setup.command
cp $CURRENT_DIR/sources/install_dependencies.command install_dependencies.command
cp $CURRENT_DIR/sources/update_dependencies.command update_dependencies.command
# commit
git checkout -b feature/setup_project
@ -224,4 +164,4 @@ git add .
git commit -m "Setup project configuration"
# open workspace
open -a Xcode $PROJECT_NAME.xcworkspace
open $PROJECT_NAME.xcworkspace

View File

@ -1,12 +1,9 @@
Analytics
Appearance
Cells
Controllers
Extensions
Generated
Models
Networking
Protocols
Resources/Localization
Realm
Views

View File

@ -1,6 +0,0 @@
Classes
Enums
Extensions
Functions
Protocols
Structures

View File

@ -1,4 +0,0 @@
brew "SwiftLint"
brew "pmd"
brew "Carthage"
brew "Carting"

View File

@ -1,2 +0,0 @@
source 'https://rubygems.org'
gem 'mustache'

View File

@ -1,13 +0,0 @@
GEM
remote: https://rubygems.org/
specs:
mustache (1.0.5)
PLATFORMS
ruby
DEPENDENCIES
mustache
BUNDLED WITH
1.16.1

View File

@ -1,25 +0,0 @@
//
// Copyright (c) 2018 Touch Instinct
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the Software), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
import Foundation
public final class ExampleClass {}

View File

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.0.1</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
</plist>

View File

@ -1,201 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright {yyyy} {name of copyright owner}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -1,35 +0,0 @@
source 'https://github.com/CocoaPods/Specs'
source 'https://github.com/TouchInstinct/Podspecs.git'
abstract_target '{{project_name}}' do
use_frameworks!
inhibit_all_warnings!
# common pods
pod 'SwiftLint'
target '{{project_name}}-iOS' do
platform :ios, '{{deployment_target_ios}}'
# pods for iOS
end
target '{{project_name}}-watchOS' do
platform :watchos, '{{deployment_target_watch_os}}'
# pods for watchOS
end
target '{{project_name}}-tvOS' do
platform :tvos, '{{deployment_target_tv_os}}'
# pods for tvOS
end
end
ENV['COCOAPODS_DISABLE_STATS'] = "true"

View File

@ -1,9 +0,0 @@
#import <UIKit/UIKit.h>
//! Project version number for LeadKit.
FOUNDATION_EXPORT double {{project_name}}VersionNumber;
//! Project version string for LeadKit.
FOUNDATION_EXPORT const unsigned char {{project_name}}VersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <{{project_name}}/PublicHeader.h>

View File

@ -1 +0,0 @@
# {{project_name}} library

View File

@ -1,18 +0,0 @@
Pod::Spec.new do |s|
s.name = "{{project_name}}"
s.version = "0.0.1"
s.summary = "TouchInstinct framework"
s.homepage = "https://github.com/TouchInstinct/{{project_name}}"
s.license = "Apache License, Version 2.0"
s.author = "Touch Instinct"
s.source = { :git => "https://github.com/TouchInstinct/{{project_name}}.git", :tag => s.version }
s.ios.deployment_target = '{{deployment_target_ios}}'
s.watchos.deployment_target = '{{deployment_target_watch_os}}'
s.tvos.deployment_target = '{{deployment_target_tv_os}}'
s.swift_version = '{{swift_version}}'
s.source_files = "Sources/**/*.swift"
end

View File

@ -1,106 +0,0 @@
name: {{project_name}}
options:
createIntermediateGroups: true
xcodeVersion: "{{xcode_version}}"
usesTabs: false
indentWidth: 4
deploymentTarget:
iOS: "{{deployment_target_ios}}"
watchOS: "{{deployment_target_watch_os}}"
tvOS: "{{deployment_target_tv_os}}"
targets:
{{project_name}}-iOS:
settings:
base:
PRODUCT_NAME: "{{project_name}}"
INFOPLIST_FILE: Sources/Info-iOS.plist
SWIFT_VERSION: "{{swift_version}}"
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED: YES
type: framework
platform: iOS
postbuildScripts:
- script: ". build-scripts/xcode/build_phases/swiftlint.sh Sources"
name: Swiftlint
- script: ". build-scripts/xcode/build_phases/copy_paste_detection.sh Sources"
name: CopyPaste Detection
sources:
- path: Sources
excludes:
- "*.plist"
- path: Sources/Classes
buildPhase: sources
- path: Sources/Enums
buildPhase: sources
- path: Sources/Extensions
buildPhase: sources
- path: Sources/Functions
buildPhase: sources
- path: Sources/Protocols
buildPhase: sources
- path: Sources/Structures
buildPhase: sources
- path: "Sources/{{project_name}}.h"
buildPhase: headers
{{project_name}}-watchOS:
settings:
base:
PRODUCT_NAME: "{{project_name}}"
INFOPLIST_FILE: Sources/Info-watchOS.plist
SWIFT_VERSION: "{{swift_version}}"
type: framework
platform: watchOS
postbuildScripts:
- script: ". build-scripts/xcode/build_phases/swiftlint.sh Sources"
name: Swiftlint
- script: ". build-scripts/xcode/build_phases/copy_paste_detection.sh Sources"
name: CopyPaste Detection
sources:
- path: Sources
excludes:
- "*.plist"
- path: Sources/Classes
buildPhase: sources
- path: Sources/Enums
buildPhase: sources
- path: Sources/Extensions
buildPhase: sources
- path: Sources/Functions
buildPhase: sources
- path: Sources/Protocols
buildPhase: sources
- path: Sources/Structures
buildPhase: sources
- path: "Sources/{{project_name}}.h"
buildPhase: headers
{{project_name}}-tvOS:
settings:
base:
PRODUCT_NAME: "{{project_name}}"
INFOPLIST_FILE: Sources/Info-tvOS.plist
SWIFT_VERSION: "{{swift_version}}"
type: framework
platform: tvOS
postbuildScripts:
- script: ". build-scripts/xcode/build_phases/swiftlint.sh Sources"
name: Swiftlint
- script: ". build-scripts/xcode/build_phases/copy_paste_detection.sh Sources"
name: CopyPaste Detection
sources:
- path: Sources
excludes:
- "*.plist"
- path: Sources/Classes
buildPhase: sources
- path: Sources/Enums
buildPhase: sources
- path: Sources/Extensions
buildPhase: sources
- path: Sources/Functions
buildPhase: sources
- path: Sources/Protocols
buildPhase: sources
- path: Sources/Structures
buildPhase: sources
- path: "Sources/{{project_name}}.h"
buildPhase: headers

View File

@ -1,5 +0,0 @@
brew "XcodeGen"
brew "SwiftLint"
brew "pmd"
brew "Carthage"
brew "Carting"

View File

@ -1,3 +0,0 @@
source 'https://rubygems.org'
gem 'mustache'
gem 'generamba', git: 'https://github.com/strongself/Generamba.git', branch: 'develop'

View File

@ -1,60 +0,0 @@
GIT
remote: https://github.com/strongself/Generamba.git
revision: 4c450efc3ea63dd34fa04206194813dbb021441e
branch: develop
specs:
generamba (1.4.1)
cocoapods-core (= 1.5.3)
git (= 1.2.9.1)
liquid (= 4.0.0)
terminal-table (= 1.4.5)
thor (= 0.19.1)
xcodeproj (= 1.6.0)
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.0)
activesupport (5.2.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
atomos (0.1.3)
claide (1.0.2)
cocoapods-core (1.5.3)
activesupport (>= 4.0.2, < 6)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
colored2 (3.1.2)
concurrent-ruby (1.1.5)
fuzzy_match (2.0.4)
git (1.2.9.1)
i18n (1.6.0)
concurrent-ruby (~> 1.0)
liquid (4.0.0)
minitest (5.11.3)
mustache (1.1.0)
nanaimo (0.2.6)
nap (1.1.0)
terminal-table (1.4.5)
thor (0.19.1)
thread_safe (0.3.6)
tzinfo (1.2.5)
thread_safe (~> 0.1)
xcodeproj (1.6.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.2.6)
PLATFORMS
ruby
DEPENDENCIES
generamba!
mustache
BUNDLED WITH
2.0.1

View File

@ -1,17 +0,0 @@
development:
app_identifier:
- ru.touchin.{{project_name_lowecased}}
apple_id: "apple@touchin.ru"
team_id: "D4HA43V467"
itc_team_id: "1426360"
enterprise:
app_identifier:
- com.touchin.{{project_name_lowecased}}
apple_id: "enterpriseapple@touchin.ru"
team_id: "228J5MMU7S"
appstore:
app_identifier:
- customer.bundle.id
apple_id: "apple@touchin.ru"
team_id: "CUSTOMER_TEAM_ID"
itc_team_id: "CUSTOMER_ITC_TEAM_ID"

View File

@ -1,10 +0,0 @@
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/LeadKit/LeadKit.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/RxKeyboard/RxKeyboard.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/Alamofire/Alamofire.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/RxAlamofire/RxAlamofire.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/RxOptional/RxOptional.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/SnapKit/SnapKit.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/SwiftDate/SwiftDate.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/TableKit/TableKit.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/RxSwift/RxSwift.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/UIScrollView_InfiniteScroll/UIScrollView_InfiniteScroll.json"

View File

@ -1,24 +0,0 @@
source 'https://github.com/CocoaPods/Specs'
source 'https://github.com/TouchInstinct/Podspecs.git'
platform :ios, '{{deployment_target_ios}}'
use_frameworks!
inhibit_all_warnings!
project '{{project_name}}', {
'StandardDebug' => :debug,
'EnterpriseDebug' => :debug,
'StandardRelease' => :release,
'EnterpriseRelease' => :release,
'AppStore' => :release
}
target '{{project_name}}' do
pod 'Fabric'
pod 'Crashlytics'
pod 'SwiftLint'
end
# If you have slow HDD
ENV['COCOAPODS_DISABLE_STATS'] = "true"

View File

@ -1,2 +0,0 @@
*.pbxproj merge=union
*.strings text diff

View File

@ -1,74 +0,0 @@
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
## Build generated
build/
DerivedData/
## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/
## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint
## Obj-C/Swift specific
*.hmap
*.ipa
*.dSYM.zip
*.dSYM
## Playgrounds
timeline.xctimeline
playground.xcworkspace
# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
# Package.pins
.build/
# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
Pods/
# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts
Carthage/Build
# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
# Touch Instinct custom
Downloads/
fastlane/README.md
Templates/
cpd-output.xml
*IDEWorkspaceChecks.plist

View File

@ -1,98 +0,0 @@
name: {{project_name}}
options:
createIntermediateGroups: true
xcodeVersion: "{{xcode_version}}"
usesTabs: false
indentWidth: 4
deploymentTarget:
iOS: "{{deployment_target_ios}}"
configs:
StandardDebug: debug
StandardRelease: release
EnterpriseDebug: debug
EnterpriseRelease: release
AppStore: release
targets:
{{project_name}}:
settings:
base:
SWIFT_VERSION: "{{swift_version}}"
CODE_SIGN_STYLE: Manual
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED: YES
configs:
StandardDebug:
PRODUCT_BUNDLE_IDENTIFIER: ru.touchin.{{project_name_lowecased}}
StandardRelease:
PRODUCT_BUNDLE_IDENTIFIER: ru.touchin.{{project_name_lowecased}}
EnterpriseDebug:
PRODUCT_BUNDLE_IDENTIFIER: com.touchin.{{project_name_lowecased}}
EnterpriseRelease:
PRODUCT_BUNDLE_IDENTIFIER: com.touchin.{{project_name_lowecased}}
AppStore:
PRODUCT_BUNDLE_IDENTIFIER: customer.bundle.id
type: application
platform: iOS
dependencies:
- carthage: Alamofire
- carthage: TableKit
- carthage: SnapKit
- carthage: SwiftDate
- carthage: LeadKit
- carthage: RxAtomic
- carthage: RxSwift
- carthage: RxCocoa
- carthage: RxAlamofire
- carthage: RxOptional
- carthage: Rxkeyboard
- carthage: UIScrollView_InfiniteScroll
prebuildScripts:
- script: ". build-scripts/xcode/build_phases/localization.sh"
name: Localization
- script: ". build-scripts/xcode/build_phases/api_generator.sh 1.2.20"
name: API Generator
postbuildScripts:
- script: ". build-scripts/xcode/build_phases/swiftlint.sh"
name: Swiftlint
- script: ". build-scripts/xcode/build_phases/copy_paste_detection.sh"
name: CopyPaste Detection
- script: "\"${PODS_ROOT}/Fabric/run\" API_KEY_FROM_FABRIC Build_Secret"
name: Fabric
runOnlyWhenInstalling: true
sources:
- path: {{project_name}}
excludes:
- "Resources/LaunchScreen.storyboard"
- "Resources/Assets.xcassets/AppIcon.appiconset/Contents.json"
- "Info.plist"
- path: {{project_name}}/Analytics
buildPhase: sources
- path: {{project_name}}/Appearance
buildPhase: sources
- path: {{project_name}}/Cells
buildPhase: sources
- path: {{project_name}}/Controllers
buildPhase: sources
- path: {{project_name}}/Extensions
buildPhase: sources
- path: {{project_name}}/Generated
buildPhase: sources
- path: {{project_name}}/Models
buildPhase: sources
- path: {{project_name}}/Networking
buildPhase: sources
- path: {{project_name}}/Protocols
buildPhase: sources
- path: {{project_name}}/Realm
buildPhase: sources
- path: {{project_name}}/Resources
excludes:
- "Localization"
buildPhase: resources
- path: {{project_name}}/Resources/Localization
excludes:
- "String+Localization.swift"
buildPhase: resources
- path: {{project_name}}/Services
buildPhase: sources
- path: {{project_name}}/Views
buildPhase: sources

View File

@ -0,0 +1,16 @@
# Project path
readonly PROJECT_PATH=${1}
xcodebuild \
-quiet \
-scheme CodeGen \
-project ${PROJECT_PATH} \
-destination 'generic/platform=macOS' \
archive
if test $? -eq 0
then echo "Code generation was finished successfully!"
else
echo "There is the error with code generation!"
exit 1
fi

View File

@ -0,0 +1,16 @@
# Project path
readonly PROJECT_PATH=${1}
xcodebuild \
-quiet \
-scheme CodeLint \
-project ${PROJECT_PATH} \
-destination 'generic/platform=macOS' \
analyze
if test $? -eq 0
then echo "Code linting was finished successfully!"
else
echo "There is the error with code linting!"
exit 1
fi

View File

@ -1,3 +1,3 @@
tap "yonaskolb/XcodeGen", "https://github.com/yonaskolb/XcodeGen.git"
brew "XcodeGen"
brew "carthage"

9
sources/Gemfile Normal file
View File

@ -0,0 +1,9 @@
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/strongself/Generamba.git" }
gem "cocoapods"
gem "fastlane"
gem 'generamba', github: 'strongself/develop'
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)

View File

@ -0,0 +1,8 @@
diff "${SRCROOT}/Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null
if [ $? != 0 ] ; then
# print error to STDERR
echo "error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation." >&2
exit 1
fi
# This output is used by Xcode 'outputs' to avoid re-running this script phase.
echo "SUCCESS" > "${SCRIPT_OUTPUT_FILE_0}"

View File

@ -15,14 +15,3 @@ end
lane :EnterpriseRelease do |options|
buildConfiguration(options)
end
lane :AppStoreRelease do |options|
options[:uploadToAppStore] = true
buildConfiguration(options)
end
lane :SyncCodeSigning do |options|
options = merge_options_with_config_file(options)
options = options.merge(get_keychain_options(options))
syncCodeSigning(options)
end

View File

@ -0,0 +1,6 @@
# Autogenerated by fastlane
#
# Ensure this file is checked in to source control!
gem 'fastlane-plugin-firebase_app_distribution'
gem 'fastlane-plugin-badge'

View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$DIR"
bundle exec pod install

5
sources/package.json Normal file
View File

@ -0,0 +1,5 @@
{
"dependencies": {
"firebase-tools": "^7.12.1"
}
}

View File

@ -1,6 +1,4 @@
import UIKit
import Fabric
import Crashlytics
@UIApplicationMain
final class AppDelegate: UIResponder, UIApplicationDelegate {
@ -28,7 +26,7 @@ final class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
Fabric.with([Crashlytics.self])
FirebaseConfigurator.configure()
return true
}
}

View File

@ -0,0 +1,13 @@
extension String {
static let newLine = "\n"
static let empty = ""
static let whiteSpace = " "
static let dot = "."
static let comma = ","
static let zero = "0"
}

View File

@ -0,0 +1,31 @@
import Firebase
enum FirebaseConfigurator {
private static var resourceName: String {
#if APPSTORE
return "AppStore-GoogleService-Info"
#elseif ENTERPRISE
return "Enterprise-GoogleService-Info"
#elseif STANDARD
return "Standard-GoogleService-Info"
#else
assertionFailure("There is no right plist file")
return .empty
#endif
}
static func configure() {
guard let filePath = Bundle.main.path(forResource: resourceName, ofType: .fileExtension),
let options = FirebaseOptions(contentsOfFile: filePath) else {
return
}
FirebaseApp.configure(options: options)
}
}
// MARK: - Constants
private extension String {
static let fileExtension = "plist"
}

20
sources/setup.command Executable file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$DIR"
# Устанавливаем необходимые пакеты через Homebrew
brew bundle
# Устанавливаем bundler
gem install bundler
# Устанавливаем ruby зависимости.
# Cocoapods and Fastlane
bundle install
# Обновляем репозиторий подов и запускаем их установку.
bundle exec pod install --repo-update
# Configure githooks folder path
git config --local core.hooksPath .githooks

View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$DIR"
bundle exec pod update

View File

@ -20,24 +20,12 @@
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>Fabric</key>
<dict>
<key>APIKey</key>
<string>API_KEY_FROM_FABRIC</string>
<key>Kits</key>
<array>
<dict>
<key>KitInfo</key>
<dict/>
<key>KitName</key>
<string>Crashlytics</string>
</dict>
</array>
</dict>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>

60
templates/Podfile.mustache Executable file
View File

@ -0,0 +1,60 @@
source 'https://cdn.cocoapods.org/'
source 'git@github.com:TouchInstinct/Podspecs'
platform :ios, '{{deployment_target}}'
use_frameworks!
inhibit_all_warnings!
project '{{project_name}}', {
'AppStore' => :release,
'Release' => :release,
'Debug' => :debug
}
target '{{project_name}}' do
# System
pod 'SwiftLint', '0.42.0'
pod 'LicensePlist'
pod 'Firebase/Crashlytics'
pod 'Firebase/Performance'
pod 'Firebase/Analytics' # for Firebase/Performance
# Rx
pod 'RxKeyboard', '1.0.0'
# Security
pod 'KeychainAccess'
# Utils
pod 'LeadKit'
pod 'DeviceKit'
# Layout
pod 'SnapKit'
# UI
pod 'TableKit'
end
# fixes Xcode 12 warnings:
# "The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99."
# see https://github.com/CocoaPods/CocoaPods/issues/9884
min_supported_deployment_target = Version.new(9.0) # as of Xcode 12
post_install do |pi|
pi.pods_project.targets.each do |target|
target.build_configurations.each do |config|
build_config_version = Version.new(config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'])
max_deployment_target = [build_config_version, min_supported_deployment_target].max
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = max_deployment_target.to_s
end
end
end
# If you have slow HDD
ENV['COCOAPODS_DISABLE_STATS'] = "true"

View File

@ -24,7 +24,8 @@ catalogs:
### Templates
templates:
- {name: touchin}
- {name: touchin-configurable}
- {name: touchin-custom-view}
- {name: touchin-stateful}
- {name: touchin-pagination}
- {name: touchin-tablecell}

View File

@ -0,0 +1 @@
${SRCROOT}/{{project_name}}

View File

@ -0,0 +1,2 @@
git_url "{{git_url}}"
ENV["MATCH_PASSWORD"] = "{{match_password}}"

View File

@ -0,0 +1,24 @@
targets:
{{project_name}}:
development:
PROVISIONING_PROFILE_SPECIFIER: "match Development ru.touchin.{{project_name_lowecased}}"
PRODUCT_BUNDLE_IDENTIFIER: "ru.touchin.{{project_name_lowecased}}"
enterprise:
PROVISIONING_PROFILE_SPECIFIER: "match InHouse com.touchin.{{project_name_lowecased}}"
PRODUCT_BUNDLE_IDENTIFIER: "com.touchin.{{project_name_lowecased}}"
appstore:
PROVISIONING_PROFILE_SPECIFIER: "***"
PRODUCT_BUNDLE_IDENTIFIER: "***"
types:
development:
apple_id: "apple@touchin.ru"
team_id: "D4HA43V467"
itc_team_id: "1426360"
enterprise:
apple_id: "enterpriseapple@touchin.ru"
team_id: "228J5MMU7S"
appstore:
apple_id: "apple@touchin.ru"
team_id: "***"
itc_team_id: "***"

View File

@ -0,0 +1,3 @@
echo "Running post-merge hook"
sh .githooks/scripts/CodeGen.sh './{{project_name}}.xcodeproj'

View File

@ -0,0 +1,3 @@
echo "Running post-merge hook"
sh .githooks/scripts/CodeLint.sh './{{project_name}}.xcodeproj'

View File

@ -2,11 +2,17 @@
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
## Build generated
## User settings
xcuserdata/
## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
*.xcscmblueprint
*.xccheckout
## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
build/
DerivedData/
## Various settings
*.moved-aside
*.pbxuser
!default.pbxuser
*.mode1v3
@ -15,15 +21,11 @@ DerivedData/
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/
## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint
## Obj-C/Swift specific
*.hmap
## App packaging
*.ipa
*.dSYM.zip
*.dSYM
@ -37,6 +39,13 @@ playground.xcworkspace
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
# Package.pins
# Package.resolved
# *.xcodeproj
#
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
# hence it is not needed unless you have added a package configuration file to your project
# .swiftpm
.build/
# CocoaPods
@ -46,29 +55,51 @@ playground.xcworkspace
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
Pods/
#
# Add this line if you want to avoid checking in source code from the Xcode workspace
# *.xcworkspace
# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
Carthage/Checkouts
Carthage/Build
Carthage/Build/
# Accio dependency management
Dependencies/
.accio/
# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# It is recommended to not store the screenshots in the git repo.
# Instead, use fastlane to re-generate the screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/screenshots/**/*.png
fastlane/test_output
# Code Injection
#
# After new code Injection tools there's a generated folder /iOSInjectionProject
# https://github.com/johnno1962/injectionforxcode
iOSInjectionProject/
# homebrew-bundle
Brewfile.lock.json
# Node.js
# Dependency directories
node_modules/
# Touch Instinct custom
Downloads/
fastlane/README.md
Templates/
cpd-output.xml
*.swp
*IDEWorkspaceChecks.plist

134
templates/project.mustache Normal file
View File

@ -0,0 +1,134 @@
name: {{project_name}}
options:
createIntermediateGroups: true
xcodeVersion: 11.0
usesTabs: false
indentWidth: 4
deploymentTarget:
iOS: "{{deployment_target}}"
configs:
AppStore: release
Release: release
Debug: debug
targets:
{{project_name}}:
settings:
base:
SWIFT_VERSION: 5.0
SWIFT_SWIFT3_OBJC_INFERENCE: On
CODE_SIGN_STYLE: Manual
configs:
Debug:
PRODUCT_BUNDLE_IDENTIFIER: ru.touchin.{{project_name_lowecased}}
GOOGLE_SERVICE_INFO_PLIST_PATH: $(SRCROOT)/$(TARGET_NAME)/Resources/Standard-GoogleService-Info.plist
Release:
PRODUCT_BUNDLE_IDENTIFIER: com.touchin.{{project_name_lowecased}}
GOOGLE_SERVICE_INFO_PLIST_PATH: $(SRCROOT)/$(TARGET_NAME)/Resources/Enterprise-GoogleService-Info.plist
AppStore:
PRODUCT_BUNDLE_IDENTIFIER: com.touchin.{{project_name_lowecased}}
GOOGLE_SERVICE_INFO_PLIST_PATH: $(SRCROOT)/$(TARGET_NAME)/Resources/AppStore-GoogleService-Info.plist
type: application
platform: iOS
postbuildScripts:
- script: "\"${PODS_ROOT}/FirebaseCrashlytics/run\" --google-service-plist ${GOOGLE_SERVICE_INFO_PLIST_PATH}"
name: Firebase
runOnlyWhenInstalling: true
sources:
- path: {{project_name}}
excludes:
- "Resources/LaunchScreen.storyboard"
- "Resources/Assets.xcassets/AppIcon.appiconset/Contents.json"
- "Info.plist"
- path: {{project_name}}/Analytics
buildPhase: sources
- path: {{project_name}}/Cells
buildPhase: sources
- path: {{project_name}}/Controllers
buildPhase: sources
- path: {{project_name}}/Extensions
buildPhase: sources
- path: {{project_name}}/Generated
buildPhase: sources
- path: {{project_name}}/Networking
buildPhase: sources
- path: {{project_name}}/Protocols
buildPhase: sources
- path: {{project_name}}/Resources
buildPhase: resources
- path: {{project_name}}/Resources/Localization
buildPhase: resources
- path: {{project_name}}/Services
buildPhase: sources
- path: {{project_name}}/Views
buildPhase: sources
aggregateTargets:
CodeGen:
buildScripts:
- name: Localization
script: |
readonly PRODUCT_NAME={{project_name}}
. build-scripts/xcode/build_phases/localization.sh
inputFiles:
- $(SRCROOT)/common/strings/default_common_strings_ru.json
- name: API Generator
script: . build-scripts/xcode/build_phases/api_generator.sh 1.4.0-alpha3 {{project_name}}/Generated
- name: License List
script: |
readonly PODS_ROOT="${SRCROOT}/Pods"
${PODS_ROOT}/LicensePlist/license-plist --output-path Resources/LicenseList --prefix Licenses --suppress-opening-directory
CodeLint:
buildScripts:
- name: Check Pods Manifest.lock
script: |
readonly PODS_ROOT="${SRCROOT}/Pods"
. ${SRCROOT}/build_phases/check_pods_manifest.sh
inputFiles:
- ${SRCROOT}/Podfile.lock
- ${PODS_ROOT}/Manifest.lock
outputFiles:
- $(DERIVED_FILE_DIR)/Pods-Ubrd-checkManifestLockResult.txt
- name: Swiftlint
script: |
readonly PODS_ROOT="${SRCROOT}/Pods"
readonly SCRIPT_DIR="${SRCROOT}/build-scripts/xcode/build_phases"
. ${SCRIPT_DIR}/swiftlint.sh
inputFileLists:
- $(SRCROOT)/build_phases/code_lint_folders.xcfilelist
basedOnDependencyAnalysis: false
- name: CopyPaste Detection
script: |
readonly SCRIPT_DIR="${SRCROOT}/build-scripts/xcode/build_phases"
. build-scripts/xcode/build_phases/copy_paste_detection.sh Localization Generated Pods
inputFileLists:
- $(SRCROOT)/build_phases/code_lint_folders.xcfilelist
basedOnDependencyAnalysis: false
UnusedDetection:
buildScripts:
- name: UnusedCode Detection
script: . build-scripts/xcode/build_phases/unused.sh
schemes:
CodeGen:
build:
targets:
CodeGen: [run, archive]
CodeLint:
build:
targets:
CodeLint: [analyze]
UnusedDetection:
build:
targets:
UnusedDetection: [analyze]