Skip to content

Instantly share code, notes, and snippets.

@digitaljerry
digitaljerry / CrashlyticsDestination.swift
Last active April 17, 2019 14:29
SwiftyBeaver destination used to log info warning and error traces using Crashlytics Raw
public class CrashlyticsDestination: BaseDestination {
open override func send(_ level: SwiftyBeaver.Level, msg traceMessage: String, thread traceThread: String, file traceFile: String,
function traceFunction: String, line traceLine: Int, context _: Any? = nil) -> String? {
if level.rawValue >= SwiftyBeaver.Level.info.rawValue {
let userInfo: [String: Any] = [
"Level": level.rawValue,
"Msg": traceMessage,
"File": traceFile,
"Function": traceFunction,
"Line": traceLine
@digitaljerry
digitaljerry / gist:a9e56d409e5e93d1fcafe8d66f0b98de
Created October 9, 2018 12:42
Frozen frame. Doesn't recover. iPhone 6
objc[1923]: Class SFAnalytics is implemented in both /System/Library/Frameworks/Security.framework/Security (0x225ff6ef0) and /var/containers/Bundle/Application/1DCADA3A-A4CA-41E3-B9A9-B97EB506C13B/arena.app/arena (0x101f45e40). One of the two will be used. Which one is undefined.
2018-10-09 14:38:33.949133+0200 arena[1923:650286] [DYMTLInitPlatform] platform initialization successful
2018-10-09 14:38:34.276650+0200 arena[1923:650093] You've implemented -[<UIApplicationDelegate> application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist.
2018-10-09 14:38:34.382982+0200 arena[1923:650093] [HockeySDK] -[BITCrashManager startManager]_block_invoke/1199 [HockeySDK] WARNING: Detecting crashes is NOT enabled due to running the app with a debugger attached.
2018-10-09 14:38:34.519284+0200 arena[1923:650281] *** LOG LEVELS: ***
2018-10-09 14:38:34.523023+0200 arena[1923:650309] * Error *
2018-10-0
@digitaljerry
digitaljerry / gist:7136cff8af7452b36d0686b446c3b890
Last active October 3, 2018 10:13
iPhone 6 iOS 12 - Read comment bellow 👇
objc[2701]: Class SFAnalytics is implemented in both /System/Library/Frameworks/Security.framework/Security (0x211c5eef0) and /var/containers/Bundle/Application/902858F3-2B2A-4ABD-914B-4982AE75E390/arena.app/arena (0x1025115c8). One of the two will be used. Which one is undefined.
2018-10-03 12:09:15.822802+0200 arena[2701:710747] [DYMTLInitPlatform] platform initialization successful
2018-10-03 12:09:16.305413+0200 arena[2701:710599] You've implemented -[<UIApplicationDelegate> application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist.
2018-10-03 12:09:16.451197+0200 arena[2701:710599] [HockeySDK] -[BITCrashManager startManager]_block_invoke/1199 [HockeySDK] WARNING: Detecting crashes is NOT enabled due to running the app with a debugger attached.
2018-10-03 12:09:16.555991+0200 arena[2701:710734] *** LOG LEVELS: ***
2018-10-03 12:09:16.571826+0200 arena[2701:710766] * Error *
2018-10-0
objc[2701]: Class SFAnalytics is implemented in both /System/Library/Frameworks/Security.framework/Security (0x211c5eef0) and /var/containers/Bundle/Application/902858F3-2B2A-4ABD-914B-4982AE75E390/arena.app/arena (0x1025115c8). One of the two will be used. Which one is undefined.
2018-10-03 12:09:15.822802+0200 arena[2701:710747] [DYMTLInitPlatform] platform initialization successful
2018-10-03 12:09:16.305413+0200 arena[2701:710599] You've implemented -[<UIApplicationDelegate> application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist.
2018-10-03 12:09:16.451197+0200 arena[2701:710599] [HockeySDK] -[BITCrashManager startManager]_block_invoke/1199 [HockeySDK] WARNING: Detecting crashes is NOT enabled due to running the app with a debugger attached.
2018-10-03 12:09:16.555991+0200 arena[2701:710734] *** LOG LEVELS: ***
2018-10-03 12:09:16.571826+0200 arena[2701:710766] * Error *
2018-10-0
@digitaljerry
digitaljerry / gist:d9511d1cd7ae56403acfe72f093b89a5
Created July 2, 2018 13:20
Appboy initilization in `application:didFinishLaunchingWithOptions:`
#pragma mark - Appboy
- (void)setupAppboyWithApplication:(UIApplication *)application launchingOptions:(NSDictionary *)launchOptions {
NSString *token = [[SFMainController shared] appTokenForKey:LAppboyToken];
if ([token isEqualToString:@""]) {
return;
}
NSMutableDictionary *appboyOptions = [NSMutableDictionary dictionary];
@digitaljerry
digitaljerry / gist:3fa5c8ad8d5bf4bc9094
Created December 5, 2014 13:14
Country Code From Carrier
+ (NSString *)getCountryCodeFromCarrier
{
if (NSClassFromString(@"CTTelephonyNetworkInfo") != nil)
{
CTTelephonyNetworkInfo *network_Info = [CTTelephonyNetworkInfo new];
CTCarrier *carrier = network_Info.subscriberCellularProvider;
NSLog(@"country code is: %@", carrier.mobileCountryCode);
return carrier.isoCountryCode;
@digitaljerry
digitaljerry / app.js
Created February 10, 2012 23:17 — forked from dawsontoth/app.js
CSS Injection on External Websites using Appcelerator Titanium
// create our web view
var win = Ti.UI.createWindow({ backgroundColor: "#fff" });
var web = Ti.UI.createWebView({ url: "http://chicago.craigslist.org/" });
// inject our css when the web view finishes loading (because we need to inject into the head element)
web.addEventListener('load', function () {
// first, specify the CSS file that we should load
var cssFileName = 'styles.css';
// read in the contents
var cssFromFile = Ti.Filesystem.getFile(cssFileName);