Skip to content

Commit

Permalink
Merge branch 'owner/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	ios/RNSplashScreen.h
  • Loading branch information
binhnd committed Jun 29, 2018
2 parents 1ccb99a + e39fdd5 commit 4216409
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ You can create splash screens in the following folders:
* `drawable-xxhdpi`
* `drawable-xxxhdpi`

Add a color called `primary_dark` in `app/src/main/res/values/color.xml`
Add a color called `primary_dark` in `app/src/main/res/values/colors.xml`

```
<?xml version="1.0" encoding="utf-8"?>
Expand Down
2 changes: 1 addition & 1 deletion ios/SplashScreen.h → ios/RNSplashScreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#import <React/RCTBridgeModule.h>
#import <UIKit/UIKit.h>

@interface SplashScreen : NSObject<RCTBridgeModule>
@interface RNSplashScreen : NSObject<RCTBridgeModule>
+ (void)showSplash:(NSString*)splashScreen inRootView:(UIView*)rootView;
+ (void)show;
+ (void)hide;
Expand Down
10 changes: 5 additions & 5 deletions ios/SplashScreen.m → ios/RNSplashScreen.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
* Email:crazycodeboy@gmail.com
*/

#import "SplashScreen.h"
#import "RNSplashScreen.h"
#import <React/RCTBridge.h>

static bool waiting = true;
static bool addedJsLoadErrorObserver = false;
static UIView* loadingView = nil;

@implementation SplashScreen
@implementation RNSplashScreen
- (dispatch_queue_t)methodQueue{
return dispatch_get_main_queue();
}
RCT_EXPORT_MODULE()
RCT_EXPORT_MODULE(SplashScreen)

+ (void)show {
if (!addedJsLoadErrorObserver) {
Expand Down Expand Up @@ -59,11 +59,11 @@ + (void)hide {
+ (void) jsLoadError:(NSNotification*)notification
{
// If there was an error loading javascript, hide the splash screen so it can be shown. Otherwise the splash screen will remain forever, which is a hassle to debug.
[SplashScreen hide];
[RNSplashScreen hide];
}

RCT_EXPORT_METHOD(hide) {
[SplashScreen hide];
[RNSplashScreen hide];
}

@end
12 changes: 6 additions & 6 deletions ios/SplashScreen.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
3D7682841D8E76D10014119E /* SplashScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D7682831D8E76D10014119E /* SplashScreen.m */; };
3D7682841D8E76D10014119E /* RNSplashScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D7682831D8E76D10014119E /* RNSplashScreen.m */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
Expand All @@ -24,8 +24,8 @@

/* Begin PBXFileReference section */
3D7682761D8E76B80014119E /* libSplashScreen.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSplashScreen.a; sourceTree = BUILT_PRODUCTS_DIR; };
3D7682821D8E76D10014119E /* SplashScreen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SplashScreen.h; sourceTree = "<group>"; };
3D7682831D8E76D10014119E /* SplashScreen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SplashScreen.m; sourceTree = "<group>"; };
3D7682821D8E76D10014119E /* RNSplashScreen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNSplashScreen.h; sourceTree = "<group>"; };
3D7682831D8E76D10014119E /* RNSplashScreen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNSplashScreen.m; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -42,8 +42,8 @@
3D76826D1D8E76B80014119E = {
isa = PBXGroup;
children = (
3D7682821D8E76D10014119E /* SplashScreen.h */,
3D7682831D8E76D10014119E /* SplashScreen.m */,
3D7682821D8E76D10014119E /* RNSplashScreen.h */,
3D7682831D8E76D10014119E /* RNSplashScreen.m */,
3D7682771D8E76B80014119E /* Products */,
);
sourceTree = "<group>";
Expand Down Expand Up @@ -113,7 +113,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
3D7682841D8E76D10014119E /* SplashScreen.m in Sources */,
3D7682841D8E76D10014119E /* RNSplashScreen.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down

0 comments on commit 4216409

Please sign in to comment.