Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@sghiassy
sghiassy / gist.txt
Created October 16, 2014 22:02
hello extension!
Hmm, Internets down at my house. Going to head to the library then. Should be online in 20ish mins
Standup status: Get Services architecture PR merged. Integrate Automator and Services ugh
@sghiassy
sghiassy / gist.txt
Created October 16, 2014 22:26
hello extension!
93454
No - 69054
@sghiassy
sghiassy / gist.txt
Created October 16, 2014 22:29
hello extension!
First part
Second Addition
JSValueRef result = JSEvaluateScript(strongSelf->_context.ctx, execJSString, NULL, NULL, 0, &jsError);
10:48:33.378 'JS->N : RCTTiming.createTimer([1,1,1439920113377,false])'
10:48:33.389 'JS->N : RCTAsyncLocalStorage.multiGet([["__DEV_WARNINGS_IGNORED"],1])'
10:48:33.391 'JS->N : RCTAppState.getCurrentAppState([2,3])'
10:48:33.397 'N->JS : RCTDeviceEventEmitter.emit(["reachabilityDidChange",{"network_reachability":"wifi"}])'
10:48:33.397 'N->JS : RCTDeviceEventEmitter.emit(["appStateDidChange",{"app_state":"active"}])'
10:48:33.398 'N->JS : JSTimersExecution.callTimers([[1]])'
10:48:33.414 'N->JS : <callback for RCTAsyncLocalStorage.multiGet>([null,[["__DEV_WARNINGS_IGNORED",null]]])'
10:48:33.414 'N->JS : <callback for RCTAppState.getCurrentAppState>([{"app_state":"active"}])'
10:48:33.414 'N->JS : AppRegistry.runApplication(["AwesomeProject",{"rootTag":1,"initialProps":{}}])'
10:48:33.415 'Running application "AwesomeProject" with appParams: {"rootTag":1,"initialProps":{}}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF'
RCTUIManager.createView([2,"RCTView",1,{"position":"absolute","left":0,"top":0,"right":0,"bottom":0}])'
RCTUIManager.createView([3,"RCTView",1,{"position":"absolute","left":0,"top":0,"right":0,"bottom":0}])'
RCTUIManager.createView([4,"RCTView",1,{"flex":1,"justifyContent":"center","alignItems":"center","backgroundColor":"#F5FCFF"}])'
RCTUIManager.createView([5,"RCTText",1,{"accessible":true,"isHighlighted":false,"fontSize":20,"textAlign":"center","margin":10}])'
RCTUIManager.createView([6,"RCTRawText",1,{"text":"Welcome to React Native!"}])'
RCTUIManager.createView([7,"RCTText",1,{"accessible":true,"isHighlighted":false,"textAlign":"center","color":"#333333","marginBottom":5}])'
RCTUIManager.createView([8,"RCTRawText",1,{"text":"To get started, edit index.ios.js"}])'
RCTUIManager.createView([9,"RCTText",1,{"accessible":true,"isHighlighted":false,"textAlign":"center","color":"#333333","marginBottom":5}])'
RCTUIManager.createView([10,"RCTRawText",1,{"text":"Press Cmd+R to reload,"}])'
RCTUIManager.createView([
10:48:33.418 'JS->N : RCTUIManager.createView([2,"RCTView",1,{"position":"absolute","left":0,"top":0,"right":0,"bottom":0}])'
10:48:33.420 'JS->N : RCTUIManager.createView([3,"RCTView",1,{"position":"absolute","left":0,"top":0,"right":0,"bottom":0}])'
10:48:33.421 'JS->N : RCTUIManager.createView([4,"RCTView",1,{"flex":1,"justifyContent":"center","alignItems":"center","backgroundColor":"#F5FCFF"}])'
10:48:33.422 'JS->N : RCTUIManager.createView([5,"RCTText",1,{"accessible":true,"isHighlighted":false,"fontSize":20,"textAlign":"center","margin":10}])'
10:48:33.422 'JS->N : RCTUIManager.createView([6,"RCTRawText",1,{"text":"Welcome to React Native!"}])'
10:48:33.422 'JS->N : RCTUIManager.manageChildren([5,null,null,[6],[0],null])'
10:48:33.423 'JS->N : RCTUIManager.createView([7,"RCTText",1,{"accessible":true,"isHighlighted":false,"textAlign":"center","color":"#333333","marginBottom":5}])'
10:48:33.423 'JS->N : RCTUIManager.createView([8,"RCTRawText",1,{"text":"To get started, edit index.ios.js"}])'
10:48:33.424
var ws = new DebuggerWebSocket('ws://' + window.location.host + '/debugger-proxy');
ws.onopen = function() {
if (sessionID) {
setStatus('Debugger session #' + sessionID + ' active.');
ws.send(JSON.stringify({replyID: parseInt(sessionID, 10)}));
} else {
setStatus('Waiting, press <span class="shortcut">⌘R</span> in simulator to reload and connect.');
}
};
- (void)executeApplicationScript:(NSString *)script sourceURL:(NSURL *)URL onComplete:(RCTJavaScriptCompleteBlock)onComplete {
NSDictionary *message = @{
@"method": @"executeApplicationScript",
@"url": RCTNullIfNil(URL.absoluteString),
@"inject": _injectedObjects,
};
[self sendMessage:message waitForReply:^(NSError *error, NSDictionary *reply) {
onComplete(error);
}];
}
{
"remoteModuleConfig": {
"RCTTiming": {
"methods": {
"deleteTimer": {
"type": "remote",
"methodID": 1
},
"createTimer": {
"type": "remote",