Skip to content

Commit

Permalink
Create group with members
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-amisha-i committed Mar 19, 2024
1 parent ce6d47a commit d26b02c
Show file tree
Hide file tree
Showing 92 changed files with 3,302 additions and 608 deletions.
148 changes: 79 additions & 69 deletions .github/workflows/Deploy.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Deploy

on:
push:
branches:
- main
on: push
# push:
# branches:
# - main

jobs:
deploy:
Expand All @@ -25,77 +25,87 @@ jobs:
- name: Display Xcode Version
run: /usr/bin/xcodebuild -version

# - name: Install Apple Certificate and Provisioning Profile
# run: |
# chmod +x install_dist_certs.sh && ./install_dist_certs.sh
# chmod +x install_dist_profile.sh && ./install_dist_profile.sh
- name: Install Apple Certificate and Provisioning Profile
env:
BUILD_CERTIFICATE_KEY: ${{ secrets.BUILD_CERTIFICATE_KEY }}
BUILD_CERTIFICATE_PASSWORD: ${{ secrets.BUILD_CERTIFICATE_PASSWORD }}
BUILD_PROVISION_PROFILE: ${{ secrets.BUILD_PROVISION_PROFILE }}
BUILD_PROVISION_UUID: ${{ secrets.BUILD_PROVISION_UUID }}
BUILD_KEYCHAIN: ${{ secrets.BUILD_KEYCHAIN }}
BUILD_KEYCHAIN_PASSWORD: ${{ secrets.BUILD_KEYCHAIN_PASSWORD }}
run: |
chmod +x install_dist_certs.sh && ./install_dist_certs.sh
chmod +x install_dist_profile.sh && ./install_dist_profile.sh
# - name: Cache DerivedData
# uses: actions/cache@v2
# with:
# path: |
# DerivedData
# key: ${{ runner.os }}-derived-data-${{ hashFiles('**/*.xcworkspace') }}
# restore-keys: |
# ${{ runner.os }}-derived-data-
- name: Cache DerivedData
uses: actions/cache@v2
with:
path: |
DerivedData
key: ${{ runner.os }}-derived-data-${{ hashFiles('**/*.xcworkspace') }}
restore-keys: |
${{ runner.os }}-derived-data-
# - name: Cache CocoaPods
# uses: actions/cache@v2
# with:
# path: |
# Pods
# key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
# restore-keys: |
# ${{ runner.os }}-pods-
- name: Cache CocoaPods
uses: actions/cache@v2
with:
path: |
Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
# - name: Install CocoaPods
# run: |
# if [ -f "Podfile.lock" ] && [ -f "${{ runner.workspace }}/Podfile.lock" ] && cmp -s Podfile.lock "${{ runner.workspace }}/Podfile.lock"; then
# echo "Podfile.lock unchanged. Skipping pod installs."
# else
# gem install cocoapods
# pod install --repo-update
# fi
- name: Install CocoaPods
run: |
if [ -f "Podfile.lock" ] && [ -f "${{ runner.workspace }}/Podfile.lock" ] && cmp -s Podfile.lock "${{ runner.workspace }}/Podfile.lock"; then
echo "Podfile.lock unchanged. Skipping pod installs."
else
gem install cocoapods
pod install --repo-update
fi
# - name: Run SwiftLint
# run: |
# if git diff --name-only ${{ github.sha }} | grep -q '\.swift$'; then
# Pods/SwiftLint/swiftlint Splito
# else
# echo "No Swift files changed. Skipping SwiftLint."
# fi
- name: Run SwiftLint
run: |
if git diff --name-only ${{ github.sha }} | grep -q '\.swift$'; then
Pods/SwiftLint/swiftlint Splito
else
echo "No Swift files changed. Skipping SwiftLint."
fi
# - name: Get Build Version
# run: |
# file='Splito/VERSION'
# fileData=`cat $file`
# IFS='.'
# read -a versionValue <<< "$fileData"
# buildNumber=$(expr `expr ${versionValue[0]} \* 1000000` + `expr ${versionValue[1]} \* 10000` + ${CI_PIPELINE_IID})
# IFS=''
# buildName="${versionValue[0]}.${versionValue[1]}.$CI_PIPELINE_IID"
# echo "Uploading build $buildName"
- name: Get Build Version
run: |
file='Splito/VERSION'
fileData=`cat $file`
IFS='.'
read -a versionValue <<< "$fileData"
buildNumber=$(expr `expr ${versionValue[0]} \* 1000000` + `expr ${versionValue[1]} \* 10000` + ${{ github.run_number }})
IFS=''
buildName="${versionValue[0]}.${versionValue[1]}.${{ github.run_number }}"
echo "Uploading build $buildName"
# - name: Build and Archive Project
# run: |
# ARCHIVE_PATH="$HOME/Library/Developer/Xcode/Archives/Splito/${CI_COMMIT_SHA}/${CI_JOB_ID}.xcarchive"
# xcodebuild app_version_code=${buildNumber} app_version_name=${buildName} -workspace Splito.xcworkspace -scheme "Splito" clean archive -sdk iphoneos -archivePath $ARCHIVE_PATH | xcpretty --color
- name: Build and Archive Project
run: |
ARCHIVE_PATH=$RUNNER_TEMP/Splito.xcarchive
xcodebuild -workspace Splito.xcworkspace -scheme "Splito" -archivePath $ARCHIVE_PATH -destination generic/platform=iOS clean archive | xcpretty --color
# - name: Export Archive
# run: |
# EXPORT_PATH="$HOME/Library/Developer/Xcode/Archives/Splito/${CI_COMMIT_SHA}/${CI_JOB_ID}"
# xcodebuild -exportArchive -archivePath $ARCHIVE_PATH -exportPath $EXPORT_PATH -exportOptionsPlist ExportOptions.plist | xcpretty --color
- name: Export Archive
run: |
EXPORT_PATH=$RUNNER_TEMP/Splito/build
xcodebuild -exportArchive -archivePath $ARCHIVE_PATH -exportPath $EXPORT_PATH -exportOptionsPlist ExportOptions.plist | xcpretty --color
# - name: Store IPA
# run: |
# echo "Collecting artifacts.."
# cp -R "${ARCHIVE_PATH}/dSYMs" .
# IPA="${EXPORT_PATH}Splito.ipa"
# echo $IPA
- name: Store IPA
run: |
echo "Collecting artifacts.."
cp -R "$ARCHIVE_PATH/dSYMs" .
IPA="${EXPORT_PATH}Splito.ipa"
echo $IPA
# - name: Deploy to App Store Connect
# run: |
# rm -rf $ARCHIVE_PATH
# rm -rf $EXPORT_PATH
# echo "Uploading app to iTC..."
# xcrun altool --upload-app -t ios -f $IPA -u $ITC_USER_NAME -p $ITC_USER_PASSWORD
- name: Deploy to App Store Connect
env:
ITC_USER_NAME: ${{ secrets.ITC_USER_NAME }}
ITC_USER_PASSWORD: ${{ secrets.ITC_USER_PASSWORD }}
run: |
rm -rf $ARCHIVE_PATH
rm -rf $EXPORT_PATH
echo "Uploading app to iTC..."
xcrun altool --upload-app -t ios -f $IPA -u $ITC_USER_NAME -p $ITC_USER_PASSWORD
3 changes: 2 additions & 1 deletion .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ disabled_rules: # rule identifiers to exclude from running
- line_length
- large_tuple
- identifier_name
- function_body_length
- type_body_length
- function_body_length
- orphaned_doc_comment
- void_function_in_ternary

file_length:
Expand Down
3 changes: 2 additions & 1 deletion BaseStyle/.swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ disabled_rules: # rule identifiers to exclude from running
- force_cast
- line_length
- identifier_name
- function_body_length
- type_body_length
- function_body_length
- orphaned_doc_comment
- void_function_in_ternary

file_length:
Expand Down
30 changes: 23 additions & 7 deletions BaseStyle/BaseStyle.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@
/* Begin PBXBuildFile section */
5DAEE93D2D2208132D031984 /* Pods_BaseStyleTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4AFAF996FB5C233D40D81D5 /* Pods_BaseStyleTests.framework */; };
A40018A9B957803B8105BEA5 /* Pods_BaseStyle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 174198EE4AF2FC82DADEB060 /* Pods_BaseStyle.framework */; };
D8302D9C2B9EE1D2005ACA13 /* PrimaryFloatingButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8302D9B2B9EE1D2005ACA13 /* PrimaryFloatingButton.swift */; };
D887213F2B99992A009DC5BE /* LoaderViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D887213E2B99992A009DC5BE /* LoaderViewModel.swift */; };
D89DBE2D2B88828300E5F1BD /* Countries.json in Resources */ = {isa = PBXBuildFile; fileRef = D89DBE2C2B88828300E5F1BD /* Countries.json */; };
D89DBE312B8884E300E5F1BD /* SectionHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D89DBE302B8884E300E5F1BD /* SectionHeaderView.swift */; };
D89DBE332B888F2D00E5F1BD /* SearchBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = D89DBE322B888F2D00E5F1BD /* SearchBar.swift */; };
D89DBE352B88A05F00E5F1BD /* UIApplication+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D89DBE342B88A05F00E5F1BD /* UIApplication+Extension.swift */; };
D89DBE3C2B88AA1500E5F1BD /* CustomTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = D89DBE3B2B88AA1500E5F1BD /* CustomTextField.swift */; };
D89DBE3E2B8C67CE00E5F1BD /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D89DBE3D2B8C67CE00E5F1BD /* String+Extension.swift */; };
D8D14A502BA090F000F45FF2 /* ShareSheetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8D14A4F2BA090F000F45FF2 /* ShareSheetView.swift */; };
D8D42A462B85CC85009B345D /* BaseStyle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D8D42A3D2B85CC85009B345D /* BaseStyle.framework */; };
D8D42A4B2B85CC85009B345D /* BaseStyleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8D42A4A2B85CC85009B345D /* BaseStyleTests.swift */; };
D8D42A4C2B85CC85009B345D /* BaseStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = D8D42A402B85CC85009B345D /* BaseStyle.h */; settings = {ATTRIBUTES = (Public, ); }; };
Expand All @@ -33,7 +36,6 @@
D8D42A712B85CDD3009B345D /* Onboard.strings in Resources */ = {isa = PBXBuildFile; fileRef = D8D42A702B85CDD3009B345D /* Onboard.strings */; };
D8D42A732B85CDE0009B345D /* Login.strings in Resources */ = {isa = PBXBuildFile; fileRef = D8D42A722B85CDE0009B345D /* Login.strings */; };
D8D42A772B85CE2A009B345D /* ButtonStyleTapGestureModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8D42A762B85CE2A009B345D /* ButtonStyleTapGestureModifier.swift */; };
D8D42A7C2B85CFEC009B345D /* LoaderViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8D42A7B2B85CFEC009B345D /* LoaderViewModel.swift */; };
D8D42A812B85D07C009B345D /* SecondaryButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8D42A7D2B85D07C009B345D /* SecondaryButton.swift */; };
D8D42A822B85D07C009B345D /* PrimaryButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8D42A7E2B85D07C009B345D /* PrimaryButton.swift */; };
D8D42A832B85D07C009B345D /* View+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8D42A7F2B85D07C009B345D /* View+Extension.swift */; };
Expand Down Expand Up @@ -67,12 +69,15 @@
2CE85328C46B183FC3F074A3 /* Pods-BaseStyle.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BaseStyle.release.xcconfig"; path = "Target Support Files/Pods-BaseStyle/Pods-BaseStyle.release.xcconfig"; sourceTree = "<group>"; };
5BDB5B9B63CFD771230CD759 /* Pods-BaseStyleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BaseStyleTests.release.xcconfig"; path = "Target Support Files/Pods-BaseStyleTests/Pods-BaseStyleTests.release.xcconfig"; sourceTree = "<group>"; };
CC9EC1F1C0A5A0821118E6CA /* Pods-BaseStyleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BaseStyleTests.debug.xcconfig"; path = "Target Support Files/Pods-BaseStyleTests/Pods-BaseStyleTests.debug.xcconfig"; sourceTree = "<group>"; };
D8302D9B2B9EE1D2005ACA13 /* PrimaryFloatingButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PrimaryFloatingButton.swift; sourceTree = "<group>"; };
D887213E2B99992A009DC5BE /* LoaderViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = LoaderViewModel.swift; path = BaseStyle/Views/LoaderViewModel.swift; sourceTree = SOURCE_ROOT; };
D89DBE2C2B88828300E5F1BD /* Countries.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = Countries.json; sourceTree = "<group>"; };
D89DBE302B8884E300E5F1BD /* SectionHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SectionHeaderView.swift; sourceTree = "<group>"; };
D89DBE322B888F2D00E5F1BD /* SearchBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchBar.swift; sourceTree = "<group>"; };
D89DBE342B88A05F00E5F1BD /* UIApplication+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIApplication+Extension.swift"; sourceTree = "<group>"; };
D89DBE3B2B88AA1500E5F1BD /* CustomTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomTextField.swift; sourceTree = "<group>"; };
D89DBE3D2B8C67CE00E5F1BD /* String+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Extension.swift"; sourceTree = "<group>"; };
D8D14A4F2BA090F000F45FF2 /* ShareSheetView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareSheetView.swift; sourceTree = "<group>"; };
D8D42A3D2B85CC85009B345D /* BaseStyle.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BaseStyle.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D8D42A402B85CC85009B345D /* BaseStyle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BaseStyle.h; sourceTree = "<group>"; };
D8D42A452B85CC85009B345D /* BaseStyleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BaseStyleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
Expand All @@ -93,7 +98,6 @@
D8D42A722B85CDE0009B345D /* Login.strings */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; path = Login.strings; sourceTree = "<group>"; };
D8D42A762B85CE2A009B345D /* ButtonStyleTapGestureModifier.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ButtonStyleTapGestureModifier.swift; sourceTree = "<group>"; };
D8D42A782B85CE81009B345D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
D8D42A7B2B85CFEC009B345D /* LoaderViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = LoaderViewModel.swift; path = ../../../Data/Data/Model/LoaderViewModel.swift; sourceTree = "<group>"; };
D8D42A7D2B85D07C009B345D /* SecondaryButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SecondaryButton.swift; sourceTree = "<group>"; };
D8D42A7E2B85D07C009B345D /* PrimaryButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PrimaryButton.swift; sourceTree = "<group>"; };
D8D42A7F2B85D07C009B345D /* View+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "View+Extension.swift"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -156,6 +160,17 @@
name = Frameworks;
sourceTree = "<group>";
};
D8302D9A2B9EE1BF005ACA13 /* Buttons */ = {
isa = PBXGroup;
children = (
D8D42AAD2B872B27009B345D /* DismissButton.swift */,
D8D42A7E2B85D07C009B345D /* PrimaryButton.swift */,
D8D42A7D2B85D07C009B345D /* SecondaryButton.swift */,
D8302D9B2B9EE1D2005ACA13 /* PrimaryFloatingButton.swift */,
);
path = Buttons;
sourceTree = "<group>";
};
D8D42A332B85CC85009B345D = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -258,7 +273,6 @@
D8D42A982B870961009B345D /* AlertPrompt.swift */,
D8D42A9C2B870A5D009B345D /* ToastPrompt.swift */,
D8E244B42B972AD200C6C82A /* EmptyRouteView.swift */,
D8D42A7B2B85CFEC009B345D /* LoaderViewModel.swift */,
D89DBE302B8884E300E5F1BD /* SectionHeaderView.swift */,
);
path = Views;
Expand All @@ -267,6 +281,7 @@
D8D42A932B85F60C009B345D /* Helper */ = {
isa = PBXGroup;
children = (
D887213E2B99992A009DC5BE /* LoaderViewModel.swift */,
D8D42AA22B8715B4009B345D /* TopViewController.swift */,
);
path = Helper;
Expand All @@ -286,9 +301,8 @@
D8D42AAB2B872A7C009B345D /* ToastView.swift */,
D89DBE322B888F2D00E5F1BD /* SearchBar.swift */,
D8D42AAF2B872E44009B345D /* LoaderView.swift */,
D8D42AAD2B872B27009B345D /* DismissButton.swift */,
D8D42A7E2B85D07C009B345D /* PrimaryButton.swift */,
D8D42A7D2B85D07C009B345D /* SecondaryButton.swift */,
D8D14A4F2BA090F000F45FF2 /* ShareSheetView.swift */,
D8302D9A2B9EE1BF005ACA13 /* Buttons */,
D89DBE3B2B88AA1500E5F1BD /* CustomTextField.swift */,
D8E244C02B986CD800C6C82A /* ImagePickerView.swift */,
);
Expand Down Expand Up @@ -500,16 +514,18 @@
D89DBE3E2B8C67CE00E5F1BD /* String+Extension.swift in Sources */,
D8E244C32B986D4F00C6C82A /* UIImage+Extension.swift in Sources */,
D8D42A822B85D07C009B345D /* PrimaryButton.swift in Sources */,
D8D42A7C2B85CFEC009B345D /* LoaderViewModel.swift in Sources */,
D8D42A8A2B85D525009B345D /* AppColors.swift in Sources */,
D8D42AAC2B872A7C009B345D /* ToastView.swift in Sources */,
D8D42A952B85F8A2009B345D /* Bundle+Extension.swift in Sources */,
D8E244C12B986CD800C6C82A /* ImagePickerView.swift in Sources */,
D89DBE312B8884E300E5F1BD /* SectionHeaderView.swift in Sources */,
D8D42A862B85D08F009B345D /* Font+Extension.swift in Sources */,
D8D42A992B870961009B345D /* AlertPrompt.swift in Sources */,
D8302D9C2B9EE1D2005ACA13 /* PrimaryFloatingButton.swift in Sources */,
D887213F2B99992A009DC5BE /* LoaderViewModel.swift in Sources */,
D8D42AA32B8715B4009B345D /* TopViewController.swift in Sources */,
D89DBE332B888F2D00E5F1BD /* SearchBar.swift in Sources */,
D8D14A502BA090F000F45FF2 /* ShareSheetView.swift in Sources */,
D8E244B52B972AD200C6C82A /* EmptyRouteView.swift in Sources */,
D8D42A842B85D07C009B345D /* Spacers.swift in Sources */,
);
Expand Down
44 changes: 44 additions & 0 deletions BaseStyle/BaseStyle/CustomUI/Buttons/PrimaryFloatingButton.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
//
// PrimaryFloatingButton.swift
// BaseStyle
//
// Created by Amisha Italiya on 11/03/24.
//

import SwiftUI

public struct PrimaryFloatingButton: View {

private let text: String
private let bottomPadding: CGFloat
private let isEnabled: Bool
private let showLoader: Bool
private let onClick: (() -> Void)?

public init(text: String, bottomPadding: CGFloat = 24, isEnabled: Bool = true, showLoader: Bool = false, onClick: (() -> Void)? = nil) {
self.text = text
self.bottomPadding = bottomPadding
self.isEnabled = isEnabled
self.showLoader = showLoader
self.onClick = onClick
}

public var body: some View {
VStack(alignment: .center, spacing: 0) {
VSpacer(10)

PrimaryButton(text: text, isEnabled: !showLoader && isEnabled, showLoader: showLoader, onClick: onClick)
}
.padding(.horizontal, 16)
.padding(.bottom, bottomPadding)
.background(FloatingButtonGradientBackground())
}
}

public struct FloatingButtonGradientBackground: View {
public init() {}

public var body: some View {
LinearGradient(colors: [surfaceColor, surfaceColor, surfaceColor, surfaceColor, surfaceColor, surfaceColor.opacity(1), surfaceColor.opacity(0)], startPoint: .bottom, endPoint: .top)
}
}
Loading

0 comments on commit d26b02c

Please sign in to comment.