This repository has been archived by the owner on Jul 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit to try to upgrade to React Native 0.8.
- Loading branch information
David Kaminsky
committed
Aug 5, 2015
1 parent
16685ed
commit c7799f1
Showing
12 changed files
with
519 additions
and
270 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.DS_Store | ||
node_modules/* | ||
FacebookLogin.xcodeproj/xcuserdata/**/* | ||
FacebookLogin.xcodeproj/project.xcworkspace/**/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
FacebookLogin.xcodeproj/project.xcworkspace/contents.xcworkspacedata
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/** | ||
* Copyright (c) 2015-present, Facebook, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. An additional grant | ||
* of patent rights can be found in the PATENTS file in the same directory. | ||
*/ | ||
|
||
#import <UIKit/UIKit.h> | ||
#import <XCTest/XCTest.h> | ||
|
||
#import "RCTAssert.h" | ||
#import "RCTRedBox.h" | ||
#import "RCTRootView.h" | ||
|
||
#define TIMEOUT_SECONDS 240 | ||
#define TEXT_TO_LOOK_FOR @"Welcome to React Native!" | ||
|
||
@interface FacebookLoginTests : XCTestCase | ||
|
||
@end | ||
|
||
@implementation FacebookLoginTests | ||
|
||
|
||
- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test | ||
{ | ||
if (test(view)) { | ||
return YES; | ||
} | ||
for (UIView *subview in [view subviews]) { | ||
if ([self findSubviewInView:subview matching:test]) { | ||
return YES; | ||
} | ||
} | ||
return NO; | ||
} | ||
|
||
- (void)testRendersWelcomeScreen { | ||
UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController]; | ||
NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; | ||
BOOL foundElement = NO; | ||
NSString *redboxError = nil; | ||
|
||
while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { | ||
[[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; | ||
[[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; | ||
|
||
redboxError = [[RCTRedBox sharedInstance] currentErrorMessage]; | ||
|
||
foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { | ||
if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { | ||
return YES; | ||
} | ||
return NO; | ||
}]; | ||
} | ||
|
||
XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); | ||
XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); | ||
} | ||
|
||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>en</string> | ||
<key>CFBundleExecutable</key> | ||
<string>$(EXECUTABLE_NAME)</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleName</key> | ||
<string>$(PRODUCT_NAME)</string> | ||
<key>CFBundlePackageType</key> | ||
<string>BNDL</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>1.0</string> | ||
<key>CFBundleSignature</key> | ||
<string>????</string> | ||
<key>CFBundleVersion</key> | ||
<string>1</string> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Offline JS | ||
// To re-generate the offline bundle, run this from the root of your project: | ||
// | ||
// $ react-native bundle --minify | ||
// | ||
// See http://facebook.github.io/react-native/docs/runningondevice.html for more details. | ||
|
||
throw new Error('Offline JS file is empty. See iOS/main.jsbundle for instructions'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
{ | ||
"name": "FacebookLogin", | ||
"version": "0.0.2", | ||
"version": "0.0.1", | ||
"private": true, | ||
"scripts": { | ||
"start": "node_modules/react-native/packager/packager.sh" | ||
}, | ||
"dependencies": { | ||
"flux-util": "0.1.1", | ||
"immutable": "^3.7.3", | ||
"react-native": "^0.5.0", | ||
"react-native-linear-gradient": "^0.3.1", | ||
"react-native-modal": "^0.3.7", | ||
"react-native-video": "^0.4.3" | ||
"flux-util": "^0.1.1", | ||
"immutable": "^3.7.4", | ||
"react-native": "^0.8.0", | ||
"react-native-linear-gradient": "^0.3.2", | ||
"react-native-modal": "^0.3.8", | ||
"react-native-video": "^0.5.0" | ||
} | ||
} |