Skip to content
Merged
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
5 changes: 5 additions & 0 deletions samples/objc/FirebaseUI-demo-objc.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
/* Begin PBXBuildFile section */
896400F7222F583100CEF7D7 /* mssymbol.png in Resources */ = {isa = PBXBuildFile; fileRef = 896400F6222F583100CEF7D7 /* mssymbol.png */; };
89B822042256838500CEF7D7 /* twtrsymbol.png in Resources */ = {isa = PBXBuildFile; fileRef = 89B822032256838500CEF7D7 /* twtrsymbol.png */; };
89D6278022AB14FD00CEF7D7 /* githubsymbol.png in Resources */ = {isa = PBXBuildFile; fileRef = 89D6277F22AB14FD00CEF7D7 /* githubsymbol.png */; };
8D7D5DC11D9D9536006C1857 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 8D7D5DC01D9D9536006C1857 /* GoogleService-Info.plist */; };
8D7F86B51D9DAA0100C2A122 /* FUIStorageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8D7F86B41D9DAA0100C2A122 /* FUIStorageViewController.m */; };
C30AEB0A1ED610740084E328 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C30AEB071ED610740084E328 /* Main.storyboard */; };
Expand Down Expand Up @@ -42,6 +43,7 @@
/* Begin PBXFileReference section */
896400F6222F583100CEF7D7 /* mssymbol.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = mssymbol.png; sourceTree = "<group>"; };
89B822032256838500CEF7D7 /* twtrsymbol.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = twtrsymbol.png; sourceTree = "<group>"; };
89D6277F22AB14FD00CEF7D7 /* githubsymbol.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = githubsymbol.png; sourceTree = "<group>"; };
8D7D5DC01D9D9536006C1857 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
8D7F86B31D9DAA0100C2A122 /* FUIStorageViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FUIStorageViewController.h; path = Storage/FUIStorageViewController.h; sourceTree = "<group>"; };
8D7F86B41D9DAA0100C2A122 /* FUIStorageViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FUIStorageViewController.m; path = Storage/FUIStorageViewController.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -195,6 +197,7 @@
896400F5222F580400CEF7D7 /* Resources */ = {
isa = PBXGroup;
children = (
89D6277F22AB14FD00CEF7D7 /* githubsymbol.png */,
89B822032256838500CEF7D7 /* twtrsymbol.png */,
896400F6222F583100CEF7D7 /* mssymbol.png */,
);
Expand Down Expand Up @@ -368,6 +371,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
ar,
"zh-Hans",
Expand Down Expand Up @@ -469,6 +473,7 @@
buildActionMask = 2147483647;
files = (
C3A8B7C21DAF073400CDF0ED /* FUICustomPasswordSignInViewController.xib in Resources */,
89D6278022AB14FD00CEF7D7 /* githubsymbol.png in Resources */,
896400F7222F583100CEF7D7 /* mssymbol.png in Resources */,
C30AEB0B1ED610780084E328 /* Localizable.strings in Resources */,
C30AEB0A1ED610740084E328 /* Main.storyboard in Resources */,
Expand Down
37 changes: 27 additions & 10 deletions samples/objc/FirebaseUI-demo-objc/Resources/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="7RW-VL-qNI">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="7RW-VL-qNI">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand Down Expand Up @@ -346,19 +346,36 @@
</subviews>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" indentationWidth="10" textLabel="Jeg-DB-qq2" style="IBUITableViewCellStyleDefault" id="cjf-Li-LSE">
<rect key="frame" x="0.0" y="551.5" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="cjf-Li-LSE" id="Xgi-wv-3p0">
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="GitHub" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Jeg-DB-qq2">
<rect key="frame" x="16" y="0.0" width="343" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
</tableViewCell>
</cells>
</tableViewSection>
<tableViewSection headerTitle="Sign In Anonymously" id="81M-Ya-hwv">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" indentationWidth="10" textLabel="WOn-MV-deD" style="IBUITableViewCellStyleDefault" id="5W7-Jx-Eqe">
<rect key="frame" x="0.0" y="607.5" width="375" height="44"/>
<rect key="frame" x="0.0" y="651.5" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="5W7-Jx-Eqe" id="xMI-90-b7h">
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Anonymous Sign In" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="WOn-MV-deD">
<rect key="frame" x="16" y="0.0" width="343" height="43.5"/>
<rect key="frame" x="15" y="0.0" width="345" height="43.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
Expand All @@ -372,7 +389,7 @@
<tableViewSection headerTitle="Name" id="0YA-IY-hOV">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="kCl-ip-jc2">
<rect key="frame" x="0.0" y="707.5" width="375" height="44"/>
<rect key="frame" x="0.0" y="751.5" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="kCl-ip-jc2" id="dm4-D7-IWN">
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
Expand All @@ -384,7 +401,7 @@
<tableViewSection headerTitle="Email" id="Y94-bQ-cWH">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="MCw-zF-UTn">
<rect key="frame" x="0.0" y="807.5" width="375" height="44"/>
<rect key="frame" x="0.0" y="851.5" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="MCw-zF-UTn" id="ea1-oT-1Py">
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
Expand All @@ -396,7 +413,7 @@
<tableViewSection headerTitle="Phone number" id="F6q-xI-bQc">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="qvP-WR-vZC">
<rect key="frame" x="0.0" y="907.5" width="375" height="44"/>
<rect key="frame" x="0.0" y="951.5" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="qvP-WR-vZC" id="s8s-Ko-B7y">
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
Expand All @@ -408,7 +425,7 @@
<tableViewSection headerTitle="UID" id="Yxe-jV-t3o">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="EWm-GE-IZV">
<rect key="frame" x="0.0" y="1007.5" width="375" height="44"/>
<rect key="frame" x="0.0" y="1051.5" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="EWm-GE-IZV" id="ISG-G9-H8V">
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
Expand All @@ -420,7 +437,7 @@
<tableViewSection headerTitle="Provider Access Token" id="E31-4c-QDa">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" textLabel="k9f-GH-UBQ" style="IBUITableViewCellStyleDefault" id="mdj-SS-dqJ">
<rect key="frame" x="0.0" y="1107.5" width="375" height="44"/>
<rect key="frame" x="0.0" y="1151.5" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="mdj-SS-dqJ" id="oCT-Ra-9l7">
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
Expand All @@ -441,7 +458,7 @@
<tableViewSection headerTitle="Provider ID Token" id="GaU-wa-aFK">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" textLabel="M61-v5-jhZ" style="IBUITableViewCellStyleDefault" id="b45-X5-eC9">
<rect key="frame" x="0.0" y="1207.5" width="375" height="44"/>
<rect key="frame" x="0.0" y="1251.5" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="b45-X5-eC9" id="ofC-qT-5cz">
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
kIDPTwitter,
kIDPPhone,
kIDPAnonymous,
kIDPMicrosoft
kIDPMicrosoft,
kIDPGitHub,
};

static NSString *const kFirebaseTermsOfService = @"https://firebase.google.com/terms/";
Expand Down Expand Up @@ -126,6 +127,10 @@ - (void)viewDidLoad {
inSection:kSectionsProviders]
animated:NO
scrollPosition:UITableViewScrollPositionNone];
[self.tableView selectRowAtIndexPath:[NSIndexPath indexPathForRow:kIDPGitHub
inSection:kSectionsProviders]
animated:NO
scrollPosition:UITableViewScrollPositionNone];
}

- (void)viewWillAppear:(BOOL)animated {
Expand Down Expand Up @@ -451,6 +456,25 @@ + (NSArray *)getListOfIDPs:(NSArray<NSIndexPath *> *)selectedRows
loginHintKey:@"login_hint"];
}
break;
case kIDPGitHub:
{
UIColor *buttonColor = [UIColor colorWithRed:.2 green:.2 blue:.2 alpha:1.0];
NSString *iconPath = [[NSBundle mainBundle] pathForResource:@"githubsymbol"
ofType:@"png"];
if (!iconPath) {
NSLog(@"Warning: Unable to find GitHub icon.");
}
provider = [[FUIOAuth alloc] initWithAuthUI:[FUIAuth defaultAuthUI]
providerID:@"github.com"
buttonLabelText:@"Sign in with GitHub"
shortName:@"GitHub"
buttonColor:buttonColor
iconImage:[UIImage imageWithContentsOfFile:iconPath]
scopes:nil
customParameters:nil
loginHintKey:nil];
}
break;
default:
break;
}
Expand Down