Skip to content

Instantly share code, notes, and snippets.

View moduscreate's full-sized avatar

Modus Create moduscreate

View GitHub Profile
Incident Identifier: C37C32FE-4882-4513-AF62-21C50A30E046
CrashReporter Key: 6ce80b42c44c2efed66e4a55a15aedf408567960
Hardware Model: iPhone7,2
OS Version: iPhone OS 8.3 (12F70)
Kernel version: Darwin Kernel Version 14.0.0: Sun Mar 29 19:42:54 PDT 2015; root:xnu-2784.20.34~2/RELEASE_ARM64_T7000
Date: 2015-06-10 03:56:31 -0400
Exception Code: 0xd1510c8d
Reason: Step count has rolled back!!
Thermal data unavailable
Incident Identifier: 1B1E49D6-35B2-475A-B588-242E6076BDB2
CrashReporter Key: 6ce80b42c44c2efed66e4a55a15aedf408567960
Hardware Model: iPhone7,2
OS Version: iPhone OS 8.3 (12F70)
Kernel version: Darwin Kernel Version 14.0.0: Sun Mar 29 19:42:54 PDT 2015; root:xnu-2784.20.34~2/RELEASE_ARM64_T7000
Date: 2015-06-10 03:56:32 -0400
Exception Code: 0xd1510c8d
Reason: Step count has rolled back!!
Thermal data unavailable
//
// main.m
// json_formatter
//
// Created by Jesus Garcia on 3/29/15.
// Copyright (c) 2015 Jesus Garcia. All rights reserved.
//
#import <Foundation/Foundation.h>
'use strict';
var React = require('react-native');
var {
AppRegistry,
StyleSheet,
Text,
TextInput,
View,
TouchableHighlight
// Error Condition handling
if (writeError) {
// Craft a failure message
NSDictionary *resultsDict = @{
@"success" : @NO,
@"errMsg" : [writeError localizedDescription]
};
// Execute the JavaScript failure callback handler
failureCallback(@[resultsDict]);
#import "MCFileWriterUtil.h"
@implementation MCFileWriterUtil
RCT_EXPORT_MODULE()
// Expose our method signature to JavaScript :: Persist data
RCT_EXPORT_METHOD(writeFile:(NSString *)fileName
var {
MCFileWriterUtil
} = require('NativeModules');
// Step #1
MCFileWriterUtil.writeFile(
'MyFile.txt', // File name
'Some Text', // File contents
function errorCallback(results) {
alert('Error: ' + results);
#import "MCFileWriterUtil.h"
@implementation MCFileWriterUtil
// Expose this module to the React Native bridge
RCT_EXPORT_MODULE()
// Persist data
RCT_EXPORT_METHOD(writeFile:(NSString *)fileName
withContents:(NSString *)contents
#import "RCTBridge.h"
@interface MCFileWriterUtil : NSObject <RCTBridgeModule>
@end
This file has been truncated, but you can view the full file.
/* eslint global-strict:0 */
__DEV__ = true;
/* eslint global-strict:0,eqeqeq:0,no-bitwise:0,no-undef:0 */
(function(global) {
// avoid redefining require()
if (global.require) {
return;
}