Skip to content

Instantly share code, notes, and snippets.

View anas-p's full-sized avatar
🎯
Focusing

Anas Poovalloor anas-p

🎯
Focusing
View GitHub Profile
@hfossli
hfossli / SHA256-Bridging-Header.h
Last active July 28, 2024 09:34
AES 256 in swift 4 with CommonCrypto
#import <CommonCrypto/CommonCrypto.h>
@Saraavana
Saraavana / RegisterGenericCell.swift
Last active May 15, 2017 07:05
It is an extension that registers and returns the UITableViewCell and UICollectionViewCell
//Note: The Nib Name and the identifier should be the same.
extension UITableView
{
func dequeue<T>(_ identifier :String, _ OfClass :T.Type) -> T
{
var cell = self.dequeueReusableCell(withIdentifier: identifier) as? T
if cell == nil
{
self.register(UINib(nibName: identifier, bundle: nil), forCellReuseIdentifier: identifier)
@steipete
steipete / ios-xcode-device-support.sh
Last active May 11, 2025 13:30
Using iOS 15 devices with Xcode 12.5 (instead of Xcode 13)
# The trick is to link the DeviceSupport folder from the beta to the stable version.
# sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :)
# Support iOS 15 devices (Xcode 13.0) with Xcode 12.5:
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
# Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions
# (A similar approach works for older versions too, just change the version number after DeviceSupport)