This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import UIKit | |
| protocol Coordinator { | |
| var navigationController: UINavigationController? { get set } | |
| // config funcs | |
| func setNavControler(_ navCtrl: UINavigationController) -> Self | |
| func start() | |
| // display funcs | |
| func show(view: AppScreen) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import FirebaseAnalytics | |
| import Crashlytics | |
| enum AnalyticsEvent { | |
| case materialDetails(matName: String?, matNumber: String?) | |
| case addMaterialInTab(tabName: String) | |
| case tabPressed(tabName: String) | |
| case sendOrder(agentCode: String?, customerNumber: String?, totalAmount: NSNumber?, userCurrency: String?, itemsQty: Int?) | |
| case loggedUserInfo(customerNumber: String?, contactEmail: String?, userMobile: String?) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FeedItem postItem = new FeedItem(); | |
| postItem.ParentId = 'SOME_TEST_ID'; | |
| postItem.Type = 'TextPost'; | |
| postItem.Title = 'Hello World! '; | |
| postItem.Body = 'This is my test'; | |
| insert postItem; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function openPage(url) { | |
| window.setTimeout(function () { | |
| openWindow(url); | |
| } ,500); | |
| } | |
| function openWindow(url) { | |
| var tab = window.open(url); | |
| if (!url.location.pathname.includes('pdf')){ | |
| setTimeout(function () { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func showMessageResetApp(){ | |
| let exitAppAlert = UIAlertController(title: "Restart is needed", | |
| message: "We need to restart the app on your first login to the app.\n Please reopen the app after this.", | |
| preferredStyle: .alert) | |
| let resetApp = UIAlertAction(title: "Close Now", style: .destructive) { | |
| (alert) -> Void in | |
| // home button pressed programmatically - to thorw app to background | |
| UIControl().sendAction(#selector(URLSessionTask.suspend), to: UIApplication.shared, for: nil) | |
| // terminaing app in background |