This file contains 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
// Example functions | |
$scope.itemOnLongPress = function(id) { | |
console.log('Long press'); | |
} |
This file contains 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
+ (NSString*)decodeHTMLCharacters:(NSString*)sampleUnFormatterString{ | |
if (sampleUnFormatterString == nil || sampleUnFormatterString.length == 0) { | |
return sampleUnFormatterString; | |
} | |
NSString *sampleUnFormatterStringCopy =sampleUnFormatterString; | |
NSString *regString = [[NSString alloc]initWithFormat:@"&#[0123456789]{2,4};"]; | |
NSError *error=nil; | |
NSRegularExpression *regex = [NSRegularExpression | |
regularExpressionWithPattern:regString | |
options:0 |
This file contains 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
#!/bin/bash | |
# Copyright 2015 The WebRTC project authors. All Rights Reserved. | |
# | |
# Use of this source code is governed by a BSD-style license | |
# that can be found in the LICENSE file in the root of the source | |
# tree. An additional intellectual property rights grant can be found | |
# in the file PATENTS. All contributing project authors may | |
# be found in the AUTHORS file in the root of the source tree. |
This file contains 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 UserNotifications | |
if #available(iOS 10.0, *) { | |
//iOS 10.0 and greater | |
UNUserNotificationCenter.current().delegate = self | |
UNUserNotificationCenter.current().requestAuthorization(options: [.badge, .sound, .alert], completionHandler: { granted, error in | |
DispatchQueue.main.async { | |
if granted { | |
UIApplication.shared.registerForRemoteNotifications() | |
} |
This file contains 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
Below is a common error when trying to setup CI/CD using fastlane or raw XcodeBuild/Xcrun command | |
"error: exportArchive: No "iOS In House" profiles for team" or error: exportArchive: No "adhoc In House" profiles for team | |
Fixing it : | |
1) Easiest way is to make a build archive in Xcode, Export using organizer and Saving it in a folder. | |
2) Go to the folder, open Export Options.plist and replicate the same in Fastlane - build_app or gym - export options | |
3) In case of XcodeBuild - Replace the same in Export Options.plist which is provided in XCodeBuild command and try again | |
4) Make a build, thank me . |
This file contains 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
^(?:(?:\+|0{0,2})91(\s*[\ -]\s*)?|[0]?)?[6789]\d{9}|(?:\+)(\d[ -]?){10,12}\d$ | |
//Works for below number formats | |
//+91 1800 102 4455 | |
//+91 77238 39007 | |
//+91 124-5174055 | |
//07723839007 |
This file contains 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
const appendRandomStringToKeys = (obj, randomString) => { | |
const isObject = (val) => typeof val === 'object' && !Array.isArray(val) && val !== null; | |
Object.keys(obj).forEach((key) => { | |
if (key !== '_typename' && key !== 'Instrumentquery') { | |
const newKey = key + randomString; | |
obj[newKey] = obj[key]; | |
delete obj[key]; | |
if (isObject(obj[newKey])) { | |
appendRandomStringToKeys(obj[newKey], randomString); |