Skip to content

Instantly share code, notes, and snippets.

View yunustek's full-sized avatar
🏠
Working from home

Yunus Tek yunustek

🏠
Working from home
View GitHub Profile
@yunustek
yunustek / PushNotificationApsDictionaryWithImage.json
Created December 5, 2018 11:59
PushNotificationApsDictionaryWithImage
{
"aps" : {
"alert" : {
"title" : "Test Title Message",
"body" : "Yunus TEK"
},
"badge" : 1,
"sound": "default",
"mutable-content":1
@yunustek
yunustek / PushNotificationApsDictionary.json
Last active December 5, 2018 11:44
PushNotificationApsDictionary.json
{
"aps" : {
"alert" : {
"title" : "Test Title Message",
"body" : "Yunus TEK"
},
"badge" : 1,
"sound": "default"
}
}
@yunustek
yunustek / NotificationService.Swift
Last active December 5, 2018 11:26
NotificationService.Swift
import UserNotifications
class NotificationService: UNNotificationServiceExtension {
var contentHandler: ((UNNotificationContent) -> Void)?
var bestAttemptContent: UNMutableNotificationContent?
override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) {
self.contentHandler = contentHandler
bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent)
@yunustek
yunustek / phoneNumberMaskPatern.txt
Created October 15, 2018 06:41
NSStringMask Mask Patern for Phone Number
// NSStringMask Mask Patern for Phone Number Format String
// - --- --- -- --
(\d{1}) (\d{3}) (\d{3}) (\d{2}) (\d{2})
// NSStringMask Mask Patern for Phone Number Format String
// - (---) --- -- --
(\d{1}) \((\d{3})\) (\d{3}) (\d{2}) (\d{2})
@yunustek
yunustek / InstallAppium.txt
Created October 15, 2018 06:33
Install Appium
Install Appium
1. brew install node
2. npm install
3. npm install -g appium
4. npm install -g appium-doctor
5. npm install wd
6. brew install libimobiledevice --HEAD
7. brew install ideviceinstaller
8. npm install -g ios-deploy
9. sudo gem install xcpretty
EarlGrey.select(elementWithMatcher: grey_accessibilityID("Username")).perform(grey_typeText("<Text>"))
EarlGrey.select(elementWithMatcher: grey_accessibilityID("Add")).perform(grey_tap())
EarlGrey.select(elementWithMatcher: grey_text("Welcome"))
func testExample() {
EarlGrey.selectElement(with: grey_keyWindow())
.assert(grey_sufficientlyVisible())
}
import EarlGrey
class MyFirstEarlGreyTest: XCTestCase {
func testExample() {
// Test aksiyonlarınız burada olacak
}
}