Skip to content

Instantly share code, notes, and snippets.

View braandl's full-sized avatar
🌴
On vacation

Stephan braandl

🌴
On vacation
View GitHub Profile
@braandl
braandl / AppDelegate.m
Created June 7, 2021 13:27
Fix for push-notification-ios Bug that iOS can not retrieve the initially send notification
#import "AppDelegate.h"
#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTLinkingManager.h>
#import <RNCPushNotificationIOS/RCTConvert+Notification.h>
@implementation AppDelegate {
__weak UILocalNotification * initialNotificationPlaceholder;
@braandl
braandl / detect-ipados.js
Last active July 21, 2023 07:50
Detect iPad OS (v 13) with Javascript
var isIPadOs = window.AuthenticatorAssertionResponse === undefined
&& window.AuthenticatorAttestationResponse === undefined
&& window.AuthenticatorResponse === undefined
&& window.Credential === undefined
&& window.CredentialsContainer === undefined
&& window.DeviceMotionEvent !== undefined
&& window.DeviceOrientationEvent !== undefined
&& navigator.maxTouchPoints === 5
&& navigator.plugins.length === 0
&& navigator.platform !== "iPhone";