Skip to content

Commit

Permalink
Add an iOS Pods example
Browse files Browse the repository at this point in the history
  • Loading branch information
Kadi Kraman committed Oct 11, 2018
1 parent 09cda9e commit e46f7d2
Show file tree
Hide file tree
Showing 179 changed files with 18,753 additions and 37 deletions.
36 changes: 0 additions & 36 deletions Example/Latest/README.md

This file was deleted.

2 changes: 1 addition & 1 deletion Example/Latest/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AppRegistry } from 'react-native';
import App from './App';
import App from '../shared/App';

AppRegistry.registerComponent('AppAuthExample', () => App);
48 changes: 48 additions & 0 deletions Example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# React Native App Auth Examples

Example application for the `react-native-app-auth` library.

![Demo](demo.gif)

## Setup

You'll need to have Yarn and the React Native CLI installed:

```sh
npm install --global yarn react-native-cli
```

Clone the repo and install dependencies

```sh
git clone https://github.com/FormidableLabs/react-native-app-auth.git
cd ./react-native-app-auth/Example/Latest
yarn
```

## Run

iOS:

```
react-native run-ios
```

Android:

```
react-native run-android
```


### Latest (Android & iOS)
Latest code in the repo for both iOS and Android

### iOS Pods
iOS app only with the AppAuth dependency installed from Pods

### iOS Carthage
iOS app only with the AppAuth dependency installed from Carthage

### Android
Android app only
File renamed without changes
3 changes: 3 additions & 0 deletions Example/iOSPodsExample/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["module:metro-react-native-babel-preset"]
}
6 changes: 6 additions & 0 deletions Example/iOSPodsExample/.buckconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

[android]
target = Google Inc.:Google APIs:23

[maven_repositories]
central = https://repo1.maven.org/maven2
70 changes: 70 additions & 0 deletions Example/iOSPodsExample/.flowconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
[ignore]
; We fork some components by platform
.*/*[.]android.js

; Ignore "BUCK" generated dirs
<PROJECT_ROOT>/\.buckd/

; Ignore unexpected extra "@providesModule"
.*/node_modules/.*/node_modules/fbjs/.*

; Ignore duplicate module providers
; For RN Apps installed via npm, "Libraries" folder is inside
; "node_modules/react-native" but in the source repo it is in the root
.*/Libraries/react-native/React.js

; Ignore polyfills
.*/Libraries/polyfills/.*

; Ignore metro
.*/node_modules/metro/.*

[include]

[libs]
node_modules/react-native/Libraries/react-native/react-native-interface.js
node_modules/react-native/flow/
node_modules/react-native/flow-github/

[options]
emoji=true

esproposal.optional_chaining=enable
esproposal.nullish_coalescing=enable

module.system=haste
module.system.haste.use_name_reducers=true
# get basename
module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
# strip .js or .js.flow suffix
module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
# strip .ios suffix
module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
module.system.haste.paths.blacklist=.*/__tests__/.*
module.system.haste.paths.blacklist=.*/__mocks__/.*
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*

munge_underscores=true

module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'

module.file_ext=.js
module.file_ext=.jsx
module.file_ext=.json
module.file_ext=.native.js

suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState

suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError

[version]
^0.78.0
1 change: 1 addition & 0 deletions Example/iOSPodsExample/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.pbxproj -text
56 changes: 56 additions & 0 deletions Example/iOSPodsExample/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# OSX
#
.DS_Store

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace

# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml

# node.js
#
node_modules/
npm-debug.log
yarn-error.log

# BUCK
buck-out/
\.buckd/
*.keystore

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots

# Bundle artifact
*.jsbundle
1 change: 1 addition & 0 deletions Example/iOSPodsExample/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
File renamed without changes.
4 changes: 4 additions & 0 deletions Example/iOSPodsExample/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "RNAppAuthPodsExample",
"displayName": "RNAppAuthPodsExample"
}
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions Example/iOSPodsExample/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/** @format */

import {AppRegistry} from 'react-native';
import App from './App';
import {name as appName} from './app.json';

AppRegistry.registerComponent(appName, () => App);
8 changes: 8 additions & 0 deletions Example/iOSPodsExample/ios/Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'RNAppAuthPodsExample' do

pod 'AppAuth', '>= 0.94'

end
16 changes: 16 additions & 0 deletions Example/iOSPodsExample/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
PODS:
- AppAuth (0.94.0)

DEPENDENCIES:
- AppAuth (>= 0.94)

SPEC REPOS:
https://github.com/cocoapods/specs.git:
- AppAuth

SPEC CHECKSUMS:
AppAuth: 0f099c2286a1a9754e5bd27211c43d307dc4f778

PODFILE CHECKSUM: bd2760418770e1214bad49e8964786d9ab72005a

COCOAPODS: 1.5.2
Loading

0 comments on commit e46f7d2

Please sign in to comment.