Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions React.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ Pod::Spec.new do |s|

s.subspec 'RCTWebSocketDebugger' do |ss|
ss.dependency 'React/Core'
ss.dependency 'SocketRocket'
ss.libraries = 'icucore'
ss.source_files = "Libraries/RCTWebSocketDebugger/*.{h,m}"
ss.exclude_files = "Libraries/RCTWebSocketDebugger/SRWebSocket.*"
end

s.subspec 'RCTText' do |ss|
Expand Down
3 changes: 3 additions & 0 deletions React/Base/RCTJavaScriptLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@

#import "RCTJavaScriptExecutor.h"

NSString *const RCTJavaScriptDidDownLoadedNotification = @"RCTJavaScriptDidDownLoadedNotification";

@class RCTBridge;


/**
* Class that allows easy embedding, loading, life-cycle management of a
* JavaScript application inside of a native application.
Expand Down
6 changes: 6 additions & 0 deletions React/Base/RCTJavaScriptLoader.m
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ - (void)loadBundleAtURL:(NSURL *)scriptURL onComplete:(void (^)(NSError *))onCom
onComplete(error);
return;
}




// Parse response as text
NSStringEncoding encoding = NSUTF8StringEncoding;
Expand Down Expand Up @@ -103,6 +106,9 @@ - (void)loadBundleAtURL:(NSURL *)scriptURL onComplete:(void (^)(NSError *))onCom
sourceCodeModule.scriptURL = scriptURL;
sourceCodeModule.scriptText = rawText;

[[NSNotificationCenter defaultCenter] postNotificationName:RCTJavaScriptDidDownLoadedNotification
object:self];

[_bridge enqueueApplicationScript:rawText url:scriptURL onComplete:^(NSError *scriptError) {
dispatch_async(dispatch_get_main_queue(), ^{
onComplete(scriptError);
Expand Down