Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@PJayRushton
PJayRushton / APNS Credential update to Twilio.md
Last active February 24, 2023 21:41
Updating an APNS Credential about to expire in Twilio

Updating Push Certs to Twilio

  1. First of all, Twilio has a great reference here
  2. And the SO article here is also a greate reference

My Version:

Generate a certificate

  1. Go to Apple Dev certs here
  2. Identifiers -> Find identifier in question
  3. Find the correct identifier (prod or stage)
  4. Push Notification capabiity
@PJayRushton
PJayRushton / TextRecognitionEngine.swift
Last active June 30, 2021 05:10
iOS 13 Vision Swift Text Detection
import Foundation
import Vision
import VisionKit
@available(iOS 13.0, *)
class TextRecognitionEngine {
private var requests = [VNRequest]()
private let textRecognitionWorkQueue = DispatchQueue(label: "TextRecognitionQueue", qos: .userInitiated, attributes: [], autoreleaseFrequency: .workItem)
private var resultingText = ""
@PJayRushton
PJayRushton / gist:2ca9a4b008280cca5cd7782127f8fe89
Created February 23, 2017 16:07 — forked from zetachang/gist:4111314
Instruction on adding a Acknowledgements Settings.bundle
  • To add Settings.bundle in Xcode. Command N and in Resource, choose Settings Bundle .
  • Open Root.plist in source code, paste the code below to replace it,
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>PreferenceSpecifiers</key>
	
@PJayRushton
PJayRushton / StackViewDemo.md
Last active July 7, 2017 13:45
UIStackView demo

UIStackViews Demo

Initial setup

  1. Start a blank, single view application
  2. Add a UIStackView to the main view controller with 4 UIView subviews.
    • Set the stack views properties as follows:
      • Axis: Horizontal
      • Alignment: Fill
      • Distribution: FillEqually
      • Spacing: Whatever u want (But don't go crazy)
  • Set different background colors for each UIView
@PJayRushton
PJayRushton / iOS Interview questions.md
Last active September 14, 2016 14:11
Some iOS interview questions I've come accross

##iOS interview questions ###UIKit

  1. Walk me through setting up a table view.
  2. What is the difference between a UITableViewController and a UIViewController with a table view? When would you use one over the other?
  3. Briefly explain the view controller lifecycle.
  4. What does an application's AppDelegate subclass? By default, what protocol does it implement? Name some of those delegate functions?
  5. What is your favorite UIKit API?
  6. What type of UICollectionView layouts have you used?
  7. Have you ever written your own custom control? What was it? Why did you need to use that instead of a standard one?
  8. Name something you could present in a UIViewController that is not a subclass of UIView.