Skip to content

Commit e57077e

Browse files
committed
updated source code
1 parent 55053f2 commit e57077e

File tree

38 files changed

+276
-294
lines changed

38 files changed

+276
-294
lines changed

Retail-app/ios/AppShowcase.xcodeproj/project.pbxproj

Lines changed: 66 additions & 24 deletions
Large diffs are not rendered by default.

Retail-app/ios/AppShowcase.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist renamed to Retail-app/ios/AppShowcase.xcodeproj/xcuserdata/peak.xcuserdatad/xcschemes/xcschememanagement.plist

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5-
<key>IDEDidComputeMac32BitWarning</key>
6-
<true/>
5+
<key>SchemeUserState</key>
6+
<dict>
7+
<key>AppShowcase.xcscheme_^#shared#^_</key>
8+
<dict>
9+
<key>orderHint</key>
10+
<integer>9</integer>
11+
</dict>
12+
</dict>
713
</dict>
814
</plist>

Retail-app/ios/AppShowcase.xcworkspace/contents.xcworkspacedata

Lines changed: 0 additions & 10 deletions
This file was deleted.

Retail-app/ios/AppShowcase.xcworkspace/xcuserdata/brianchristo.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

Lines changed: 0 additions & 24 deletions
This file was deleted.

Retail-app/ios/AppShowcase/Authentication.storyboard

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Y6W-OH-hqX">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19162" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
33
<device id="retina5_5" orientation="portrait" appearance="light"/>
44
<dependencies>
55
<deployment identifier="iOS"/>
6-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19144"/>
77
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
88
<capability name="System colors in document resources" minToolsVersion="11.0"/>
99
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>

Retail-app/ios/AppShowcase/Common/AppConfig.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import UIKit
88
class AppConfig: NSObject {
99
/** Credentials of frameworks and features used in the app. */
1010
struct Credentials {
11-
static let realmAppId = "comcastrealm-grptn"
12-
static let googlePlacesApiKey = "AIzaSyCoPvfa6m03JI4YtP6kWORfB0QE1UMHDwU"
11+
static let realmAppId = "phase-2-sandbox-vikjc"
12+
static let googlePlacesApiKey = "AIzaSyBs-rAtQ3K8uRX4mO269a1VAH6zbXg_1f4"//"AIzaSyCoPvfa6m03JI4YtP6kWORfB0QE1UMHDwU"
1313
}
14-
}
14+
}
1515

Retail-app/ios/AppShowcase/Common/Constants.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ struct Defaults {
6767
/// List of all Storyboards used in the app.
6868
struct Storyboards {
6969
static let launchScreen = "LaunchScreen"
70-
static let deliveryUser = "DeliveryUser"
71-
static let storeAdmin = "StoreAdmin"
70+
static let main = "Main"
71+
static let storeAdmin = "HomePageForAdmin"
7272
static let authentication = "Authentication"
7373
}
7474

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//
2+
// ButtonExtension.swift
3+
// AppShowcase
4+
//
5+
// Created by Karthick TM on 27/01/22.
6+
//
7+
8+
import Foundation
9+
import UIKit
10+
11+
func storyBoardMove (storyBoardName : String, storyBoardID : String, vcSender: UIViewController) {
12+
13+
let vc = UIStoryboard.init(name: storyBoardName, bundle: Bundle.main).instantiateViewController(withIdentifier: storyBoardID)
14+
vcSender.navigationController?.pushViewController(vc, animated: true)
15+
}
16+

Retail-app/ios/AppShowcase/Common/Extensions/ViewControllerExtension.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import UIKit
1010

1111
extension UIViewController {
1212

13-
/// To push view controller using storyboard id
13+
/// To puus view controller using storyboard id
1414
/// - Parameters:
1515
/// - storyboardId: storyboard id of te viewcontroller to be pushed
1616
/// - storyboardName: name of the storyboard that cointains the pushed view controller

Retail-app/ios/AppShowcase/Common/Services/Router.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ import UIKit
1010

1111
class Router {
1212
/**
13-
To get viewcontrollers from deliveryUser storyboard
14-
- get viewcontrollers from deliveryUser storyboard using their storyboard IDs
13+
To get viewcontrollers from Main storyboard
14+
- get viewcontrollers from main storyboard using their storyboard IDs
1515
- Parameter storyboardId: Storyboard ID of the requested viewcontroller
1616
- returns: the requested viewcontroller in it's file type
1717
*/
18-
static func getVCFromDeliveryUserStoryboard(withId storyboardId: String) -> Any {
19-
return self.getVC(withId: storyboardId, fromStoryboard: Storyboards.deliveryUser)
18+
static func getVCFromMainStoryboard(withId storyboardId: String) -> Any {
19+
return self.getVC(withId: storyboardId, fromStoryboard: Storyboards.main)
2020
}
2121
/**
2222
To get viewcontrollers from storeAdmin storyboard
@@ -43,7 +43,7 @@ class Router {
4343
/// - If already authenticated, will get inside app
4444
/// - Else will be taken to authentication screen
4545
static func setRootViewController() {
46-
// if realm user is logged in and user role available, goto corresponding user's home. Else goto login
46+
// if realm u=user is logged in and user role available, goto corresponding user's home. Else goto login
4747
if RealmManager.shared.app.currentUser?.isLoggedIn == true {
4848
let userRole = UserDefaults.standard.value(forKey: Defaults.userRole)
4949
if userRole as? String != "" && userRole != nil {
@@ -71,7 +71,7 @@ class Router {
7171
} else {
7272
// goto Delivery user home
7373
DispatchQueue.main.async {
74-
let viewC = Router.getVCFromDeliveryUserStoryboard(withId: "DeliveryHomeNav") as! UINavigationController
74+
let viewC = Router.getVCFromMainStoryboard(withId: "DeliveryHomeNav") as! UINavigationController
7575
sceneDelegate.window?.rootViewController = viewC
7676
return
7777
}
@@ -88,7 +88,7 @@ class Router {
8888

8989
static func gotoLogin() {
9090
DispatchQueue.main.async {
91-
let viewC = Router.getVCFromDeliveryUserStoryboard(withId: "LoginNavController") as! UINavigationController
91+
let viewC = Router.getVCFromMainStoryboard(withId: "LoginNavController") as! UINavigationController
9292
sceneDelegate.window?.rootViewController = viewC
9393
}
9494
}

Retail-app/ios/AppShowcase/StoreAdmin.storyboard renamed to Retail-app/ios/AppShowcase/HomePageForAdmin.storyboard

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="xFS-Z0-ZgE">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19162" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="xFS-Z0-ZgE">
33
<device id="retina6_1" orientation="portrait" appearance="light"/>
44
<dependencies>
55
<deployment identifier="iOS"/>
6-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19144"/>
77
<capability name="Named colors" minToolsVersion="9.0"/>
88
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
99
<capability name="System colors in document resources" minToolsVersion="11.0"/>
@@ -310,29 +310,23 @@
310310
<nil key="highlightedColor"/>
311311
</label>
312312
</subviews>
313-
<constraints>
314-
<constraint firstAttribute="height" constant="18" id="0Q7-C1-xaL"/>
315-
</constraints>
316313
</stackView>
317314
</subviews>
318-
<constraints>
319-
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="84" id="61N-Hk-hFY"/>
320-
</constraints>
321315
</stackView>
322316
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6t0-Zs-Uvj">
323-
<rect key="frame" x="0.0" y="415" width="414" height="86.5"/>
317+
<rect key="frame" x="0.0" y="415" width="414" height="88.5"/>
324318
<subviews>
325319
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Description" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Sac-NL-40n">
326-
<rect key="frame" x="30" y="20" width="81.5" height="18"/>
320+
<rect key="frame" x="30" y="20" width="81.5" height="20"/>
327321
<constraints>
328-
<constraint firstAttribute="height" constant="18" id="CL6-FR-qZx"/>
322+
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="18" id="CL6-FR-qZx"/>
329323
</constraints>
330324
<fontDescription key="fontDescription" name="Poppins-SemiBold" family="Poppins" pointSize="14"/>
331325
<nil key="textColor"/>
332326
<nil key="highlightedColor"/>
333327
</label>
334328
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Product" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mcU-8E-aeb">
335-
<rect key="frame" x="30" y="48" width="50.5" height="18.5"/>
329+
<rect key="frame" x="30" y="50" width="50.5" height="18.5"/>
336330
<constraints>
337331
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="18" id="ZTd-T0-PnP"/>
338332
</constraints>
@@ -353,7 +347,7 @@
353347
</constraints>
354348
</view>
355349
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Zf0-Yz-DX8">
356-
<rect key="frame" x="0.0" y="501.5" width="414" height="137"/>
350+
<rect key="frame" x="0.0" y="503.5" width="414" height="137"/>
357351
<subviews>
358352
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Edit Stock" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LU8-YE-46Z">
359353
<rect key="frame" x="30" y="20" width="69.5" height="22"/>

Retail-app/ios/AppShowcase/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
<key>UISceneDelegateClassName</key>
5959
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
6060
<key>UISceneStoryboardFile</key>
61-
<string>DeliveryUser</string>
61+
<string>Main</string>
6262
</dict>
6363
</array>
6464
</dict>
@@ -68,7 +68,7 @@
6868
<key>UILaunchStoryboardName</key>
6969
<string>LaunchScreen</string>
7070
<key>UIMainStoryboardFile</key>
71-
<string>DeliveryUser</string>
71+
<string>Main</string>
7272
<key>UIRequiredDeviceCapabilities</key>
7373
<array>
7474
<string>armv7</string>

0 commit comments

Comments
 (0)