Skip to content

Instantly share code, notes, and snippets.

View amixpal's full-sized avatar

Amit Pal amixpal

  • RedEye Studio
  • Seattle
View GitHub Profile
@amixpal
amixpal / test
Created December 29, 2017 08:55
extension AppDelegate {
static func registerForNotification(application: UIApplication) {
if #available(iOS 10.0, *) {
let acceptAction = UNNotificationAction(identifier: acceptActionIdentifier, title: acceptTitle,
options: [.foreground])
UNUserNotificationCenter.current().setNotificationCategories([guideCategory, touristCategory, guideStartTourCategory, touristFinishCategory, touristCancelTourCategory, guideCancelTourCategory])
let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound]
UNUserNotificationCenter.current().requestAuthorization (
{
"success": true,
"data": [
{
"createdAt": 0,
"updatedAt": 0,
"updatedBy": 0,
"propertyChanged": null,
"ipAddress": null,
"objectId": {
{
"tourName": "newtest",
"tourDescription": "test te st ",
"tourTimeFrame" : {
"bookedStartTime": "19:50",
"bookedEndTime": "22:50",
"startingAvaliability": "19:50",
"closingAvaliability": "20:50",
"weekAvaliablity": ["1", "4", "5", "6"]
{
"data": {
"appointmentId": 154942872715504,
"clientName": "Amit Pal",
"distance": "8",
"sessionTime": "60",
"meetingStartTime": 989876667676,
"clientProfilePic": "https://platform-lookaside.fbsbx.com/platform/profilepic/?asid\u003d2403294049698346\u0026height\u003d200\u0026width\u003d200\u0026ext\u003d1551981645\u0026hash\u003dAeQ1OfjlEkBTLbeA",
"price": "84.0",
"eventName": "FitMe Bring the Pain Challenge",
{
"data": {
"appointmentId": 154947599698303,
"trainerName": "Dummy Data",
"trainerProfilePictureUrl": "https://platform-lookaside.fbsbx.com/platform/profilepic/?asid=2403294049698346&height=200&width=200&ext=1552068772&hash=AeTi2Fe4FkBhLayF",
"trainerDesignation": "Fitness Trainer",
"trainerId": 154660763461801,
"trainingId": 154623256565305,
"trainingName": "HIIT Workout Beginner"
},
//
// TemporaryViewController.swift
// Fitme
//
// Created by Paly on 5/29/19.
// Copyright © 2019 Paly. All rights reserved.
//
import UIKit
import RappleProgressHUD
{
"success": true,
"data": [{
"createdAt": 0,
"updatedAt": 1557426356536,
"updatedBy": 0,
"propertyChanged": "data changed",
"ipAddress": null,
"objectId": {
"timestamp": 1546232565,
@amixpal
amixpal / Timer
Created August 26, 2019 16:33
Sample Code
//
// NotificationOnGoingWorkoutViewController.swift
// Fitme
//
// Created by Paly on 6/27/19.
// Copyright © 2019 Heeral. All rights reserved.
//
import Foundation
import UIKit
//
// NotificationOnGoingWorkoutViewController.swift
// Fitme
//
// Created by Paly on 6/27/19.
// Copyright © 2019 RedEye. All rights reserved.
//
import Foundation
import UIKit
@amixpal
amixpal / .swift
Created August 26, 2019 16:36
ChooseTime and Date
//
// WeeklyChooseTimeAndDateViewController.swift
// Fitme
//
// Created by paly on 8/7/19.
// Copyright © 2019 RedEye. All rights reserved.
//
import Foundation
import UIKit