├── .babelrc
├── .eslintrc
├── .flowconfig
├── .gitignore
├── .npmignore
├── .watchmanconfig
├── README.markdown
├── android
├── app
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── app
│ │ │ └── MainActivity.java
│ │ └── res
│ │ ├── mipmap-hdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ └── ic_launcher.png
│ │ └── values
│ │ ├── strings.xml
│ │ └── styles.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
├── index.android.js
├── index.ios.js
├── ios
├── App.xcodeproj
│ ├── project.pbxproj
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── App.xcscheme
├── App
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Base.lproj
│ │ └── LaunchScreen.xib
│ ├── Images.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Contents.json
│ │ └── reactive.imageset
│ │ │ ├── Contents.json
│ │ │ ├── reactive-1.png
│ │ │ ├── reactive-2.png
│ │ │ └── reactive.png
│ ├── Info.plist
│ └── main.m
├── AppTests
│ ├── AppTests.m
│ └── Info.plist
├── Fabric.framework
│ ├── Fabric
│ ├── Headers
│ │ ├── FABAttributes.h
│ │ └── Fabric.h
│ ├── Info.plist
│ ├── Modules
│ │ └── module.modulemap
│ ├── run
│ └── uploadDSYM
├── TwitterAPI.h
├── TwitterAPI.m
├── TwitterCore.framework
│ ├── Headers
│ │ ├── TWTRAPIErrorCode.h
│ │ ├── TWTRAuthConfig.h
│ │ ├── TWTRAuthSession.h
│ │ ├── TWTRConstants.h
│ │ ├── TWTRCoreOAuthSigning.h
│ │ ├── TWTRDefines.h
│ │ ├── TWTRGuestSession.h
│ │ ├── TWTRSession.h
│ │ ├── TWTRSessionStore.h
│ │ └── TwitterCore.h
│ ├── Info.plist
│ ├── Modules
│ │ └── module.modulemap
│ └── TwitterCore
├── TwitterKit.framework
│ ├── Headers
│ │ ├── TWTRAPIClient.h
│ │ ├── TWTRCollectionTimelineDataSource.h
│ │ ├── TWTRComposer.h
│ │ ├── TWTRListTimelineDataSource.h
│ │ ├── TWTRLogInButton.h
│ │ ├── TWTROAuthSigning.h
│ │ ├── TWTRSearchTimelineDataSource.h
│ │ ├── TWTRShareEmailViewController.h
│ │ ├── TWTRTimelineDataSource.h
│ │ ├── TWTRTimelineType.h
│ │ ├── TWTRTimelineViewController.h
│ │ ├── TWTRTweet.h
│ │ ├── TWTRTweetTableViewCell.h
│ │ ├── TWTRTweetView.h
│ │ ├── TWTRTweetViewDelegate.h
│ │ ├── TWTRUser.h
│ │ ├── TWTRUserTimelineDataSource.h
│ │ ├── Twitter.h
│ │ └── TwitterKit.h
│ ├── Info.plist
│ ├── Modules
│ │ └── module.modulemap
│ ├── Resources
│ ├── TwitterKit
│ └── Versions
│ │ ├── A
│ │ └── Resources
│ │ │ └── TwitterKitResources.bundle
│ │ │ ├── TFSScribe.momd
│ │ │ ├── TFSScribe.mom
│ │ │ └── VersionInfo.plist
│ │ │ ├── ar.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── bn.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── cs.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── da.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── de.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── emailshare.png
│ │ │ ├── emailshare@2x.png
│ │ │ ├── emailshare@3x.png
│ │ │ ├── en-gb.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── en.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── es.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── fa.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── fi.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── fr.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── he.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── hi.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── hu.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── id.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── it.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── ja.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── ko.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── ms.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── nb.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── nl.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── pl.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── pt.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── ro.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── ru.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── sv.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── th.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── tl.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── tr.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── twtr-favorite-off.png
│ │ │ ├── twtr-favorite-off@2x.png
│ │ │ ├── twtr-favorite-off@3x.png
│ │ │ ├── twtr-favorite-on.png
│ │ │ ├── twtr-favorite-on@2x.png
│ │ │ ├── twtr-favorite-on@3x.png
│ │ │ ├── twtr-icn-logo-white.png
│ │ │ ├── twtr-icn-logo-white@2x.png
│ │ │ ├── twtr-icn-logo-white@3x.png
│ │ │ ├── twtr-icn-logo.png
│ │ │ ├── twtr-icn-logo@2x.png
│ │ │ ├── twtr-icn-logo@3x.png
│ │ │ ├── twtr-icn-tweet-retweeted-by-dark.png
│ │ │ ├── twtr-icn-tweet-retweeted-by-dark@2x.png
│ │ │ ├── twtr-icn-tweet-retweeted-by-dark@3x.png
│ │ │ ├── twtr-icn-tweet-retweeted-by-light.png
│ │ │ ├── twtr-icn-tweet-retweeted-by-light@2x.png
│ │ │ ├── twtr-icn-tweet-retweeted-by-light@3x.png
│ │ │ ├── twtr-icn-tweet-verified.png
│ │ │ ├── twtr-icn-tweet-verified@2x.png
│ │ │ ├── twtr-icn-tweet-verified@3x.png
│ │ │ ├── twtr-share.png
│ │ │ ├── twtr-share@2x.png
│ │ │ ├── twtr-share@3x.png
│ │ │ ├── twttr-icn-tweet-place-holder-photo-error.png
│ │ │ ├── twttr-icn-tweet-place-holder-photo-error@2x.png
│ │ │ ├── twttr-icn-tweet-place-holder-photo-error@3x.png
│ │ │ ├── twttr-icn-tweet-place-holder-photo.png
│ │ │ ├── twttr-icn-tweet-place-holder-photo@2x.png
│ │ │ ├── twttr-icn-tweet-place-holder-photo@3x.png
│ │ │ ├── uk.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── ur.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── vi.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── zh-Hans.lproj
│ │ │ └── Localizable.strings
│ │ │ └── zh-Hant.lproj
│ │ │ └── Localizable.strings
│ │ └── Current
├── main.jsbundle
└── mapstyle.json
├── package.json
└── src
├── actions
└── index.js
├── components
├── map.js
├── navigation-bar.js
├── scene-config.js
├── scene.js
├── schedule-item.js
├── schedule-list.js
├── schedule.js
├── social.js
├── speaker.js
├── speakers.js
├── talk-detail.js
└── tweet.js
├── containers
├── app.js
└── root.js
├── data
└── index.js
├── reducers
└── index.js
└── store
└── configure-store.js
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "retainLines": true,
3 | "compact": true,
4 | "comments": false,
5 | "whitelist": [
6 | "es6.arrowFunctions",
7 | "es6.blockScoping",
8 | "es6.classes",
9 | "es6.destructuring",
10 | "es6.parameters",
11 | "es6.properties.computed",
12 | "es6.properties.shorthand",
13 | "es6.spread",
14 | "es6.modules",
15 | "es6.templateLiterals",
16 | "es7.trailingFunctionCommas",
17 | "es7.objectRestSpread",
18 | "es7.asyncFunctions",
19 | "es7.classProperties",
20 | "regenerator",
21 | "flow",
22 | "react",
23 | "react.displayName"
24 | ],
25 | "sourceMaps": false
26 | }
--------------------------------------------------------------------------------
/.eslintrc:
--------------------------------------------------------------------------------
1 | ---
2 | extends:
3 | - "defaults/configurations/walmart/es6-react"
4 |
--------------------------------------------------------------------------------
/.flowconfig:
--------------------------------------------------------------------------------
1 | [ignore]
2 |
3 | # We fork some components by platform.
4 | .*/*.web.js
5 | .*/*.android.js
6 |
7 | # Some modules have their own node_modules with overlap
8 | .*/node_modules/node-haste/.*
9 |
10 | # Ignore react-tools where there are overlaps, but don't ignore anything that
11 | # react-native relies on
12 | .*/node_modules/react-tools/src/React.js
13 | .*/node_modules/react-tools/src/renderers/shared/event/EventPropagators.js
14 | .*/node_modules/react-tools/src/renderers/shared/event/eventPlugins/ResponderEventPlugin.js
15 | .*/node_modules/react-tools/src/shared/vendor/core/ExecutionEnvironment.js
16 | .*/node_modules/react-redux/node_modules/invariant/
17 |
18 | # Ignore commoner tests
19 | .*/node_modules/commoner/test/.*
20 |
21 | # See https://github.com/facebook/flow/issues/442
22 | .*/react-tools/node_modules/commoner/lib/reader.js
23 |
24 | # Ignore jest
25 | .*/react-native/node_modules/jest-cli/.*
26 |
27 | [include]
28 | ./src
29 | [libs]
30 | node_modules/react-native/Libraries/react-native/react-native-interface.js
31 |
32 | [options]
33 | module.system=haste
34 |
35 | munge_underscores=true
36 |
37 | suppress_type=$FlowIssue
38 | suppress_type=$FlowFixMe
39 | suppress_type=$FixMe
40 |
41 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(1[0-4]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
42 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(1[0-4]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)? #[0-9]+
43 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
44 |
45 | [version]
46 | 0.16.0
47 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | #
3 | .DS_Store
4 |
5 | # Xcode
6 | #
7 | build/
8 | *.pbxuser
9 | !default.pbxuser
10 | *.mode1v3
11 | !default.mode1v3
12 | *.mode2v3
13 | !default.mode2v3
14 | *.perspectivev3
15 | !default.perspectivev3
16 | xcuserdata
17 | *.xccheckout
18 | *.moved-aside
19 | DerivedData
20 | *.hmap
21 | *.ipa
22 | *.xcuserstate
23 | project.xcworkspace
24 |
25 | # node.js
26 | #
27 | node_modules/
28 | npm-debug.log
29 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | #
3 | .DS_Store
4 |
5 | # Xcode
6 | #
7 | build/
8 | *.pbxuser
9 | !default.pbxuser
10 | *.mode1v3
11 | !default.mode1v3
12 | *.mode2v3
13 | !default.mode2v3
14 | *.perspectivev3
15 | !default.perspectivev3
16 | xcuserdata
17 | *.xccheckout
18 | *.moved-aside
19 | DerivedData
20 | *.hmap
21 | *.ipa
22 | *.xcuserstate
23 |
24 | # node.js
25 | #
26 | node_modules/
27 | npm-debug.log
28 |
--------------------------------------------------------------------------------
/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/README.markdown:
--------------------------------------------------------------------------------
1 | ##reactive-2015
2 |
3 | ###Schedule
4 | 
5 |
6 | ###Speakers
7 | 
8 |
9 | ###Map
10 | 
11 |
12 | ###Social
13 | 
14 |
15 | #### Getting Started
16 |
17 | - Make sure XCode is installed.
18 |
19 | - Install React Native following the instructions detailed here [https://facebook.github.io/react-native/docs/getting-started.html#content](https://facebook.github.io/react-native/docs/getting-started.html#content)
20 |
21 | - Clone this repo and then run `npm install`
22 |
23 | - Open XCode and open `/ios/App.xcodeproj`
24 |
25 | ####Keys
26 |
27 | You need to add Twitter API keys in `AppDelegate.m` and a MapBox token in `src/components/map.js`
28 |
29 | #### Running IOS
30 |
31 | Simply run the project in XCode
32 |
33 | #### Linting
34 |
35 | To lint your code using [ESLint](http://eslint.org/) run `npm run lint`
36 |
37 | #### Type Checking
38 |
39 | To type check your code using [Flow](flowtype.org), first [install Flow](http://flowtype.org/docs/getting-started.html#_) and then run `npm run flow`
40 |
41 | #### Troubleshooting
42 |
43 | If you have any trouble with package caching due to `.babelrc`, run `rm -fr $TMPDIR/react-*`
44 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 23
5 | buildToolsVersion "23.0.1"
6 |
7 | defaultConfig {
8 | applicationId "com.app"
9 | minSdkVersion 16
10 | targetSdkVersion 22
11 | versionCode 1
12 | versionName "1.0"
13 | ndk {
14 | abiFilters "armeabi-v7a", "x86"
15 | }
16 | }
17 | buildTypes {
18 | release {
19 | minifyEnabled false
20 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
21 | }
22 | }
23 | }
24 |
25 | dependencies {
26 | compile fileTree(dir: 'libs', include: ['*.jar'])
27 | compile 'com.android.support:appcompat-v7:23.0.0'
28 | compile 'com.facebook.react:react-native:0.11.+'
29 | }
30 |
--------------------------------------------------------------------------------
/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
11 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/app/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.app;
2 |
3 | import android.app.Activity;
4 | import android.os.Bundle;
5 | import android.view.KeyEvent;
6 |
7 | import com.facebook.react.LifecycleState;
8 | import com.facebook.react.ReactInstanceManager;
9 | import com.facebook.react.ReactRootView;
10 | import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler;
11 | import com.facebook.react.shell.MainReactPackage;
12 | import com.facebook.soloader.SoLoader;
13 |
14 | public class MainActivity extends Activity implements DefaultHardwareBackBtnHandler {
15 |
16 | private ReactInstanceManager mReactInstanceManager;
17 | private ReactRootView mReactRootView;
18 |
19 | @Override
20 | protected void onCreate(Bundle savedInstanceState) {
21 | super.onCreate(savedInstanceState);
22 | mReactRootView = new ReactRootView(this);
23 |
24 | mReactInstanceManager = ReactInstanceManager.builder()
25 | .setApplication(getApplication())
26 | .setBundleAssetName("index.android.bundle")
27 | .setJSMainModuleName("index.android")
28 | .addPackage(new MainReactPackage())
29 | .setUseDeveloperSupport(BuildConfig.DEBUG)
30 | .setInitialLifecycleState(LifecycleState.RESUMED)
31 | .build();
32 |
33 | mReactRootView.startReactApplication(mReactInstanceManager, "App", null);
34 |
35 | setContentView(mReactRootView);
36 | }
37 |
38 | @Override
39 | public boolean onKeyUp(int keyCode, KeyEvent event) {
40 | if (keyCode == KeyEvent.KEYCODE_MENU && mReactInstanceManager != null) {
41 | mReactInstanceManager.showDevOptionsDialog();
42 | return true;
43 | }
44 | return super.onKeyUp(keyCode, event);
45 | }
46 |
47 | @Override
48 | public void invokeDefaultOnBackPressed() {
49 | super.onBackPressed();
50 | }
51 |
52 | @Override
53 | protected void onPause() {
54 | super.onPause();
55 |
56 | if (mReactInstanceManager != null) {
57 | mReactInstanceManager.onPause();
58 | }
59 | }
60 |
61 | @Override
62 | protected void onResume() {
63 | super.onResume();
64 |
65 | if (mReactInstanceManager != null) {
66 | mReactInstanceManager.onResume(this);
67 | }
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | App
3 |
4 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:1.3.0'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | mavenLocal()
18 | jcenter()
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
20 | android.useDeprecatedNdk=true
21 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
6 |
--------------------------------------------------------------------------------
/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # For Cygwin, ensure paths are in UNIX format before anything is touched.
46 | if $cygwin ; then
47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48 | fi
49 |
50 | # Attempt to set APP_HOME
51 | # Resolve links: $0 may be a link
52 | PRG="$0"
53 | # Need this for relative symlinks.
54 | while [ -h "$PRG" ] ; do
55 | ls=`ls -ld "$PRG"`
56 | link=`expr "$ls" : '.*-> \(.*\)$'`
57 | if expr "$link" : '/.*' > /dev/null; then
58 | PRG="$link"
59 | else
60 | PRG=`dirname "$PRG"`"/$link"
61 | fi
62 | done
63 | SAVED="`pwd`"
64 | cd "`dirname \"$PRG\"`/" >&-
65 | APP_HOME="`pwd -P`"
66 | cd "$SAVED" >&-
67 |
68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
69 |
70 | # Determine the Java command to use to start the JVM.
71 | if [ -n "$JAVA_HOME" ] ; then
72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
73 | # IBM's JDK on AIX uses strange locations for the executables
74 | JAVACMD="$JAVA_HOME/jre/sh/java"
75 | else
76 | JAVACMD="$JAVA_HOME/bin/java"
77 | fi
78 | if [ ! -x "$JAVACMD" ] ; then
79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
80 |
81 | Please set the JAVA_HOME variable in your environment to match the
82 | location of your Java installation."
83 | fi
84 | else
85 | JAVACMD="java"
86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
87 |
88 | Please set the JAVA_HOME variable in your environment to match the
89 | location of your Java installation."
90 | fi
91 |
92 | # Increase the maximum file descriptors if we can.
93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
94 | MAX_FD_LIMIT=`ulimit -H -n`
95 | if [ $? -eq 0 ] ; then
96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
97 | MAX_FD="$MAX_FD_LIMIT"
98 | fi
99 | ulimit -n $MAX_FD
100 | if [ $? -ne 0 ] ; then
101 | warn "Could not set maximum file descriptor limit: $MAX_FD"
102 | fi
103 | else
104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
105 | fi
106 | fi
107 |
108 | # For Darwin, add options to specify how the application appears in the dock
109 | if $darwin; then
110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
111 | fi
112 |
113 | # For Cygwin, switch paths to Windows format before running java
114 | if $cygwin ; then
115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158 | function splitJvmOpts() {
159 | JVM_OPTS=("$@")
160 | }
161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
163 |
164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
165 |
--------------------------------------------------------------------------------
/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'App'
2 |
3 | include ':app'
4 |
--------------------------------------------------------------------------------
/index.android.js:
--------------------------------------------------------------------------------
1 | import React from "react-native";
2 | import Root from "./containers/root";
3 |
4 | const {
5 | AppRegistry
6 | } = React;
7 |
8 | AppRegistry.registerComponent("App", () => Root);
9 |
--------------------------------------------------------------------------------
/index.ios.js:
--------------------------------------------------------------------------------
1 | import React from "react-native";
2 | import Root from "./src/containers/root";
3 |
4 | const {
5 | AppRegistry
6 | } = React;
7 |
8 | AppRegistry.registerComponent("App", () => Root);
9 |
--------------------------------------------------------------------------------
/ios/App.xcodeproj/xcshareddata/xcschemes/App.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
38 |
39 |
44 |
45 |
47 |
53 |
54 |
55 |
56 |
57 |
63 |
64 |
65 |
66 |
67 |
68 |
78 |
80 |
86 |
87 |
88 |
89 |
90 |
91 |
97 |
99 |
105 |
106 |
107 |
108 |
110 |
111 |
114 |
115 |
116 |
--------------------------------------------------------------------------------
/ios/App/AppDelegate.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | @interface AppDelegate : UIResponder
13 |
14 | @property (nonatomic, strong) UIWindow *window;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/ios/App/AppDelegate.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "AppDelegate.h"
11 | #import
12 | #import
13 | #import "RCTRootView.h"
14 |
15 | @implementation AppDelegate
16 |
17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
18 | {
19 | NSURL *jsCodeLocation;
20 |
21 | /**
22 | * Loading JavaScript code - uncomment the one you want.
23 | *
24 | * OPTION 1
25 | * Load from development server. Start the server from the repository root:
26 | *
27 | * $ npm start
28 | *
29 | * To run on device, change `localhost` to the IP address of your computer
30 | * (you can get this by typing `ifconfig` into the terminal and selecting the
31 | * `inet` value under `en0:`) and make sure your computer and iOS device are
32 | * on the same Wi-Fi network.
33 | */
34 |
35 | jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle"];
36 |
37 | /**
38 | * OPTION 2
39 | * Load from pre-bundled file on disk. To re-generate the static bundle
40 | * from the root of your project directory, run
41 | *
42 | * $ react-native bundle --minify
43 | *
44 | * see http://facebook.github.io/react-native/docs/runningondevice.html
45 | */
46 |
47 | // jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
48 |
49 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
50 | moduleName:@"App"
51 | initialProperties:nil
52 | launchOptions:launchOptions];
53 |
54 | [[Twitter sharedInstance] startWithConsumerKey:@"REDACTED" consumerSecret:@"REDACTED"];
55 | [Fabric with:@[[Twitter sharedInstance]]];
56 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
57 | UIViewController *rootViewController = [[UIViewController alloc] init];
58 | rootViewController.view = rootView;
59 | self.window.rootViewController = rootViewController;
60 | [self.window makeKeyAndVisible];
61 |
62 | return YES;
63 | }
64 |
65 | @end
66 |
--------------------------------------------------------------------------------
/ios/App/Base.lproj/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
21 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/ios/App/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/ios/App/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/ios/App/Images.xcassets/reactive.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "reactive.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "reactive-1.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "reactive-2.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/ios/App/Images.xcassets/reactive.imageset/reactive-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/App/Images.xcassets/reactive.imageset/reactive-1.png
--------------------------------------------------------------------------------
/ios/App/Images.xcassets/reactive.imageset/reactive-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/App/Images.xcassets/reactive.imageset/reactive-2.png
--------------------------------------------------------------------------------
/ios/App/Images.xcassets/reactive.imageset/reactive.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/App/Images.xcassets/reactive.imageset/reactive.png
--------------------------------------------------------------------------------
/ios/App/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | Fabric
24 |
25 | APIKey
26 | 548b0c9ec905bbf2fcefe045c9cbcb872ec47c1f
27 | Kits
28 |
29 |
30 | KitInfo
31 |
32 | consumerKey
33 | IoPu6Lv5i5JGhquqnNWiA3vhJ
34 | consumerSecret
35 | 8qTagbxvK2QweVT61YjCpDf1PyfaA9CpiJqq1ellZx1Z3aXmeJ
36 |
37 | KitName
38 | Twitter
39 |
40 |
41 |
42 | LSRequiresIPhoneOS
43 |
44 | NSAppTransportSecurity
45 |
46 | NSAllowsArbitraryLoads
47 |
48 |
49 | NSLocationWhenInUseUsageDescription
50 |
51 | UILaunchStoryboardName
52 | LaunchScreen
53 | UIRequiredDeviceCapabilities
54 |
55 | armv7
56 |
57 | UISupportedInterfaceOrientations
58 |
59 | UIInterfaceOrientationPortrait
60 | UIInterfaceOrientationLandscapeLeft
61 | UIInterfaceOrientationLandscapeRight
62 |
63 | UIViewControllerBasedStatusBarAppearance
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/ios/App/main.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | #import "AppDelegate.h"
13 |
14 | int main(int argc, char * argv[]) {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/ios/AppTests/AppTests.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 | #import
12 |
13 | #import "RCTLog.h"
14 | #import "RCTRootView.h"
15 |
16 | #define TIMEOUT_SECONDS 240
17 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!"
18 |
19 | @interface AppTests : XCTestCase
20 |
21 | @end
22 |
23 | @implementation AppTests
24 |
25 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
26 | {
27 | if (test(view)) {
28 | return YES;
29 | }
30 | for (UIView *subview in [view subviews]) {
31 | if ([self findSubviewInView:subview matching:test]) {
32 | return YES;
33 | }
34 | }
35 | return NO;
36 | }
37 |
38 | - (void)testRendersWelcomeScreen
39 | {
40 | UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController];
41 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
42 | BOOL foundElement = NO;
43 |
44 | __block NSString *redboxError = nil;
45 | RCTSetLogFunction(^(RCTLogLevel level, NSString *fileName, NSNumber *lineNumber, NSString *message) {
46 | if (level >= RCTLogLevelError) {
47 | redboxError = message;
48 | }
49 | });
50 |
51 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
52 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
53 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
54 |
55 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) {
56 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
57 | return YES;
58 | }
59 | return NO;
60 | }];
61 | }
62 |
63 | RCTSetLogFunction(RCTDefaultLogFunction);
64 |
65 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
66 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
67 | }
68 |
69 |
70 | @end
71 |
--------------------------------------------------------------------------------
/ios/AppTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/ios/Fabric.framework/Fabric:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/Fabric.framework/Fabric
--------------------------------------------------------------------------------
/ios/Fabric.framework/Headers/FABAttributes.h:
--------------------------------------------------------------------------------
1 | //
2 | // FABAttributes.h
3 | // Fabric
4 | //
5 | // Copyright (c) 2015 Twitter. All rights reserved.
6 | //
7 |
8 | #pragma once
9 |
10 | #define FAB_UNAVAILABLE(x) __attribute__((unavailable(x)))
11 |
12 | #if __has_feature(nullability)
13 | #define fab_nullable nullable
14 | #define fab_nonnull nonnull
15 | #define fab_null_unspecified null_unspecified
16 | #define fab_null_resettable null_resettable
17 | #define __fab_nullable __nullable
18 | #define __fab_nonnull __nonnull
19 | #define __fab_null_unspecified __null_unspecified
20 | #else
21 | #define fab_nullable
22 | #define fab_nonnull
23 | #define fab_null_unspecified
24 | #define fab_null_resettable
25 | #define __fab_nullable
26 | #define __fab_nonnull
27 | #define __fab_null_unspecified
28 | #endif
29 |
30 | #ifndef NS_ASSUME_NONNULL_BEGIN
31 | #define NS_ASSUME_NONNULL_BEGIN
32 | #endif
33 |
34 | #ifndef NS_ASSUME_NONNULL_END
35 | #define NS_ASSUME_NONNULL_END
36 | #endif
37 |
38 |
39 | /**
40 | * The following macros are defined here to provide
41 | * backwards compatability. If you are still using
42 | * them you should migrate to the new versions that
43 | * are defined above.
44 | */
45 | #define FAB_NONNULL __fab_nonnull
46 | #define FAB_NULLABLE __fab_nullable
47 | #define FAB_START_NONNULL NS_ASSUME_NONNULL_BEGIN
48 | #define FAB_END_NONNULL NS_ASSUME_NONNULL_END
49 |
--------------------------------------------------------------------------------
/ios/Fabric.framework/Headers/Fabric.h:
--------------------------------------------------------------------------------
1 | //
2 | // Fabric.h
3 | //
4 | // Copyright (c) 2015 Twitter. All rights reserved.
5 | //
6 |
7 | #import
8 | #import "FABAttributes.h"
9 |
10 | NS_ASSUME_NONNULL_BEGIN
11 |
12 | #if TARGET_OS_IPHONE
13 | #if __IPHONE_OS_VERSION_MIN_REQUIRED < 60000
14 | #error "Fabric's minimum iOS version is 6.0"
15 | #endif
16 | #else
17 | #if __MAC_OS_X_VERSION_MIN_REQUIRED < 1070
18 | #error "Fabric's minimum OS X version is 10.7"
19 | #endif
20 | #endif
21 |
22 | /**
23 | * Fabric Base. Coordinates configuration and starts all provided kits.
24 | */
25 | @interface Fabric : NSObject
26 |
27 | /**
28 | * Initialize Fabric and all provided kits. Call this method within your App Delegate's `application:didFinishLaunchingWithOptions:` and provide the kits you wish to use.
29 | *
30 | * For example, in Objective-C:
31 | *
32 | * `[Fabric with:@[[Crashlytics class], [Twitter class], [Digits class], [MoPub class]]];`
33 | *
34 | * Swift:
35 | *
36 | * `Fabric.with([Crashlytics.self(), Twitter.self(), Digits.self(), MoPub.self()])`
37 | *
38 | * Only the first call to this method is honored. Subsequent calls are no-ops.
39 | *
40 | * @param kitClasses An array of kit Class objects
41 | *
42 | * @return Returns the shared Fabric instance. In most cases this can be ignored.
43 | */
44 | + (instancetype)with:(NSArray *)kitClasses;
45 |
46 | /**
47 | * Returns the Fabric singleton object.
48 | */
49 | + (instancetype)sharedSDK;
50 |
51 | /**
52 | * This BOOL enables or disables debug logging, such as kit version information. The default value is NO.
53 | */
54 | @property (nonatomic, assign) BOOL debug;
55 |
56 | /**
57 | * Unavailable. Use `+sharedSDK` to retrieve the shared Fabric instance.
58 | */
59 | - (id)init FAB_UNAVAILABLE("Use +sharedSDK to retrieve the shared Fabric instance.");
60 |
61 | @end
62 |
63 | NS_ASSUME_NONNULL_END
64 |
65 |
--------------------------------------------------------------------------------
/ios/Fabric.framework/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BuildMachineOSBuild
6 | 14E46
7 | CFBundleDevelopmentRegion
8 | en
9 | CFBundleExecutable
10 | Fabric
11 | CFBundleIdentifier
12 | io.fabric.sdk.ios
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | Fabric
17 | CFBundlePackageType
18 | FMWK
19 | CFBundleShortVersionString
20 | 1.5.5
21 | CFBundleSignature
22 | ????
23 | CFBundleSupportedPlatforms
24 |
25 | iPhoneOS
26 |
27 | CFBundleVersion
28 | 30
29 | DTCompiler
30 | com.apple.compilers.llvm.clang.1_0
31 | DTPlatformBuild
32 | 13A340
33 | DTPlatformName
34 | iphoneos
35 | DTPlatformVersion
36 | 9.0
37 | DTSDKBuild
38 | 13A340
39 | DTSDKName
40 | iphoneos9.0
41 | DTXcode
42 | 0700
43 | DTXcodeBuild
44 | 7A220
45 | MinimumOSVersion
46 | 6.0
47 | NSHumanReadableCopyright
48 | Copyright © 2015 Twitter. All rights reserved.
49 | UIDeviceFamily
50 |
51 | 1
52 | 2
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/ios/Fabric.framework/Modules/module.modulemap:
--------------------------------------------------------------------------------
1 | framework module Fabric {
2 | umbrella header "Fabric.h"
3 |
4 | export *
5 | module * { export * }
6 | }
--------------------------------------------------------------------------------
/ios/Fabric.framework/run:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # run
4 | #
5 | # Copyright (c) 2015 Crashlytics. All rights reserved.
6 |
7 | # Figure out where we're being called from
8 | DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
9 |
10 | # Quote path in case of spaces or special chars
11 | DIR="\"${DIR}"
12 |
13 | PATH_SEP="/"
14 | VALIDATE_COMMAND="uploadDSYM\" $@ validate"
15 | UPLOAD_COMMAND="uploadDSYM\" $@"
16 |
17 | # Ensure params are as expected, run in sync mode to validate
18 | eval $DIR$PATH_SEP$VALIDATE_COMMAND
19 | return_code=$?
20 |
21 | if [[ $return_code != 0 ]]; then
22 | exit $return_code
23 | fi
24 |
25 | # Verification passed, upload dSYM in background to prevent Xcode from waiting
26 | # Note: Validation is performed again before upload.
27 | # Output can still be found in Console.app
28 | eval $DIR$PATH_SEP$UPLOAD_COMMAND > /dev/null 2>&1 &
29 |
--------------------------------------------------------------------------------
/ios/Fabric.framework/uploadDSYM:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/Fabric.framework/uploadDSYM
--------------------------------------------------------------------------------
/ios/TwitterAPI.h:
--------------------------------------------------------------------------------
1 | #import "RCTBridgeModule.h"
2 |
3 | @interface TwitterAPI : NSObject
4 | @end
--------------------------------------------------------------------------------
/ios/TwitterAPI.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 | #import "TwitterAPI.h"
4 |
5 | @implementation TwitterAPI
6 |
7 | RCT_EXPORT_MODULE();
8 |
9 | RCT_EXPORT_METHOD(getTweets:(RCTResponseSenderBlock)callback)
10 | {
11 | TWTRAPIClient *client = [[TWTRAPIClient alloc] init];
12 | NSDictionary *params = @{@"q" : @"reactive2015"};
13 | NSError *clientError;
14 |
15 | NSURLRequest *request = [[[Twitter sharedInstance] APIClient] URLRequestWithMethod:@"GET" URL:@"https://api.twitter.com/1.1/search/tweets.json" parameters:params error:&clientError];
16 |
17 | if (request) {
18 | [client sendTwitterRequest:request completion:^(NSURLResponse *response, NSData *data, NSError *connectionError) {
19 | if (data) {
20 | // handle the response data e.g.
21 | NSError *jsonError;
22 | NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:0 error:&jsonError];
23 | NSArray *statuses = [json objectForKey:@"statuses"];
24 | callback(@[[NSNull null], statuses]);
25 | }
26 | else {
27 | NSLog(@"Error: %@", connectionError);
28 | }
29 | }];
30 | }
31 | else {
32 | NSLog(@"Error: %@", clientError);
33 | }
34 | }
35 |
36 | @end
--------------------------------------------------------------------------------
/ios/TwitterCore.framework/Headers/TWTRAPIErrorCode.h:
--------------------------------------------------------------------------------
1 | //
2 | // TWTRAPIErrorCode.h
3 | //
4 | // Copyright (c) 2015 Twitter. All rights reserved.
5 | //
6 |
7 | #import
8 |
9 | /**
10 | * The NSError domain of errors surfaced by the Twitter API.
11 | */
12 | FOUNDATION_EXPORT NSString * const TWTRAPIErrorDomain;
13 |
14 | /**
15 | * Error codes surfaced by the Twitter API.
16 | * @see https://dev.twitter.com/docs/error-codes-responses
17 | */
18 | typedef NS_ENUM(NSUInteger, TWTRAPIErrorCode) {
19 | /**
20 | * Your call could not be completed as dialed.
21 | */
22 | TWTRAPIErrorCodeCouldNotAuthenticate = 32,
23 |
24 | /**
25 | * Corresponds with an HTTP 404 - the specified resource was not found.
26 | */
27 | TWTRAPIErrorCodePageNotExist = 34,
28 |
29 | /**
30 | * Not authorized to use this endpoint.
31 | */
32 | TWTRAPIErrorCodeNotAuthorizedForEndpoint = 37,
33 |
34 | /**
35 | * Corresponds with an HTTP 403 — the access token being used belongs to a suspended user and they can't complete the action you're trying to take
36 | */
37 | TWTRAPIErrorCodeAccountSuspended = 64,
38 |
39 | /**
40 | * Corresponds to a HTTP request to a retired v1-era URL.
41 | */
42 | TWTRAPIErrorCodeAPIVersionRetired = 68,
43 |
44 | /**
45 | * The request limit for this resource has been reached for the current rate limit window.
46 | */
47 | TWTRAPIErrorCodeRateLimitExceeded = 88,
48 |
49 | /**
50 | * The access token used in the request is incorrect or has expired. Used in API v1.1.
51 | */
52 | TWTRAPIErrorCodeInvalidOrExpiredToken = 89,
53 |
54 | /**
55 | * Only SSL connections are allowed in the API, you should update your request to a secure connection. See [how to connect using SSL](https://dev.twitter.com/docs/security/using-ssl).
56 | */
57 | TWTRAPIErrorCodeSSLInvalid = 92,
58 |
59 | /**
60 | * Corresponds with an HTTP 503 - Twitter is temporarily over capacity.
61 | */
62 | TWTRAPIErrorCodeOverCapacity = 130,
63 |
64 | /**
65 | * Corresponds with an HTTP 500 - An unknown internal error occurred.
66 | */
67 | TWTRAPIErrorCodeInternalError = 131,
68 |
69 | /**
70 | * Corresponds with a HTTP 401 - it means that your oauth_timestamp is either ahead or behind our acceptable range.
71 | */
72 | TWTRAPIErrorCodeCouldNotAuthenticateTimestampOutOfRange = 135,
73 |
74 | /**
75 | * You have already favorited this status.
76 | */
77 | TWTRAPIErrorCodeAlreadyFavorited = 139,
78 |
79 | /**
80 | * Corresponds with HTTP 403 — returned when a user cannot follow another user due to some kind of limit.
81 | */
82 | TWTRAPIErrorCodeCannotFollowOverLimit = 161,
83 |
84 | /**
85 | * Corresponds with HTTP 403 — returned when a Tweet cannot be viewed by the authenticating user, usually due to the Tweet's author having protected their Tweets.
86 | */
87 | TWTRAPIErrorCodeNotAuthorizedToSeeStatus = 179,
88 |
89 | /**
90 | * Corresponds with HTTP 403 — returned when a Tweet cannot be posted due to the user having no allowance remaining to post. Despite the text in the error message indicating that this error is only returned when a daily limit is reached, this error will be returned whenever a posting limitation has been reached. Posting allowances have roaming windows of time of unspecified duration.
91 | */
92 | TWTRAPIErrorCodeOverDailyStatusUpdateLimit = 185,
93 |
94 | /**
95 | * The status text has been Tweeted already by the authenticated account.
96 | */
97 | TWTRAPIErrorCodeStatusIsDuplicate = 187,
98 |
99 | /**
100 | * Typically sent with 1.1 responses with HTTP code 400. The method requires authentication but it was not presented or was wholly invalid.
101 | */
102 | TWTRAPIErrorCodeBadAuthenticationData = 215,
103 |
104 | /**
105 | * We constantly monitor and adjust our filters to block spam and malicious activity on the Twitter platform. These systems are tuned in real-time. If you get this response our systems have flagged the Tweet or DM as possibly fitting this profile. If you feel that the Tweet or DM you attempted to create was flagged in error, please report the details around that to us by filing a ticket at https://support.twitter.com/forms/platform
106 | */
107 | TWTRAPIErrorCodeRequestIsAutomated = 226,
108 |
109 | /**
110 | * Returned as a challenge in xAuth when the user has login verification enabled on their account and needs to be directed to twitter.com to [generate a temporary password](https://twitter.com/settings/applications).
111 | */
112 | TWTRAPIErrorCodeUserMustVerifyLogin = 231,
113 |
114 | /**
115 | * "Bad guest token." The token has probably expired. Try calling `-[Twitter logInGuestWithCompletion:]` again later.
116 | */
117 | TWTRAPIErrorCodeBadGuestToken = 239,
118 |
119 | /**
120 | * Corresponds to a HTTP request to a retired URL.
121 | */
122 | TWTRAPIErrorCodeEndpointRetired = 251,
123 |
124 | /**
125 | * Corresponds with HTTP 403 — returned when the application is restricted from POST, PUT, or DELETE actions. See [How to appeal application suspension and other disciplinary actions](https://support.twitter.com/articles/72585).
126 | */
127 | TWTRAPIErrorCodeApplicationCannotPerformWriteAction = 261,
128 |
129 | /**
130 | * Corresponds with HTTP 403. The authenticated user account cannot mute itself.
131 | */
132 | TWTRAPIErrorCodeCannotMuteSelf = 271,
133 |
134 | /**
135 | * Corresponds with HTTP 403. The authenticated user account is not muting the account a call is attempting to unmute.
136 | */
137 | TWTRAPIErrorCodeCannotMuteSpecifiedUser = 272,
138 |
139 | /**
140 | * You have already retweeted this tweet.
141 | */
142 | TWTRAPIErrorCodeAlreadyRetweeted = 327,
143 |
144 | /**
145 | * Returned in API v1.1 when a request cannot be served due to the application's rate limit having been exhausted for the resource. See [Rate Limiting in API v1.1](https://dev.twitter.com/docs/rate-limiting/1.1).
146 | */
147 | TWTRAPIErrorCodeTooManyRequests = 429
148 | };
149 |
150 |
--------------------------------------------------------------------------------
/ios/TwitterCore.framework/Headers/TWTRAuthConfig.h:
--------------------------------------------------------------------------------
1 | //
2 | // TWTRAuthConfig.h
3 | // TwitterKit
4 | //
5 | // Copyright (c) 2015 Twitter. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | /**
11 | * Authentication configuration details. Encapsulates credentials required to authenticate a Twitter application. You can obtain your credentials at https://apps.twitter.com/.
12 | */
13 | @interface TWTRAuthConfig : NSObject
14 |
15 | /**
16 | * The consumer key of the Twitter application.
17 | */
18 | @property (nonatomic, copy, readonly) NSString *consumerKey;
19 | /**
20 | * The consumer secret of the Twitter application.
21 | */
22 | @property (nonatomic, copy, readonly) NSString *consumerSecret;
23 |
24 | /**
25 | * Returns an `TWTRAuthConfig` object initialized by copying the values from the consumer key and consumer secret.
26 | *
27 | * @param consumerKey The consumer key.
28 | * @param consumerSecret The consumer secret.
29 | */
30 | - (instancetype)initWithConsumerKey:(NSString *)consumerKey consumerSecret:(NSString *)consumerSecret;
31 |
32 | /**
33 | * Unavailable. Use `initWithConsumerKey:consumerSecret:` instead.
34 | */
35 | - (instancetype)init __attribute__((unavailable("Use -initWithConsumerKey:consumerSecret: instead.")));
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/ios/TwitterCore.framework/Headers/TWTRAuthSession.h:
--------------------------------------------------------------------------------
1 | //
2 | // TWTRAuthSession.h
3 | //
4 | // Copyright (c) 2015 Twitter. All rights reserved.
5 | //
6 |
7 | #import
8 |
9 | /**
10 | * The base session which all sessions must conform to.
11 | */
12 | @protocol TWTRBaseSession
13 | @end
14 |
15 | /**
16 | * Encapsulates the authorization details of an OAuth Session.
17 | */
18 | @protocol TWTRAuthSession
19 |
20 | @property (nonatomic, readonly, copy) NSString *authToken;
21 | @property (nonatomic, readonly, copy) NSString *authTokenSecret;
22 | @property (nonatomic, readonly, copy) NSString *userID;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/ios/TwitterCore.framework/Headers/TWTRConstants.h:
--------------------------------------------------------------------------------
1 | //
2 | // TWTRConstants.h
3 | //
4 | // Copyright (c) 2015 Twitter. All rights reserved.
5 | //
6 |
7 | #import
8 |
9 | #pragma mark - Error messages
10 |
11 | /**
12 | * The NSError domain of errors surfaced by the Twitter SDK.
13 | */
14 | FOUNDATION_EXPORT NSString * const TWTRErrorDomain;
15 |
16 | /**
17 | * Error codes surfaced by the Twitter SDK.
18 | */
19 | typedef NS_ENUM(NSInteger, TWTRErrorCode) {
20 | /**
21 | * Unknown error.
22 | */
23 | TWTRErrorCodeUnknown = -1,
24 | /**
25 | * Authentication has not been set up yet. You must call -[Twitter logInWithCompletion:] or -[Twitter logInGuestWithCompletion:]
26 | */
27 | TWTRErrorCodeNoAuthentication = 0,
28 | /**
29 | * Twitter has not been initialized yet. Call +[Fabric with:@[TwitterKit]] or -[Twitter startWithConsumerKey:consumerSecret:].
30 | */
31 | TWTRErrorCodeNotInitialized = 1,
32 | /**
33 | * User has declined to grant permission to information such as their email address.
34 | */
35 | TWTRErrorCodeUserDeclinedPermission = 2,
36 | /**
37 | * User has granted permission to their email address but no address is associated with their account.
38 | */
39 | TWTRErrorCodeUserHasNoEmailAddress = 3,
40 | /**
41 | * A resource has been requested by ID, but that ID was not found.
42 | */
43 | TWTRErrorCodeInvalidResourceID = 4,
44 | /**
45 | * A request has been issued for an invalid URL.
46 | */
47 | TWTRErrorCodeInvalidURL = 5,
48 | /**
49 | * Type mismatch in parsing JSON from the Twitter API.
50 | */
51 | TWTRErrorCodeMismatchedJSONType = 6,
52 | /**
53 | * Fail to save to keychain.
54 | */
55 | TWTRErrorCodeKeychainSerializationFailure = 7,
56 | /**
57 | * Fail to save to disk.
58 | */
59 | TWTRErrorCodeDiskSerializationError = 8,
60 | /**
61 | * Error authenticating with the webview.
62 | */
63 | TWTRErrorCodeWebViewError = 9,
64 | /**
65 | * A required parameter is missing.
66 | */
67 | TWTRErrorCodeMissingParameter = 10
68 | };
69 |
70 | /**
71 | * The NSError domain of errors surfaced by the Twitter SDK during the login operation.
72 | */
73 | FOUNDATION_EXPORT NSString * const TWTRLogInErrorDomain;
74 |
75 | /**
76 | * Error codes surfaced by the Twitter SDK with the `TWTRLogInErrorDomain` error domain.
77 | */
78 | typedef NS_ENUM(NSInteger, TWTRLogInErrorCode) {
79 | /**
80 | * Unknown error.
81 | */
82 | TWTRLogInErrorCodeUnknown = -1,
83 | /**
84 | * User denied login.
85 | */
86 | TWTRLogInErrorCodeDenied = 0,
87 | /**
88 | * User canceled login.
89 | */
90 | TWTRLogInErrorCodeCanceled = 1,
91 | /**
92 | * No Twitter account found.
93 | */
94 | TWTRLogInErrorCodeNoAccounts = 2,
95 | /**
96 | * Reverse auth with linked account failed.
97 | */
98 | TWTRLogInErrorCodeReverseAuthFailed = 3,
99 | /**
100 | * Refreshing session tokens failed.
101 | */
102 | TWTRLogInErrorCodeCannotRefreshSession = 4,
103 | /**
104 | * No such session or session is not tracked
105 | * in the associated session store.
106 | */
107 | TWTRLogInErrorCodeSessionNotFound = 5,
108 | /**
109 | * The login request failed.
110 | */
111 | TWTRLogInErrorCodeFailed = 6
112 | };
113 |
--------------------------------------------------------------------------------
/ios/TwitterCore.framework/Headers/TWTRCoreOAuthSigning.h:
--------------------------------------------------------------------------------
1 | //
2 | // TWTRCoreOAuthSigning.h
3 | //
4 | // Copyright (c) 2015 Twitter. All rights reserved.
5 | //
6 |
7 | #import
8 |
9 | FOUNDATION_EXPORT NSString * const TWTROAuthEchoRequestURLStringKey;
10 | FOUNDATION_EXPORT NSString * const TWTROAuthEchoAuthorizationHeaderKey;
11 |
12 | @protocol TWTRCoreOAuthSigning
13 |
14 | /**
15 | * @name OAuth Echo
16 | */
17 |
18 | /**
19 | * OAuth Echo is a means to securely delegate OAuth authorization to a third party while interacting with an API.
20 | * For example, you may wish to verify a user's credentials from your app's server (the third party) rather than your app.
21 | * This method provides you with the OAuth signature to add to the third party's request to `URLString`, as well as the formed
22 | * URL with the query string to send that request to.
23 | * This is equivalent to calling `-URLRequestWithMethod:URL:parameters:error:` and getting the URL and the `Authorization` HTTP header out of the request.
24 | *
25 | * @param method Request method, GET, POST, PUT, DELETE, etc.
26 | * @param URLString The full URL of the Twitter endpoint you plan to send a request to. E.g. https://api.twitter.com/1.1/account/verify_credentials.json
27 | * @param parameters Request parameters.
28 | * @param error Error in the `TWTRErrorDomain` domain. The code will be `TWTRErrorCodeInvalidURL` if the `URLString`'s host is not api.twitter.com
29 | *
30 | * @return `nil` if there's an error or a missing required parameter, or a dictionary with the fully formed request URL under `TWTROAuthEchoRequestURLStringKey` (`NSString`), and the `Authorization` header in `TWTROAuthEchoAuthorizationHeaderKey` (`NSString`), to be used to sign the request.
31 | *
32 | * @see More information about OAuth Echo: https://dev.twitter.com/oauth/echo
33 | */
34 | - (NSDictionary *)OAuthEchoHeadersForRequestMethod:(NSString *)method URLString:(NSString *)URLString parameters:(NSDictionary *)parameters error:(NSError **)error __attribute__((nonnull(1, 2)));
35 |
36 | /**
37 | * This method provides you with the OAuth signature, as well as the formed URL with the query string, to send a request to `verify_credentials`.
38 | *
39 | * @return A dictionary with the fully formed Request URL under `TWTROAuthEchoRequestURLStringKey` (`NSString`), and the `Authorization` header in `TWTROAuthEchoAuthorizationHeaderKey` (`NSString`), to be used to sign the request.
40 | *
41 | * @see More information about OAuth Echo: https://dev.twitter.com/oauth/echo
42 | * @see More information about Verify Credentials: https://dev.twitter.com/rest/reference/get/account/verify_credentials
43 | */
44 | - (NSDictionary *)OAuthEchoHeadersToVerifyCredentials;
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/ios/TwitterCore.framework/Headers/TWTRDefines.h:
--------------------------------------------------------------------------------
1 | //
2 | // TWTRDefines.h
3 | //
4 | // Copyright (c) 2015 Twitter. All rights reserved.
5 | //
6 |
7 | #pragma once
8 |
9 | #if __has_feature(nullability)
10 | #define twtr_nullable nullable
11 | #define twtr_nonnull nonnull
12 | #define twtr_null_unspecified null_unspecified
13 | #define twtr_null_resettable null_resettable
14 | #define __twtr_nullable __nullable
15 | #define __twtr_nonnull __nonnull
16 | #define __twtr_null_unspecified __null_unspecified
17 | #else
18 | #define twtr_nullable
19 | #define twtr_nonnull
20 | #define twtr_null_unspecified
21 | #define twtr_null_resettable
22 | #define __twtr_nullable
23 | #define __twtr_nonnull
24 | #define __twtr_null_unspecified
25 | #endif
26 |
27 | #ifndef NS_ASSUME_NONNULL_BEGIN
28 | #define NS_ASSUME_NONNULL_BEGIN
29 | #endif
30 |
31 | #ifndef NS_ASSUME_NONNULL_END
32 | #define NS_ASSUME_NONNULL_END
33 | #endif
34 |
--------------------------------------------------------------------------------
/ios/TwitterCore.framework/Headers/TWTRGuestSession.h:
--------------------------------------------------------------------------------
1 | //
2 | // TWTRGuestSession.h
3 | // TwitterKit
4 | //
5 | // Copyright (c) 2015 Twitter. All rights reserved.
6 | //
7 |
8 | #import
9 | #import "TWTRAuthSession.h"
10 |
11 | @class TWTRGuestSession;
12 |
13 | NS_ASSUME_NONNULL_BEGIN
14 |
15 | /**
16 | * Completion block called when guest login succeeds or fails.
17 | *
18 | * @param guestSession A `TWTRGuestSession` containing the OAuth tokens or nil.
19 | * @param error Error that will be non nil if the authentication request failed.
20 | */
21 | typedef void (^TWTRGuestLogInCompletion)(TWTRGuestSession * __twtr_nullable guestSession, NSError * __twtr_nullable error);
22 |
23 | /**
24 | * `TWTRGuestSession` represents a guest session authenticated with the Twitter API. See `TWTRSession` for user sessions.
25 | */
26 | @interface TWTRGuestSession : NSObject
27 |
28 | /**
29 | * The bearer access token for guest auth.
30 | */
31 | @property (nonatomic, copy, readonly) NSString *accessToken;
32 |
33 | /**
34 | * The guest access token.
35 | */
36 | @property (nonatomic, copy, readonly) NSString *guestToken;
37 |
38 | /**
39 | * Returns an `TWTRGuestSession` object initialized by copying the values from the dictionary or nil if the dictionary is missing.
40 | *
41 | * @param sessionDictionary (required) The dictionary received after successfull authentication from Twitter guest-only authentication.
42 | */
43 | - (instancetype)initWithSessionDictionary:(NSDictionary *)sessionDictionary;
44 |
45 | /**
46 | * Returns a `TWTRGuestSession` object
47 | *
48 | * @param accessToken the access token
49 | * @param guestToken the guest access token
50 | */
51 | - (instancetype)initWithAccessToken:(NSString *)accessToken guestToken:(twtr_nullable NSString *)guestToken NS_DESIGNATED_INITIALIZER;
52 |
53 | /**
54 | * Unavailable. Use `-initWithSessionDictionary:` instead.
55 | */
56 | - (instancetype)init __attribute__((unavailable("Use -initWithSessionDictionary: or initWithAccessToken:guestToken: instead.")));
57 |
58 | @end
59 |
60 | NS_ASSUME_NONNULL_END
61 |
--------------------------------------------------------------------------------
/ios/TwitterCore.framework/Headers/TWTRSession.h:
--------------------------------------------------------------------------------
1 | //
2 | // TWTRSession.h
3 | //
4 | // Copyright (c) 2015 Twitter. All rights reserved.
5 | //
6 |
7 | #import "TWTRAuthConfig.h"
8 | #import "TWTRAuthSession.h"
9 | #import "TWTRGuestSession.h"
10 |
11 | @class TWTRSession;
12 |
13 | NS_ASSUME_NONNULL_BEGIN
14 |
15 | /**
16 | * Completion block called when user login succeeds or fails.
17 | *
18 | * @param session Contains the OAuth tokens and minimal information associated with the logged in user or nil.
19 | * @param error Error that will be non nil if the authentication request failed.
20 | */
21 | typedef void (^TWTRLogInCompletion)(TWTRSession * __twtr_nullable session, NSError * __twtr_nullable error);
22 |
23 | /**
24 | * TWTRSession represents a user's session authenticated with the Twitter API.
25 | */
26 | @interface TWTRSession : NSObject
27 |
28 | /**
29 | * The authorization token.
30 | */
31 | @property (nonatomic, copy, readonly) NSString *authToken;
32 | /**
33 | * The authorization token secret.
34 | */
35 | @property (nonatomic, copy, readonly) NSString *authTokenSecret;
36 | /**
37 | * The username associated with the access token.
38 | */
39 | @property (nonatomic, copy, readonly) NSString *userName;
40 | /**
41 | * The user ID associated with the access token.
42 | */
43 | @property (nonatomic, copy, readonly) NSString *userID;
44 |
45 | /**
46 | * Returns an `TWTRSession` object initialized by copying the values from the dictionary or nil if the dictionary is missing.
47 | *
48 | * @param sessionDictionary (required) The dictionary received after successfull authentication from Twitter OAuth.
49 | */
50 | - (instancetype)initWithSessionDictionary:(NSDictionary *)sessionDictionary;
51 |
52 | /**
53 | * Returns an `TWTRSession` object initialized by copying the given tokens and user info.
54 | *
55 | * @param authToken (required) The authorization token for the session
56 | * @param authTokenSecret (required) The authorization token secret for the session
57 | * @param userName (required) The username for the user associated with the session.
58 | * @param userID (required) The unique ID for the user associated with the session.
59 | *
60 | * @return A `TWTRSession` object initialized with the provided parameters.
61 | */
62 | - (instancetype)initWithAuthToken:(NSString *)authToken authTokenSecret:(NSString *)authTokenSecret userName:(NSString *)userName userID:(NSString *)userID NS_DESIGNATED_INITIALIZER;
63 |
64 | /**
65 | * Unavailable. Use -initWithSessionDictionary: instead.
66 | */
67 | - (instancetype)init __attribute__((unavailable("Use -initWithSessionDictionary: instead.")));
68 |
69 | @end
70 |
71 | NS_ASSUME_NONNULL_END
72 |
--------------------------------------------------------------------------------
/ios/TwitterCore.framework/Headers/TWTRSessionStore.h:
--------------------------------------------------------------------------------
1 | //
2 | // TWTRSessionStore.h
3 | // TwitterCore
4 | //
5 | // Copyright (c) 2015 Twitter Inc. All rights reserved.
6 | //
7 |
8 | @class TWTRAuthConfig;
9 | @class TWTRGuestSession;
10 | @class TWTRSession;
11 | @protocol TWTRAuthSession;
12 | @protocol TWTRAPIServiceConfig;
13 | @protocol TWTRErrorLogger;
14 |
15 | NS_ASSUME_NONNULL_BEGIN
16 |
17 | #pragma mark - TWTRSessionRefreshingStore Protocol
18 |
19 | /**
20 | * Completion block called when a session refresh succeeds or fails.
21 | *
22 | * @param refreshedSession The refreshed session
23 | * @param error Error that will be non nil if the refresh request failed
24 | */
25 | typedef void (^TWTRSessionStoreRefreshCompletion)(id __twtr_nullable refreshedSession, NSError * __twtr_nullable error);
26 |
27 | /**
28 | * Protocol for session stores that can refresh expired sessions.
29 | */
30 | @protocol TWTRSessionRefreshingStore
31 |
32 | /**
33 | * Refresh an expired session.
34 | *
35 | * @param sessionClass The class of the session
36 | * @param sessionID ID of the session wherever applicable e.g. `userID` if it's a user session.
37 | * @param completion The completion block to call when the refresh request succeeds or fails.
38 | */
39 | - (void)refreshSessionClass:(Class)sessionClass sessionID:(twtr_nullable NSString *)sessionID completion:(TWTRSessionStoreRefreshCompletion)completion;
40 |
41 | /**
42 | * Determines whether the given session has expired.
43 | *
44 | * @param session The session to check for expiration
45 | * @param response API request response to check for expiration
46 | *
47 | * @return Whether the session has expired.
48 | */
49 | - (BOOL)isExpiredSession:(id)session response:(NSHTTPURLResponse *)response;
50 |
51 | /**
52 | * Determines whether the given session has expired based on a given error.
53 | *
54 | * @param session The session to check for expiration
55 | * @param error API request error to check for expiration
56 | *
57 | * @return Whether the session has expired.
58 | */
59 | - (BOOL)isExpiredSession:(id)session error:(NSError *)error;
60 |
61 | @end
62 |
63 | #pragma mark - TWTRUserSessionStore Protocol
64 |
65 | /**
66 | * Completion block called when a user session saved to the session store or fails.
67 | *
68 | * @param session The saved session
69 | * @param error Error that will be non nil if the save request fails.
70 | */
71 | typedef void (^TWTRSessionStoreSaveCompletion)(id __twtr_nullable session, NSError * __twtr_nullable error);
72 |
73 | /**
74 | * Completion block called when fetching all stored user sessions completes or fails.
75 | *
76 | * @param sessions All stored user sessions or empty array if there are no user sessions found.
77 | */
78 | typedef void (^TWTRSessionStoreBatchFetchCompletion)(NSArray *sessions);
79 |
80 | /**
81 | * Completion block to call when the session is deleted or fails.
82 | *
83 | * @param session The deleted session or nil if none was found for the user.
84 | */
85 | typedef void (^TWTRSessionStoreDeleteCompletion)(id __twtr_nullable session);
86 |
87 | /**
88 | * Protocol for session store that manages user sessions.
89 | */
90 | @protocol TWTRUserSessionStore
91 |
92 | /**
93 | * Saves the existing session to the store after validations.
94 | *
95 | * @param session The user session to save
96 | * @param completion Completion block to call when the save request succeeds or fails
97 | */
98 | - (void)saveSession:(id)session completion:(TWTRSessionStoreSaveCompletion)completion;
99 |
100 | /**
101 | * Fetches the user session for for the given auth tokens and saves it to the store after validations.
102 | *
103 | * @param authToken The existing authToken to use for authentication.
104 | * @param authTokenSecret The existing authTokenSecret to use for authentication.
105 | * @param completion Completion block to call when the save request succeeds or fails
106 | */
107 | - (void)saveSessionWithAuthToken:(NSString *)authToken authTokenSecret:(NSString *)authTokenSecret completion:(TWTRSessionStoreSaveCompletion)completion;
108 |
109 | /**
110 | * Checks to see if the user is logged in and has a saved session.
111 | *
112 | * @param userID The user ID to fetch session for.
113 | */
114 | - (twtr_nullable id)sessionForUserID:(NSString *)userID;
115 |
116 | /**
117 | * Retrieve all logged in user sessions in ascending order of last saved date
118 | *
119 | * @note This is a blocking call.
120 | */
121 | - (NSArray *)existingUserSessions;
122 |
123 | /**
124 | * Retrieves the last logged in user session.
125 | *
126 | * @return The last logged in user session.
127 | */
128 | - (twtr_nullable id)session;
129 |
130 | /**
131 | * Deletes the local Twitter user session from this app. This will not remove the system Twitter account nor make a network request to invalidate the session.
132 | *
133 | * @param userID ID of the user to log out
134 | */
135 | - (void)logOutUserID:(NSString *)userID;
136 |
137 | @end
138 |
139 | #pragma mark - TWTRGuestSessionStore Protocol
140 |
141 | /**
142 | * Completion block called when retrieving a guest session succeeds or fails.
143 | *
144 | * @param guestSession The retrieved guest session
145 | * @param error Error that will be non nil if the save request fails.
146 | */
147 | typedef void (^TWTRSessionGuestLogInCompletion)(TWTRGuestSession * __twtr_nullable guestSession, NSError * __twtr_nullable error);
148 |
149 | /**
150 | * Protocol for session stores that can manage guest sessions.
151 | */
152 | @protocol TWTRGuestSessionStore
153 |
154 | /**
155 | * Log in as a guest user and return the guest session. This can be used when the user is not a Twitter user.
156 | *
157 | * @param completion Completion block to call when the authentication succeeds or fails.
158 | *
159 | * @warning This method assumes your application, as indicated by the `consumerKey` and `consumerSecret` in the `authConfig`, has been whitelisted for guest authentication.
160 | */
161 | - (void)fetchGuestSessionWithCompletion:(TWTRSessionGuestLogInCompletion)completion;
162 |
163 | @end
164 |
165 | #pragma mark - Composite TWTRSessionStore Protocol
166 |
167 | /**
168 | * Convenience composite protocol of a store that handles user, guest, and refreshable sessions.
169 | */
170 | @protocol TWTRSessionStore
171 |
172 | /**
173 | * Returns the store's auth config.
174 | */
175 | @property (nonatomic, readonly) TWTRAuthConfig *authConfig;
176 |
177 | @end
178 |
179 |
180 | #pragma mark - Concrete Session Store Class
181 |
182 | /**
183 | * Concrete implementation of . This session store supports fetching and storage of
184 | * user and guest sessions. In addition, the session store also supports refreshing of such sessions when they expire.
185 | *
186 | * @warning Instances of the session manager at the same path are not synchronized. The session store
187 | * will simply choose the latest version in the case of conflicts.
188 | */
189 | @interface TWTRSessionStore : NSObject
190 |
191 | - (instancetype)init __unavailable;
192 |
193 | /**
194 | * Provides a mechanism for reloading the session store. This method will force the session store
195 | * to find any sessions that may have been saved by another session store or application that is
196 | * using the same keychain access groups.
197 | *
198 | * Most applications will not need to call this method. You may need to call this method if you are
199 | * using multiple stores within your application and you need to synchronize when one writes to the
200 | * store. The more likely case for needing to call this method is if you are sharing credentials
201 | * between applications. In this situation you will want to call this method when the application
202 | * comes back to the foreground.
203 | *
204 | * This method does not need to be called when the store is created because this process happens
205 | * by default at time of instantiation.
206 | *
207 | * You should avoid calling this method if you do not have a specific reason to do so, like the reasons
208 | * mentioned above as this method does cause disk I/O and multiple calls can cause performance problems.
209 | */
210 | - (void)reloadSessionStore;
211 |
212 | @end
213 |
214 | NS_ASSUME_NONNULL_END
215 |
--------------------------------------------------------------------------------
/ios/TwitterCore.framework/Headers/TwitterCore.h:
--------------------------------------------------------------------------------
1 | //
2 | // TwitterCore.h
3 | //
4 | // Copyright (c) 2015 Twitter. All rights reserved.
5 | //
6 |
7 | #if __has_feature(modules)
8 | @import Accounts;
9 | @import CoreData;
10 | @import Foundation;
11 | @import Social;
12 | @import UIKit;
13 | #else
14 | #import
15 | #import
16 | #import
17 | #import
18 | #import
19 | #endif
20 |
21 | #import "TWTRAPIErrorCode.h"
22 | #import "TWTRAuthConfig.h"
23 | #import "TWTRAuthSession.h"
24 | #import "TWTRConstants.h"
25 | #import "TWTRCoreOAuthSigning.h"
26 | #import "TWTRDefines.h"
27 | #import "TWTRGuestSession.h"
28 | #import "TWTRSession.h"
29 | #import "TWTRSessionStore.h"
30 |
--------------------------------------------------------------------------------
/ios/TwitterCore.framework/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BuildMachineOSBuild
6 | 14F27
7 | CFBundleDevelopmentRegion
8 | English
9 | CFBundleGetInfoString
10 | TwitterCore Framework
11 | CFBundleIdentifier
12 | com.twittercore.sdk.ios
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | TwitterCore
17 | CFBundlePackageType
18 | FMWK
19 | CFBundleShortVersionString
20 | 1.11.4
21 | CFBundleSupportedPlatforms
22 |
23 | iPhoneOS
24 |
25 | CFBundleVersion
26 | 1.11.4
27 | DTCompiler
28 | com.apple.compilers.llvm.clang.1_0
29 | DTPlatformBuild
30 | 13A340
31 | DTPlatformName
32 | iphoneos
33 | DTPlatformVersion
34 | 9.0
35 | DTSDKBuild
36 | 13A340
37 | DTSDKName
38 | iphoneos9.0
39 | DTXcode
40 | 0701
41 | DTXcodeBuild
42 | 7A1001
43 | MinimumOSVersion
44 | 7.0
45 | NSHumanReadableCopyright
46 | Copyright 2015 Twitter Inc.
47 | UIDeviceFamily
48 |
49 | 1
50 | 2
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/ios/TwitterCore.framework/Modules/module.modulemap:
--------------------------------------------------------------------------------
1 | framework module TwitterCore {
2 | umbrella header "TwitterCore.h"
3 |
4 | export *
5 | module * { export * }
6 |
7 | link framework "Accounts"
8 | link framework "CoreData"
9 | link framework "Social"
10 |
11 | header "TwitterCore.h"
12 | header "TWTRAPIErrorCode.h"
13 | header "TWTRAuthConfig.h"
14 | header "TWTRAuthSession.h"
15 | header "TWTRConstants.h"
16 | header "TWTRCoreOAuthSigning.h"
17 | header "TWTRDefines.h"
18 | header "TWTRGuestSession.h"
19 | header "TWTRSession.h"
20 | header "TWTRSessionStore.h"
21 | }
22 |
--------------------------------------------------------------------------------
/ios/TwitterCore.framework/TwitterCore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterCore.framework/TwitterCore
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Headers/TWTRAPIClient.h:
--------------------------------------------------------------------------------
1 | //
2 | // TWTRAPIClient.h
3 | //
4 | // Copyright (c) 2015 Twitter. All rights reserved.
5 | //
6 |
7 | @class TWTRUser;
8 | @class TWTRTweet;
9 | @class TWTRAuthConfig;
10 | @class TWTRGuestSession;
11 | @protocol TWTRAuthSession;
12 | @protocol TWTRSessionStore;
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
16 | FOUNDATION_EXPORT NSString * const TWTRTweetsNotLoadedKey;
17 |
18 | /**
19 | * @name Completion Block Types
20 | */
21 |
22 | /**
23 | * Completion block called when the load user request succeeds or fails.
24 | *
25 | * @param user The Twitter User.
26 | * @param error Error that will be set if the API request failed.
27 | */
28 | typedef void (^TWTRLoadUserCompletion)(TWTRUser * __twtr_nullable user, NSError * __twtr_nullable error);
29 |
30 | /**
31 | * Completion block called when the load Tweet request succeeds or fails.
32 | *
33 | * @param tweet The Twitter Tweet.
34 | * @param error Error that will be set if the API request failed.
35 | */
36 | typedef void (^TWTRLoadTweetCompletion)(TWTRTweet * __twtr_nullable tweet, NSError * __twtr_nullable error);
37 |
38 | /**
39 | * Completion block called when the load Tweets request succeeds or fails.
40 | *
41 | * @param tweets Tweets that were successfully retrieved.
42 | * @param error Error that will be set if the API request failed.
43 | */
44 | typedef void (^TWTRLoadTweetsCompletion)(NSArray * __twtr_nullable tweets, NSError * __twtr_nullable error);
45 |
46 | /**
47 | * Completion block called when the network request succeeds or fails.
48 | *
49 | * @param response Metadata associated with the response to a URL load request.
50 | * @param data Content data of the response.
51 | * @param connectionError Error object describing the network error that occurred.
52 | */
53 | typedef void (^TWTRNetworkCompletion)(NSURLResponse * __twtr_nullable response, NSData * __twtr_nullable data, NSError * __twtr_nullable connectionError);
54 |
55 | /**
56 | * Completion block called when a JSON request to the Twitter API succeeds or fails.
57 | *
58 | * @param response Metadata associated with the response to a URL load request.
59 | * @param responseObject Content data of the response.
60 | * @param error Error object describing the network error that occurred.
61 | */
62 | typedef void (^TWTRJSONRequestCompletion)(NSURLResponse * __twtr_nullable response, id __twtr_nullable responseObject, NSError * __twtr_nullable error);
63 |
64 | /**
65 | * Completion block called when a Tweet action (favorite/retweet) is performed.
66 | *
67 | * @param response Metadata associated with the response to a URL load request.
68 | * @param tweet The Tweet object representing the new state of this Tweet from
69 | * the perspective of the currently-logged in user.
70 | * @param error Error object describing the error that occurred. This will be either a
71 | * network error or an NSError with an errorCode corresponding to
72 | * TWTRAPIErrorCodeAlreadyFavorited or TWTRAPIErrorCodeAlreadyRetweeted
73 | * for an attempted action that has already been taken from the servers
74 | * point of view for this logged-in user.
75 | */
76 | typedef void (^TWTRTweetActionCompletion)(TWTRTweet * __twtr_nullable tweet, NSError * __twtr_nullable error);
77 |
78 | /**
79 | * Client for consuming the Twitter REST API. Provides methods for common API requests, as well as the ability to create and send custom requests.
80 | */
81 | @interface TWTRAPIClient : NSObject
82 |
83 | /**
84 | * The Twitter user ID this client is making API requests on behalf of or
85 | * nil if it is a guest user.
86 | */
87 | @property (nonatomic, copy, readonly, twtr_nullable) NSString *userID;
88 |
89 |
90 | /**
91 | * Constructs a `TWTRAPIClient` object to perform authenticated API requests with user authentication.
92 | *
93 | * @param userID (optional) ID of the user to make requests on behalf of. If the ID is nil requests will be made using guest authentication.
94 | *
95 | * @return Fully initialized API client to make authenticated requests against the Twitter REST API.
96 | */
97 | - (instancetype)initWithUserID:(twtr_nullable NSString *)userID;
98 |
99 | /**
100 | * @name Making Requests
101 | */
102 |
103 | /**
104 | * Returns a signed URL request.
105 | *
106 | * @param method Request method, GET, POST, PUT, DELETE, etc.
107 | * @param URL Request URL. This is the full Twitter API URL. E.g. https://api.twitter.com/1.1/statuses/user_timeline.json
108 | * @param parameters Request parameters.
109 | * @param error Error that will be set if there was an error signing the request.
110 | *
111 | * @note If the request is not sent with the -[TWTRAPIClient sendTwitterRequest:completion:] method it is the developers responsibility to ensure that there is a valid guest session before this method is called.
112 | */
113 | - (NSURLRequest *)URLRequestWithMethod:(NSString *)method URL:(NSString *)URLString parameters:(NSDictionary *)parameters error:(NSError **)error;
114 |
115 | /**
116 | * Sends a Twitter request.
117 | *
118 | * @param request The request that will be sent asynchronously.
119 | * @param completion Completion block to be called on response. Called on main queue.
120 | */
121 | - (void)sendTwitterRequest:(NSURLRequest *)request completion:(TWTRNetworkCompletion)completion;
122 |
123 | /**
124 | * @name Common API Actions
125 | */
126 |
127 | /**
128 | * Loads a Twitter User.
129 | *
130 | * @param userID (required) The Twitter user ID of the desired user.
131 | * @param completion Completion block to be called on response. Called on main queue.
132 | */
133 | - (void)loadUserWithID:(NSString *)userID completion:(TWTRLoadUserCompletion)completion;
134 |
135 | /**
136 | * Loads a single Tweet from the network or cache.
137 | *
138 | * @param tweetID (required) The ID of the desired Tweet.
139 | * @param completion Completion bock to be called on response. Called on main queue.
140 | */
141 | - (void)loadTweetWithID:(NSString *)tweetID completion:(TWTRLoadTweetCompletion)completion;
142 |
143 | /**
144 | * Loads a series of Tweets in a batch. The completion block will be passed an array of zero or more
145 | * Tweets that loaded successfully. If some Tweets fail to load the array will contain less Tweets than
146 | * number of requested IDs. If any Tweets fail to load, the IDs of the Tweets that did not load will
147 | * be provided in the userInfo dictionary property of the error parameter under `TWTRTweetsNotLoadedKey`.
148 | *
149 | * @param tweetIDStrings (required) An array of Tweet IDs.
150 | * @param completion Completion block to be called on response. Called on main queue.
151 | */
152 | - (void)loadTweetsWithIDs:(NSArray *)tweetIDStrings completion:(TWTRLoadTweetsCompletion)completion;
153 |
154 | @end
155 |
156 | NS_ASSUME_NONNULL_END
157 |
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Headers/TWTRCollectionTimelineDataSource.h:
--------------------------------------------------------------------------------
1 | //
2 | // TWTRCollectionTimelineDataSource.h
3 | // TwitterKit
4 | //
5 | // Created by Steven Hepting on 2/10/15.
6 | // Copyright (c) 2015 Twitter. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "TWTRTimelineDataSource.h"
11 |
12 | @class TWTRAPIClient;
13 |
14 | @interface TWTRCollectionTimelineDataSource : NSObject
15 |
16 | /**
17 | * The number of Tweets to request in each query to the Twitter Timeline API when fetching the next batch of Tweets.
18 | */
19 | @property (nonatomic, assign, readonly) NSInteger maxTweetsPerRequest;
20 |
21 | /**
22 | * Convenience initializer.
23 | *
24 | * @param collectionID (required) The ID of this collection. For example, the ID of this collection: https://twitter.com/TwitterMusic/timelines/393773266801659904 is @"393773266801659904"
25 | *
26 | * @return An instance of TWTRCollectionTimelineDataSource or nil if any of the required parameters is missing.
27 | */
28 | - (instancetype)initWithCollectionID:(NSString *)collectionID APIClient:(TWTRAPIClient *)client __attribute__((nonnull));
29 |
30 | /**
31 | * Designated initializer setting all supported values for Collection Timeline Data Source.
32 | *
33 | * @param collectionID (required) The Collection ID value. e.g. @"393773266801659904"
34 | * @param apiClient (required) The API client to use for all network requests.
35 | * @param maxTweetsPerRequest (optional) Number of Tweets to request per batch. A value of 0 uses the server default.
36 | *
37 | * @return An instance of TWTRCollectionTimelineDataSource or nil if any of the required parameters are missing.
38 | */
39 | - (instancetype)initWithCollectionID:(NSString *)collectionID APIClient:(TWTRAPIClient *)client maxTweetsPerRequest:(NSUInteger)maxTweetsPerRequest __attribute__((nonnull)) NS_DESIGNATED_INITIALIZER;
40 |
41 | - (instancetype)init __unavailable;
42 |
43 | @end
44 |
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Headers/TWTRComposer.h:
--------------------------------------------------------------------------------
1 | //
2 | // TWTRComposer.h
3 | // TwitterKit
4 | //
5 | // Copyright (c) 2015 Twitter. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | NS_ASSUME_NONNULL_BEGIN
11 |
12 | /**
13 | * Possible values for the result parameter of the completionHandler property.
14 | */
15 | typedef NS_ENUM(NSInteger, TWTRComposerResult) {
16 | /**
17 | * The composer is dismissed without sending the Tweet (i.e. the user selects Cancel, or the account is unavailable).
18 | */
19 | TWTRComposerResultCancelled,
20 |
21 | /**
22 | * The composer is dismissed and the message is being sent in the background, after the user selects Done.
23 | */
24 | TWTRComposerResultDone
25 | };
26 |
27 | /**
28 | * Completion block called when the user finishes composing a Tweet.
29 | */
30 | typedef void (^TWTRComposerCompletion)(TWTRComposerResult result);
31 |
32 | /**
33 | * The TWTRComposer class presents a view to the user to compose a Tweet.
34 | */
35 | @interface TWTRComposer : NSObject
36 |
37 | /**
38 | * Sets the initial text for the Tweet composition prior to showing it.
39 | *
40 | * @param text The text to tweet.
41 | *
42 | * @return This will return NO if the receiver has already been presented (and therefore cannot be changed).
43 | */
44 | - (BOOL)setText:(twtr_nullable NSString *)text;
45 |
46 | /**
47 | * Sets an image attachment.
48 | *
49 | * @param image The image to attach.
50 | *
51 | * @return This will return NO if the receiver has already been presented (and therefore cannot be changed).
52 | */
53 | - (BOOL)setImage:(twtr_nullable UIImage *)image;
54 |
55 | /**
56 | * Adds a URL to the contents of the Tweet message.
57 | *
58 | * @param url The URL.
59 | *
60 | * @return This will return NO if the receiver has already been presented (and therefore cannot be changed).
61 | */
62 | - (BOOL)setURL:(twtr_nullable NSURL *)url;
63 |
64 | /**
65 | * Presents the composer, with an optional completion handler from the specified view controller.
66 | * @param fromController The controller in which to present the composer from.
67 | * @param completion completion The completion handler, which has a single parameter indicating whether the user finished or cancelled the Tweet composition.
68 | */
69 | - (void)showFromViewController:(UIViewController *)fromController completion:(TWTRComposerCompletion)completion;
70 |
71 | @end
72 |
73 | @interface TWTRComposer (TWTRDeprecated)
74 |
75 | /**
76 | * Presents the composer, with an optional completion handler.
77 | *
78 | * @param completion The completion handler, which has a single parameter indicating whether the user finished or cancelled the Tweet composition.
79 | *
80 | * @warning This method is deprecated. Use `-showFromViewController:completion:` instead.
81 | */
82 | - (void)showWithCompletion:(TWTRComposerCompletion)completion;
83 |
84 | @end
85 |
86 | NS_ASSUME_NONNULL_END
87 |
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Headers/TWTRListTimelineDataSource.h:
--------------------------------------------------------------------------------
1 | //
2 | // TWTRListTimelineDataSource.h
3 | // TwitterKit
4 | //
5 | // Copyright (c) 2015 Twitter. All rights reserved.
6 | //
7 |
8 | #import
9 | #import "TWTRTimelineDataSource.h"
10 |
11 | @class TWTRAPIClient;
12 |
13 | NS_ASSUME_NONNULL_BEGIN
14 |
15 | /**
16 | * Data source representing a list of Tweets. These Tweets are ordered chronologically with the most recent first.
17 | *
18 | * @see https://dev.twitter.com/rest/reference/get/lists/statuses
19 | */
20 | @interface TWTRListTimelineDataSource : NSObject
21 |
22 | /**
23 | * The ID of the list to show Tweets for. Either the `listID` or the `listSlug` and `listOwnerScreenName` are required.
24 | */
25 | @property (nonatomic, copy, readonly) NSString *listID;
26 |
27 | /**
28 | * The slug of the list to show Tweets for. Either the `listID` or the `listSlug` and `listOwnerScreenName` are required.
29 | */
30 | @property (nonatomic, copy, readonly) NSString *listSlug;
31 |
32 | /**
33 | * Screen name of the owner of the list as specified by the `listSlug`. Either the `listID` or the `listSlug` and `listOwnerScreenName` are required.
34 | */
35 | @property (nonatomic, copy, readonly) NSString *listOwnerScreenName;
36 |
37 | /**
38 | * The number of Tweets to request in each query to the Twitter Timeline API when fetching the next batch of Tweets. Will request 30 Tweets by default. Setting this value to 0 will use the server default.
39 | */
40 | @property (nonatomic, assign, readonly) NSUInteger maxTweetsPerRequest;
41 |
42 | /**
43 | * Whether to request retweets in the set of Tweets from the server.
44 | *
45 | * Defaults to YES.
46 | */
47 | @property (nonatomic, assign, readonly) BOOL includeRetweets;
48 |
49 | /**
50 | * Convenience initializer. Uses default values for `maxTweetsPerRequest` and `includeRetweets`.
51 | *
52 | * @param listID (required) The ID of the list.
53 | * @param client (required) The API client to use for making network requests.
54 | *
55 | * @return A full initialized list timeline datasource.
56 | */
57 | - (instancetype)initWithListID:(NSString *)listID APIClient:(TWTRAPIClient *)client;
58 |
59 | /**
60 | * Convenience initializer. Uses default values for `maxTweetsPerRequest` and `includeRetweets`.
61 | *
62 | * @param listSlug (required) The slug of the list.
63 | * @param listOwnerScreenName (required) The list owner's screen name.
64 | * @param client (required) The API client to use for making network requests.
65 | *
66 | * @return A full initialized list timeline datasource.
67 | */
68 | - (instancetype)initWithListSlug:(NSString *)listSlug listOwnerScreenName:(NSString *)listOwnerScreenName APIClient:(TWTRAPIClient *)client;
69 |
70 | /**
71 | * Designated initializer for creating list timeline data sources taking all parameters.
72 | *
73 | * @param listID (optional) The ID of the list. Provide either the `listID` or `listSlug` and `listOwnerScreenName`.
74 | * @param listSlug (optional) The slug of the list. Provide either the `listID` or `listSlug` and `listOwnerScreenName`.
75 | * @param listOwnerScreenName (optional) The list owner's screen name. Provide either the `listID` or `listSlug` and `listOwnerScreenName`.
76 | * @param client (required) The API client to use for making networking requests
77 | * @param maxTweetsPerRequest (optional) The number of Tweets per batch to request. A value of 0 will use the server default.
78 | * @param includeRetweets (optional) Whether retweets should be requested.
79 | *
80 | * @return A fully initialized list timeline datasource.
81 | */
82 | - (instancetype)initWithListID:(NSString * __twtr_nullable)listID listSlug:(NSString * __twtr_nullable)listSlug listOwnerScreenName:(NSString * __twtr_nullable)listOwnerScreenName APIClient:(TWTRAPIClient *)client maxTweetsPerRequest:(NSUInteger)maxTweetsPerRequest includeRetweets:(BOOL)includeRetweets NS_DESIGNATED_INITIALIZER;
83 |
84 | - (instancetype)init __unavailable;
85 |
86 | @end
87 |
88 | NS_ASSUME_NONNULL_END
89 |
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Headers/TWTRLogInButton.h:
--------------------------------------------------------------------------------
1 | //
2 | // TWTRLogInButton.h
3 | // TwitterKit
4 | //
5 | // Copyright (c) 2015 Twitter. All rights reserved.
6 | //
7 |
8 | #import
9 | #import
10 |
11 | /**
12 | * A Button which launches the sign in to Twitter flow when tapped.
13 | */
14 | @interface TWTRLogInButton : UIButton
15 |
16 | /**
17 | * The completion block to be called with a `TWTRSession` if successful,
18 | * and a `NSError` if logging in failed or was canceled.
19 | */
20 | @property (nonatomic, copy) TWTRLogInCompletion logInCompletion;
21 |
22 | /**
23 | * Returns a new log in button which launches Twitter log in when tapped and
24 | * calls `completion` when logging in succeeds or fails.
25 | *
26 | * Internally, this button simply calls `-[Twitter logInWithCompletion:]`.
27 | *
28 | * @param completion The completion to be called with a `TWTRSession` if successful,
29 | * and a `NSError` if logging in failed or was canceled.
30 | * @return An initialized `TWTRLogInButton`.
31 | */
32 | + (instancetype)buttonWithLogInCompletion:(TWTRLogInCompletion)completion;
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Headers/TWTROAuthSigning.h:
--------------------------------------------------------------------------------
1 | //
2 | // TWTROAuthSigning.h
3 | //
4 | // Copyright (c) 2015 Twitter. All rights reserved.
5 | //
6 |
7 | #import
8 |
9 | @class TWTRAuthConfig;
10 | @class TWTRSession;
11 |
12 | /**
13 | * This class provides tools to generate OAuth signatures.
14 | */
15 | @interface TWTROAuthSigning : NSObject
16 |
17 | /**
18 | * @name Initialization
19 | */
20 |
21 | /**
22 | * Instantiate a `TWTROAuthSigning` object with the parameters it needs to generate the OAuth signatures.
23 | *
24 | * @param authConfig (required) Encapsulates credentials required to authenticate a Twitter application.
25 | * @param authSession (required) Encapsulated credentials associated with a user session.
26 | *
27 | * @return An initialized `TWTROAuthSigning` object or nil if any of the parameters are missing.
28 | *
29 | * @note If you want to generate OAuth Echo headers to verify Digits' credentials, see `DGTOAuthSigning`.
30 | *
31 | * @see TWTRAuthConfig
32 | * @see TWTRSession
33 | */
34 | - (instancetype)initWithAuthConfig:(TWTRAuthConfig *)authConfig authSession:(TWTRSession *)authSession NS_DESIGNATED_INITIALIZER;
35 |
36 | /**
37 | * Unavailable. Use `-initWithAuthConfig:authSession:` instead.
38 | */
39 | - (instancetype)init __attribute__((unavailable("Use -initWithAuthConfig:authSession: instead.")));
40 |
41 | @end
42 |
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Headers/TWTRSearchTimelineDataSource.h:
--------------------------------------------------------------------------------
1 | //
2 | // TWTRSearchTimelineDataSource.h
3 | // TwitterKit
4 | //
5 | // Copyright (c) 2015 Twitter. All rights reserved.
6 | //
7 |
8 | #import
9 | #import "TWTRTimelineDataSource.h"
10 |
11 | @class TWTRAPIClient;
12 |
13 | /**
14 | Data source representing a Search Timeline. Provides TWTRTweet objects to a TWTRTimelineViewController in pages determined by the TWTRTimelineCursor object passed in to the `loadNext:` and `loadPrevious:` methods.
15 |
16 | ## Search Queries:
17 |
18 | * `watching now` containing both “watching” and “now”. Default.
19 | * `“happy hour”` containing the exact phrase “happy hour”.
20 | * `love OR hate` containing either “love” or “hate” (or both).
21 | * `beer -root` containing “beer” but not “root”.
22 | * `#haiku` containing the hashtag “haiku”.
23 | * `from:alexiskold`sent from person “alexiskold”.
24 | * `to:techcrunch` sent to person “techcrunch”.
25 | * `@mashable` referencing person “mashable”.
26 | * `flight :(` containing “flight” and with a negative attitude.
27 | * `traffic ?` containing “traffic” and asking a question.
28 | * `movie -scary :)`containing “movie”, but not “scary”, and with a positive attitude.
29 | * `hilarious filter:links` containing “hilarious” and linking to URL.
30 | * `news source:twitterfeed`containing “news” and entered via TwitterFeed
31 | * `superhero since:2010-12-27` containing “superhero” and sent since date “2010-12-27” (year-month-day).
32 | * `ftw until:2010-12-27` containing “ftw” and sent before the date “2010-12-27”.
33 |
34 | @see https://dev.twitter.com/rest/public/search
35 | Not implemented: `geocode`, `result_type`
36 | */
37 | @interface TWTRSearchTimelineDataSource : NSObject
38 |
39 | /**
40 | * The search query. This matches what you would type into https://twitter.com/search
41 | */
42 | @property (nonatomic, copy, readonly) NSString *searchQuery;
43 |
44 | /**
45 | * Restricts tweets returned to a given language, specified by its ISO 639-1 code (for example: en, es). Language detection is best-effort. The server defaults to returning Tweets in all languages.
46 | *
47 | * @see http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
48 | */
49 | @property (nonatomic, copy, readonly) NSString *languageCode;
50 |
51 | /**
52 | * The number of Tweets to request in each network request for more Tweets. By default requests 30 tweets. If set to `0` the parameter will not be set on the request and the Twitter API will use the default size for the endpoint.
53 | */
54 | @property (nonatomic, assign, readonly) NSUInteger maxTweetsPerRequest;
55 |
56 | /**
57 | * Convenience initializer. Uses default values for `languageCode` and `maxTweetsPerRequest`.
58 | *
59 | * @param searchQuery (required) The query string that you would type into https://twitter.com/search
60 | * @param client (required) An instance of `TWTRAPIClient` with which API calls will be made.
61 | *
62 | * @return A fully initialized search timeline datasource or `nil` if any of the required parameters are missing.
63 | */
64 |
65 | - (instancetype)initWithSearchQuery:(NSString *)searchQuery APIClient:(TWTRAPIClient *)client __attribute__((nonnull));
66 |
67 | /**
68 | * Designated initializer for creating search timeline data sources taking all parameters.
69 | *
70 | * @param searchQuery (required) The query string that you would type into https://twitter.com/search
71 | * @param client (required) An instance of `TWTRAPIClient` with which API calls will be made.
72 | * @param languageCode (optional) The ISO 639-1 language code to restrict Tweets to. A `nil` value will not add the parameter to the server request and so use the server default.
73 | * @param maxTweetsPerRequest (optional) The number of tweets to request in each query to the Twitter API. A value of 0 will not add to the parameters and thus use the server default.
74 | *
75 | * @return A fully initialized search timeline datasource or `nil` if any of the required parameters are missing.
76 | */
77 | - (instancetype)initWithSearchQuery:(NSString *)searchQuery APIClient:(TWTRAPIClient *)client languageCode:(NSString *)languageCode maxTweetsPerRequest:(NSUInteger)maxTweetsPerRequest __attribute__((nonnull(1,2))) NS_DESIGNATED_INITIALIZER;
78 |
79 | - (instancetype)init __unavailable;
80 |
81 | @end
82 |
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Headers/TWTRShareEmailViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // TWTRShareEmailViewController.h
3 | // TwitterKit
4 | //
5 | // Copyright (c) 2015 Twitter. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | NS_ASSUME_NONNULL_BEGIN
11 |
12 | /**
13 | * A completion block to be called when the user accepts or denies access to their email address.
14 | *
15 | * @param email The user's email address. This will be nil if the user does not grant access to their email address or your application is not allowed to request email addresses.
16 | * @param error An error that details why a user's email address could not be provided.
17 | */
18 | typedef void (^TWTRShareEmailCompletion)(NSString * __twtr_nullable email, NSError * __twtr_nullable error);
19 |
20 | /**
21 | * The `TWTRShareEmailViewController` class presents a view to the user to request their email address. This is a subclass of `UINavigationController` and must be presented modally.
22 | *
23 | * @note Using `TWTRShareEmailViewController` requires your application to be whitelisted by Twitter. To request access, please visit https://support.twitter.com/forms/platform.
24 | */
25 | @interface TWTRShareEmailViewController : UINavigationController
26 |
27 | /**
28 | * Completion block called when the user accepts or denies access to their email address.
29 | */
30 | @property (nonatomic, copy) TWTRShareEmailCompletion completion;
31 |
32 | /**
33 | * Initializer for `TWTRShareEmailViewController`.
34 | *
35 | * @param completion The completion block called when the user either accepts or denies access to their email address. Called on the main thread.
36 | */
37 | - (instancetype)initWithCompletion:(twtr_nullable TWTRShareEmailCompletion)completion;
38 |
39 | /**
40 | * Initializer for `TWTRShareEmailViewController`.
41 | *
42 | * @param userID the ID of the user you are requesting the email on behalf of, if nil the last signed in account will be used.
43 | * @param completion The completion block called when the user either accepts or denies access to their email address. Called on the main thread.
44 | */
45 | - (instancetype)initWithUserID:(twtr_nullable NSString *)userID completion:(twtr_nullable TWTRShareEmailCompletion)completion;
46 |
47 | @end
48 |
49 | NS_ASSUME_NONNULL_END
50 |
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Headers/TWTRTimelineDataSource.h:
--------------------------------------------------------------------------------
1 | //
2 | // TWTRTimelineDataSource.h
3 | // TwitterKit
4 | //
5 | // Copyright (c) 2015 Twitter. All rights reserved.
6 | //
7 |
8 | #import "TWTRTimelineType.h"
9 | @class TWTRTimelineCursor;
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | typedef void (^TWTRLoadTimelineCompletion)(NSArray * __twtr_nullable tweets, TWTRTimelineCursor * __twtr_nullable cursor, NSError * __twtr_nullable error);
14 |
15 | /**
16 | * Responsible for building network parameters for requesting a timeline of Tweets.
17 | *
18 | * Implementations of this protocol don't need to be thread-safe. All the methods will be invoked on the main thread.
19 | */
20 | @protocol TWTRTimelineDataSource
21 |
22 | /**
23 | * Load Tweets before a given position. For time-based timelines this generally
24 | * corresponds to Tweets older than a position.
25 | *
26 | * @param position (optional) The position or Tweet ID before the page
27 | * of Tweets to be loaded.
28 | * @param completion (required) Invoked with the Tweets and the cursor in case of success, or nil
29 | * and an error in case of error. This must be called on the main thread.
30 | */
31 | - (void)loadPreviousTweetsBeforePosition:(NSString * __twtr_nullable)position completion:(TWTRLoadTimelineCompletion)completion;
32 |
33 | /*
34 | * The type of the timeline that this data source represents.
35 | */
36 | @property (nonatomic, readonly) TWTRTimelineType timelineType;
37 |
38 | @end
39 |
40 | NS_ASSUME_NONNULL_END
41 |
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Headers/TWTRTimelineType.h:
--------------------------------------------------------------------------------
1 | //
2 | // TWTRTimelineType.h
3 | // TwitterKit
4 | //
5 | // Created by Steven Hepting on 3/30/15.
6 | // Copyright (c) 2015 Twitter. All rights reserved.
7 | //
8 |
9 | /*
10 | * Type of timelines that may be loaded and shown to the user.
11 | */
12 | typedef NS_ENUM(NSUInteger, TWTRTimelineType) {
13 | /*
14 | * User Timeline
15 | */
16 | TWTRTimelineTypeUser = 1,
17 | /*
18 | * Search Timeline
19 | */
20 | TWTRTimelineTypeSearch,
21 | /**
22 | * Collection Timeline
23 | */
24 | TWTRTimelineTypeCollection,
25 | /**
26 | * List Timeline
27 | */
28 | TWTRTimelineTypeList,
29 | };
30 |
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Headers/TWTRTimelineViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // TWTRTimelineViewController.h
3 | // TwitterKit
4 | //
5 | // Copyright (c) 2015 Twitter. All rights reserved.
6 | //
7 |
8 | #import
9 | #import "TWTRTimelineDataSource.h"
10 |
11 | /**
12 | This class is a `UITableViewController` subclass that displays `TWTRTweetTableViewCell` cells. It handles cell-reuse, cell-configuration, and loading more tweets from the given timeline once the last cell is reached.
13 |
14 | ## Usage
15 |
16 | Initialize this class with any object that conforms to the `TWTRTimelineDataSource` protocol. We provide two such classes, `TWTRUserTimelineDataSource` and `TWTRSearchTimelineDataSource`. These provide `TWTRTweet` objects to this table view which then configures the instances of `TWTRTweetTableViewCell`.
17 |
18 | // Create the data source
19 | TWTRAPIClient *client = [Twitter sharedInstance].APIClient;
20 | TWTRUserTimelineDataSource *dataSource = [[TWTRUserTimelineDataSource alloc] initWithScreenName:@"jack" APIClient:client];
21 |
22 | // Create the timeline view controller
23 | TWTRTimelineViewController *timeline = [[TWTRTimelineViewController alloc] initWithDataSource:dataSource];
24 |
25 | ## Loading More
26 |
27 | This class loads the first batch of `TWTRTweet` objects from the Twitter API when `viewWillAppear:` is received. It also handles loading more tweets automatically once the last cell has been shown.
28 |
29 | */
30 | @interface TWTRTimelineViewController : UITableViewController
31 |
32 | /**
33 | Initializes a timeline view controller. Does not start loading tweets until
34 | `viewWillAppear:` is called.
35 |
36 | This method must be used to initialize this class. The `init` method is unavailable.
37 |
38 | @param dataSource Required. A timeline data source object that conforms to the `TWTRTimelineDataSource` protocol.
39 |
40 | @return A fully initialized `TWTRTimelineViewController` or nil if the data source is missing.
41 | */
42 | - (instancetype)initWithDataSource:(id)dataSource;
43 |
44 | /**
45 | The source of `TWTRTweet` objects for this `TWTRTimelineViewController`.
46 |
47 | May be set to update the tweets being shown by this table view. Must be set on the main thread.
48 | */
49 | @property (nonatomic, strong) id dataSource;
50 |
51 | /**
52 | * Whether action buttons (favorite, share) should be shown on the TWTRTweetTableViewCells inside the tableview.
53 | */
54 | @property (nonatomic, assign) BOOL showTweetActions;
55 |
56 | - (instancetype)initWithStyle:(UITableViewStyle)style __attribute__((unavailable("Use -initWithDataSource: instead")));
57 |
58 | @end
59 |
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Headers/TWTRTweet.h:
--------------------------------------------------------------------------------
1 | //
2 | // TWTRTweet.h
3 | //
4 | // Copyright (c) 2015 Twitter. All rights reserved.
5 | //
6 |
7 | #import
8 |
9 | @class TWTRTweet;
10 | @class TWTRUser;
11 |
12 | /**
13 | * `TWTRTweet` is an immutable representation of a Tweet.
14 | */
15 | @interface TWTRTweet : NSObject
16 |
17 | # pragma mark - Properties
18 |
19 | /**
20 | * The ID of the Twitter Tweet.
21 | * @warning This represents the id_str field, which could differ from the value of the id field.
22 | */
23 | @property (nonatomic, copy, readonly) NSString *tweetID;
24 |
25 | /**
26 | * The date when this Tweet was created.
27 | */
28 | @property (nonatomic, copy, readonly) NSDate *createdAt;
29 |
30 | /**
31 | * The text of the Tweet.
32 | */
33 | @property (nonatomic, copy, readonly) NSString *text;
34 |
35 | /**
36 | * The Author of the Tweet.
37 | */
38 | @property (nonatomic, strong, readonly) TWTRUser *author;
39 |
40 | /**
41 | * The number of times this Tweet was favorited.
42 | */
43 | @property (nonatomic, assign, readonly) long long favoriteCount;
44 |
45 | /**
46 | * The number of times this Tweet was retweeted.
47 | */
48 | @property (nonatomic, assign, readonly) long long retweetCount;
49 |
50 | /**
51 | * The Tweet this Tweet was a reply to.
52 | */
53 | @property (nonatomic, copy, readonly) NSString *inReplyToTweetID;
54 |
55 | /**
56 | * The User ID this Tweet was a reply to.
57 | */
58 | @property (nonatomic, copy, readonly) NSString *inReplyToUserID;
59 |
60 | /**
61 | * The screen name of the user this Tweet was a reply to.
62 | * @note This doesn't contain the `@` sign before the screen name.
63 | */
64 | @property (nonatomic, copy, readonly) NSString *inReplyToScreenName;
65 |
66 | /**
67 | * The permalink URL for this Tweet.
68 | *
69 | * Suitable for loading in a `UIWebView`, `WKWebView` or passing to Safari:
70 | *
71 | * `[[UIApplication sharedApplication] openURL:tweet.permalink];`
72 | */
73 | @property (nonatomic, copy, readonly) NSURL *permalink;
74 |
75 | /**
76 | * Whether this Tweet was favorited by the authenticated user.
77 | *
78 | * @warning The value of this property depends on the authenticated user.
79 | */
80 | @property (nonatomic, assign, readonly) BOOL isFavorited;
81 |
82 | /**
83 | * Whether this Tweet was retweeted by the authenticated user.
84 | *
85 | * @warning The value of this property depends on the authenticated user.
86 | */
87 | @property (nonatomic, assign, readonly) BOOL isRetweeted;
88 |
89 | /**
90 | * The Tweet ID of the authenticated user's retweet of this Tweet. This will be `nil` if there is no
91 | * authenticated user or the user has not retweeted this Tweet.
92 | *
93 | * @warning The value of this property depends on the authenticated user.
94 | */
95 | @property (nonatomic, copy, readonly) NSString *retweetID;
96 |
97 | /**
98 | * The original, fully-hydrated Tweet that was retweeted. This corresponds to the `retweeted_status` API field.
99 | * This is `nil` unless `self.isRetweet == YES`.
100 | */
101 | @property (nonatomic, strong, readonly) TWTRTweet *retweetedTweet;
102 |
103 | /**
104 | * Indicates whether this Tweet is a retweet of another Tweet.
105 | */
106 | @property (nonatomic, assign, readonly) BOOL isRetweet;
107 |
108 | # pragma mark - Init
109 |
110 | /**
111 | * Creates a TWTRTweet instance from the dictionary of Twitter API JSON response.
112 | *
113 | * @param dictionary A parsed dictionary of a single Twitter Tweet API JSON response.
114 | * @return TWTRTweet instance.
115 | */
116 | - (instancetype)initWithJSONDictionary:(NSDictionary *)dictionary;
117 |
118 | /**
119 | * Creates an array of TWTRTweet instances from the array of Twitter API JSON response.
120 | *
121 | * @param array A parsed array of Tweet API JSON responses.
122 | * @return An array of TWTRTweet instances.
123 | */
124 | + (NSArray *)tweetsWithJSONArray:(NSArray *)array;
125 |
126 | /**
127 | * Creates a new Tweet instance with a new value for the `isFavorited` boolean
128 | * value which is the opposite of the current value.
129 | */
130 | - (TWTRTweet *)tweetWithFavoriteToggled;
131 |
132 | @end
133 |
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Headers/TWTRTweetTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // TWTRTweetTableViewCell.h
3 | //
4 | // Copyright (c) 2015 Twitter. All rights reserved.
5 | //
6 |
7 | #import
8 |
9 | @class TWTRTweet;
10 | @class TWTRTweetView;
11 |
12 | /**
13 | * A table view cell subclass which displays a Tweet.
14 | */
15 | @interface TWTRTweetTableViewCell : UITableViewCell
16 |
17 | /**
18 | * The Tweet view inside this cell. Holds all relevant text and images.
19 | */
20 | @property (nonatomic, strong, readonly) TWTRTweetView *tweetView;
21 |
22 | /**
23 | * Configures the existing Tweet view with a Tweet. Updates labels, images, and thumbnails.
24 | *
25 | * @param tweet The `TWTRTweet` model object for the Tweet to display.
26 | */
27 | - (void)configureWithTweet:(TWTRTweet *)tweet;
28 |
29 | /**
30 | * Returns the height calculated using a given width. Usable from a background thread. This is the preferred approach to calculating height for tableview cells.
31 |
32 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
33 | TWTRTweet *tweet = self.tweets[indexPath.row];
34 |
35 | // Grab the height for this cell
36 | CGFloat height = [TWTRTweetTableViewCell heightForTweet:tweet width:CGRectGetWidth(self.view.bounds)];
37 | return height;
38 | }
39 |
40 | * @param width The table view cell width.
41 | */
42 | + (CGFloat)heightForTweet:(TWTRTweet *)tweet width:(CGFloat)width showingActions:(BOOL)actionsAreVisible;
43 |
44 | /**
45 | * Calculates the height for this Tweet assuming that actions are being shown (the default).
46 | *
47 | * @param tweet The Tweet object desiring to be shown.
48 | * @param width The width of the tableview.
49 | *
50 | * @return The calculated height for this Tweet.
51 | *
52 | * @note If this method is returning the incorrect height and .showActionButtons
53 | * has been set to NO on your TWTRTweetView you will need to use
54 | * heightForTweet:width:showingActions: instead.
55 | */
56 | + (CGFloat)heightForTweet:(TWTRTweet *)tweet width:(CGFloat)width;
57 |
58 | #pragma mark - Deprecated Methods
59 |
60 | /**
61 | DEPRECATED
62 |
63 | Returns the height calculated using a given width. Generally just for use with prototype
64 | cells. Calls `sizeThatFits:` internally to find height (which can be slow).
65 |
66 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
67 | TWTRTweet *tweet = self.tweets[indexPath.row];
68 |
69 | // Grab the height for this cell
70 | CGFloat height = [TWTRTweetTableViewCell heightForTweet:tweet width:CGRectGetWidth(self.view.bounds)];
71 | return height;
72 | }
73 |
74 | @deprecated Use +heightForTweet:width:showingActions: instead. Deprecated in version 1.3.0
75 |
76 | @param width The table view cell width.
77 | */
78 | - (CGFloat)calculatedHeightForWidth:(CGFloat)width __attribute__((deprecated("Use +heightForTweet:width: instead.")));
79 |
80 | @end
81 |
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Headers/TWTRTweetView.h:
--------------------------------------------------------------------------------
1 | //
2 | // TWTRTweetView.h
3 | //
4 | // Copyright (c) 2015 Twitter. All rights reserved.
5 | //
6 |
7 | #import
8 | #import "TWTRTweetViewDelegate.h"
9 |
10 | @class TWTRTweet;
11 |
12 | /**
13 | * The style for Tweet views.
14 | */
15 | typedef NS_ENUM(NSUInteger, TWTRTweetViewStyle) {
16 | /**
17 | * A full-size Tweet view. Displays images if present.
18 | */
19 | TWTRTweetViewStyleRegular,
20 | /**
21 | * A small Tweet view, primarily designed to be used in table views.
22 | */
23 | TWTRTweetViewStyleCompact
24 | };
25 |
26 | /**
27 | * A default combination of colors for Tweet views.
28 | */
29 | typedef NS_ENUM(NSUInteger, TWTRTweetViewTheme) {
30 | /**
31 | * Official light theme.
32 | */
33 | TWTRTweetViewThemeLight,
34 | /**
35 | * Official dark theme.
36 | */
37 | TWTRTweetViewThemeDark,
38 | };
39 |
40 | /**
41 | `TWTRTweetView` displays a single Tweet to the user. It handles background taps and other actions displayed to the user.
42 |
43 | [[[Twitter sharedInstance] APIClient] loadTweetWithID:@"20" completion:^(TWTRTweet *tweet, NSError *error) {
44 | if (tweet) {
45 | TWTRTweetView *tweetView = [[TWTRTweetView alloc] initWithTweet:tweet];
46 | [self.view addSubview:tweetView];
47 | } else {
48 | NSLog(@"Error loading Tweet: %@", [error localizedDescription]);
49 | }
50 | }];
51 |
52 | ## Interaction
53 |
54 | The `TWTRTweetViewDelegate` is notified:
55 |
56 | - When the background is tapped.
57 | - When a link is selected.
58 | - When the share button is tapped.
59 | - When the share action completes.
60 | - When the favorite action completes.
61 |
62 | ## Usage in UITableView
63 |
64 | To allow for usage in a `UITableView`, the `configureWithTweet:` method allows configuration of an existing `TWTRTweetView` without having to create a new instance.
65 |
66 | ## Sizing
67 |
68 | When using Auto Layout, feel free to set a width or margin on the Tweet view. The height will be calculated automatically. For old-fashioned frame based layout you may use the standard `sizeThatFits:` method to calculate the appropriate height for a given width:
69 |
70 | // Find the height for a given width (20pts on either side)
71 | CGFloat desiredHeight = [tweetView sizeThatFits:CGSizeMake(self.view.frame.size.width - 40, CGFLOAT_MAX)].height;
72 |
73 | ## UIAppearance
74 |
75 | You may use UIAppearance proxy objects to style certain aspects of Tweet views before those views are added to the view hierarchy.
76 |
77 | // Using UIAppearance Proxy
78 | [TWTRTweetView appearance].theme = TWTRTweetViewThemeDark;
79 |
80 | // Setting colors directly
81 | [TWTRTweetView appearance].primaryTextColor = [UIColor yellowColor];
82 | [TWTRTweetView appearance].backgroundColor = [UIColor blueColor];
83 |
84 | // Setting action button visibility
85 | [TWTRTweetView appearance].showActionButtons = NO;
86 |
87 | _Note:_ You can't change the theme through an appearance proxy after the view has already been added to the view hierarchy. Direct `theme` property access will work though.
88 | */
89 | @interface TWTRTweetView : UIView
90 |
91 | /**
92 | * Background color of the Tweet view and all text labels (fullname, username, Tweet text, timestamp).
93 | */
94 | @property (nonatomic, strong) UIColor *backgroundColor UI_APPEARANCE_SELECTOR;
95 |
96 | /**
97 | * Color of Tweet text and full name.
98 | */
99 | @property (nonatomic, strong) UIColor *primaryTextColor UI_APPEARANCE_SELECTOR;
100 |
101 | /**
102 | * Color of links in Tweet text.
103 | */
104 | @property (nonatomic, strong) UIColor *linkTextColor UI_APPEARANCE_SELECTOR;
105 |
106 | /**
107 | * Set whether the border should be shown.
108 | * Defaults to YES.
109 | */
110 | @property (nonatomic, assign) BOOL showBorder UI_APPEARANCE_SELECTOR;
111 |
112 | /**
113 | * Set whether the action buttons (Favorite, Share) should be shown. When toggled,
114 | * both the visibility of the action buttons and the internal constraints are
115 | * updated immediately. The layout will be updated the next layout pass that occurs.
116 | *
117 | * Defaults to NO.
118 | */
119 | @property (nonatomic, assign) BOOL showActionButtons;
120 |
121 | /**
122 | * Setting the theme of the Tweet view will change the color properties accordingly.
123 | *
124 | * Set to `TWTRTweetViewThemeLight` by default.
125 | */
126 | @property (nonatomic, assign) TWTRTweetViewTheme theme UI_APPEARANCE_SELECTOR;
127 |
128 | /**
129 | * The style of the Tweet. i.e. `TWTRTweetViewStyleRegular` or `TWTRTweetViewStyleCompact`.
130 | */
131 | @property (nonatomic, assign, readonly) TWTRTweetViewStyle style;
132 |
133 | /**
134 | * Optional delegate to receive notifications when certain actions happen
135 | */
136 | @property (nonatomic, weak) IBOutlet id delegate;
137 |
138 | /**
139 | * Optional property to set a UIViewController from which to present various new UI
140 | * e.g. when presenting a Share sheet, presenting a login view controller for actions, etc
141 | */
142 | @property (nonatomic, weak) UIViewController *presenterViewController;
143 |
144 | /**
145 | * Convenience initializer to configure a compact style Tweet view.
146 | *
147 | * @param tweet The Tweet to display.
148 | *
149 | * @return The fully-configured Tweet view.
150 | */
151 | - (instancetype)initWithTweet:(TWTRTweet *)tweet;
152 |
153 | /**
154 | * Designated initializer. Initializes view with both Tweet and style.
155 | *
156 | * @param tweet The Tweet to display.
157 | * @param style The style of the Tweet view (regular or compact).
158 | *
159 | * @return The fully configured Tweet view.
160 | */
161 | - (instancetype)initWithTweet:(TWTRTweet *)tweet style:(TWTRTweetViewStyle)style;
162 |
163 | /**
164 | * Initialization with a frame parameter is not supported.
165 | */
166 | - (instancetype)initWithFrame:(CGRect)frame __attribute__((unavailable("Use -initWithTweet: instead")));
167 |
168 | /**
169 | Find the size that fits into a desired space. This is a system method on UIView but implemented on `TWTRTweetView`
170 |
171 | TWTRTweetView *tweetView = [[TWTRTweetView alloc] initWithTweet:tweet];
172 |
173 | // Make it 280 points wide
174 | CGSize desiredSize = [tweetView sizeThatFits:CGSizeMake(280, CGFLOAT_MAX)];
175 | tweetView.frame = CGRectMake(PADDING_X, PADDING_Y, 280, desiredSize.height);
176 |
177 | [self.view addSubview:tweetView];
178 |
179 | @param size The space available. Should generally leave one orientation unconstrained, and the minimum width supported is 200pts.
180 |
181 | @return The size that will fit into the space available.
182 | */
183 | - (CGSize)sizeThatFits:(CGSize)size;
184 |
185 | /**
186 | * Update all images and label text to fully represent the given Tweet.
187 | *
188 | * @param tweet The Tweet to display.
189 | */
190 | - (void)configureWithTweet:(TWTRTweet *)tweet;
191 |
192 | @end
193 |
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Headers/TWTRTweetViewDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // TWTRTweetViewDelegate.h
3 | //
4 | // Copyright (c) 2015 Twitter. All rights reserved.
5 | //
6 |
7 | #import
8 |
9 | @class TWTRSession;
10 | @class TWTRTweetView;
11 | @class TWTRTweet;
12 | @protocol TWTRSessionStore;
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
16 | typedef void (^TWTRAuthenticationCompletionHandler)(id sessionStore, NSString *userID);
17 |
18 | /**
19 | Delegate for `TWTRTweetView` to receive updates on the user interacting with this particular Tweet view.
20 |
21 | // Create the tweet view
22 | TWTRTweetView *tweetView = [[TWTRTweetView alloc] initWithTweet:tweet];
23 | // Set the delegate
24 | tweetView.delegate = self;
25 | */
26 | @protocol TWTRTweetViewDelegate
27 |
28 | @optional
29 |
30 | /**
31 | * The tweet view was tapped. Implement to show your own webview if desired using the `permalinkURL` property on the `TWTRTweet` object passed in.
32 | *
33 | * @param tweetView The Tweet view that was tapped.
34 | * @param tweet The Tweet model object being shown.
35 | */
36 | - (void)tweetView:(TWTRTweetView *)tweetView didSelectTweet:(TWTRTweet *)tweet;
37 |
38 | /**
39 | * The tweet view image was tapped.
40 | *
41 | * @param tweetView The Tweet view that was tapped.
42 | * @param image The exact UIImage data shown by the Tweet view.
43 | * @param imageURL The full URL of the image being shown.
44 | */
45 | - (void)tweetView:(TWTRTweetView *)tweetView didTapImage:(UIImage *)image withURL:(NSURL *)imageURL;
46 |
47 | /**
48 | * A URL in the text of a tweet was tapped. Implement to show your own webview rather than opening Safari.
49 | *
50 | * @param tweetView The Tweet view that was tapped.
51 | * @param url The URL that was tapped.
52 | */
53 | - (void)tweetView:(TWTRTweetView *)tweetView didTapURL:(NSURL *)url;
54 |
55 | /**
56 | * The Tweet view "Share" button was tapped and the `UIActivityViewController` was shown.
57 | *
58 | * @param tweetView The Tweet view that was tapped.
59 | * @param tweet The Tweet model object being shown.
60 | */
61 | - (void)tweetView:(TWTRTweetView *)tweetView willShareTweet:(TWTRTweet *)tweet;
62 |
63 | /**
64 | * The share action for a Tweet was completed.
65 | *
66 | * @param tweetView The Tweet view that was tapped.
67 | * @param tweet The Tweet model object being shown.
68 | * @param shareType The share action that was completed. (e.g. `UIActivityTypePostToFacebook`, `UIActivityTypePostToTwitter`, or `UIActivityTypeMail`)
69 | */
70 | - (void)tweetView:(TWTRTweetView *)tweetView didShareTweet:(TWTRTweet *)tweet withType:(NSString *)shareType;
71 |
72 | /**
73 | * The share action for a Tweet was cancelled.
74 | *
75 | * @param tweetView The Tweet view handling the share action.
76 | * @param tweet The Tweet model object represented.
77 | */
78 | - (void)tweetView:(TWTRTweetView *)tweetView cancelledShareTweet:(TWTRTweet *)tweet;
79 |
80 | /**
81 | * The Tweet view favorite button was tapped and the action was completed with
82 | * the Twitter API.
83 | *
84 | * @param tweetView The Tweet view showing this Tweet object.
85 | * @param tweet The Tweet model that was just favorited.
86 | */
87 | - (void)tweetView:(TWTRTweetView *)tweetView didFavoriteTweet:(TWTRTweet *)tweet;
88 |
89 | /**
90 | * The Tweet view unfavorite button was tapped and the action was completed with
91 | * the Twitter API.
92 | *
93 | * @param tweetView The Tweet view showing this Tweet object.
94 | * @param tweet The Tweet model object that was just unfavorited.
95 | */
96 | - (void)tweetView:(TWTRTweetView *)tweetView didUnfavoriteTweet:(TWTRTweet *)tweet;
97 |
98 | /**
99 | * Requests authentication from the delegate to use for a network request that requires user context.
100 | *
101 | * @param tweetView The Tweet view showing this Tweet object.
102 | * @param authenticationCompletionHandler The completion block that your delegate method must call to provide the necessary
103 | * user context e.g. user session.
104 | */
105 | - (void)tweetView:(TWTRTweetView *)tweetView willRequireAuthenticationCompletionHandler:(TWTRAuthenticationCompletionHandler)authenticationCompletionHandler;
106 |
107 | @end
108 |
109 | NS_ASSUME_NONNULL_END
110 |
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Headers/TWTRUser.h:
--------------------------------------------------------------------------------
1 | //
2 | // TWTRUser.h
3 | //
4 | // Copyright (c) 2015 Twitter. All rights reserved.
5 | //
6 |
7 | #import
8 |
9 | /**
10 | * Represents a user on Twitter.
11 | */
12 | @interface TWTRUser : NSObject
13 |
14 | # pragma mark - Properties
15 |
16 | /**
17 | * The ID of the Twitter User.
18 | */
19 | @property (nonatomic, copy, readonly) NSString *userID;
20 |
21 | /**
22 | * The user's name as it appears on their profile.
23 | *
24 | * @warning This can be modified by the user at any time.
25 | */
26 | @property (nonatomic, copy, readonly) NSString *name;
27 |
28 | /**
29 | * The user's username on Twitter.
30 | *
31 | * @warning This can be modified by the user at any time.
32 | */
33 | @property (nonatomic, copy, readonly) NSString *screenName;
34 |
35 | /**
36 | * Whether the user has been verified by Twitter.
37 | */
38 | @property (nonatomic, assign, readonly) BOOL isVerified;
39 |
40 | /**
41 | * Whether the user is protected.
42 | */
43 | @property (nonatomic, assign, readonly) BOOL isProtected;
44 |
45 | /**
46 | * The HTTPS URL of the user's profile image.
47 | */
48 | @property (nonatomic, copy, readonly) NSString *profileImageURL;
49 |
50 | /**
51 | * The URL of a smaller version of the user's profile image.
52 | */
53 | @property (nonatomic, copy, readonly) NSString *profileImageMiniURL;
54 |
55 | /**
56 | * The URL of a larger version of the user's profile image.
57 | */
58 | @property (nonatomic, copy, readonly) NSString *profileImageLargeURL;
59 |
60 | /**
61 | * The formatted version of the user's `screenName` with the `@` sign for display purposes.
62 | */
63 | @property (nonatomic, copy, readonly) NSString *formattedScreenName;
64 |
65 | # pragma mark - Init
66 |
67 | /**
68 | * Creates a Twitter user object from the dictionary of Twitter API JSON response.
69 | *
70 | * @param dictionary A parsed dictionary of a single Twitter Tweet API JSON response.
71 | *
72 | * @return An initialized TWTRUser instance.
73 | */
74 | - (instancetype)initWithJSONDictionary:(NSDictionary *)dictionary;
75 |
76 | /**
77 | * Creates an array of Twitter User instances from the array of Twitter API JSON response.
78 | *
79 | * @param array A parsed array of Twitter User API JSON responses.
80 | *
81 | * @return An array of initialized TWTRTweet instances.
82 | */
83 | + (NSArray *)usersWithJSONArray:(NSArray *)array;
84 |
85 | @end
86 |
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Headers/TWTRUserTimelineDataSource.h:
--------------------------------------------------------------------------------
1 | //
2 | // TWTRUserTimelineDataSource.h
3 | // TwitterKit
4 | //
5 | // Copyright (c) 2015 Twitter. All rights reserved.
6 | //
7 |
8 | #import
9 | #import "TWTRTimelineDataSource.h"
10 |
11 | @class TWTRAPIClient;
12 |
13 | /**
14 | * This Timeline Data Source provides a list of Tweets roughly consistent with the list on a Users profile page. The difference is that this data source will filter out Tweets that are direct replies to other users by default.
15 | *
16 | * These Tweets are ordered chronologically with the most recent first.
17 | */
18 | @interface TWTRUserTimelineDataSource : NSObject
19 |
20 | /**
21 | * The screen name of the User whose Tweets are being shown. Either the `screenName` or the `userID` are required.
22 | */
23 | @property (nonatomic, copy, readonly) NSString *screenName;
24 |
25 | /**
26 | * The userID of the User whose Tweets are being shown. Either the `screenName` or the `userID` are required.
27 | */
28 | @property (nonatomic, copy, readonly) NSString *userID;
29 |
30 | /**
31 | * The number of Tweets to request in each query to the Twitter Timeline API when fetching the next batch of Tweets. Will request 30 Tweets by default. Setting this value to 0 will use the server default.
32 | */
33 | @property (nonatomic, assign, readonly) NSUInteger maxTweetsPerRequest;
34 |
35 | /**
36 | * Whether to request replies in the set of Tweets from the server.
37 | *
38 | * Defaults to NO.
39 | */
40 | @property (nonatomic, assign, readonly) BOOL includeReplies;
41 |
42 | /**
43 | * Whether to request retweets in the set of Tweets from the server.
44 | *
45 | * Defaults to YES.
46 | */
47 | @property (nonatomic, assign, readonly) BOOL includeRetweets;
48 |
49 | /**
50 | * Convenience initializer. Uses default values for `maxTweetsPerRequest`, `includeReplies` and `includeRetweets`.
51 | *
52 | * @param screenName (required) The screen name of a Twitter User
53 | * @param client (required) The API client to use for making network requests.
54 | *
55 | * @return A fully initialized user timeline datasource or nil.
56 | */
57 | - (instancetype)initWithScreenName:(NSString *)screenName APIClient:(TWTRAPIClient *)client __attribute__((nonnull));
58 |
59 | /**
60 | * The designated initialzer accepted values for properties.
61 | *
62 | * @param userID (optional) The user ID of the Twitter User
63 | * @param screenName (optional) The screen name of the Twitter User
64 | * @param APIClient (required) The API client to use for making network requests.
65 | * @param maxTweetsPerRequest (optional) The number of Tweets per batch to request. A value of 0 will use the server default.
66 | * @param includeReplies (optional) Whether replies should be requested
67 | * @param includeRetweets (optional) Whether retweets should be requested
68 | *
69 | * @return A fully initialized user timeline datasource or nil.
70 | */
71 | - (instancetype)initWithScreenName:(NSString *)screenName userID:(NSString *)userID APIClient:(TWTRAPIClient *)client maxTweetsPerRequest:(NSUInteger)maxTweetsPerRequest includeReplies:(BOOL)includeReplies includeRetweets:(BOOL)includeRetweets __attribute__((nonnull(3))) NS_DESIGNATED_INITIALIZER;
72 |
73 | - (instancetype)init __unavailable;
74 |
75 | @end
76 |
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Headers/TwitterKit.h:
--------------------------------------------------------------------------------
1 | //
2 | // TwitterKit.h
3 | //
4 | // Copyright (c) 2015 Twitter. All rights reserved.
5 | //
6 |
7 | #if __has_feature(modules)
8 | @import Accounts;
9 | @import Foundation;
10 | @import Social;
11 | @import UIKit;
12 | @import TwitterCore;
13 | #if __has_include()
14 | @import DigitsKit;
15 | #endif
16 | #else
17 | #import
18 | #import
19 | #import
20 | #import
21 | #import
22 | #if __has_include()
23 | #import
24 | #endif
25 | #endif
26 |
27 | #if __IPHONE_OS_VERSION_MIN_REQUIRED < 70000
28 | #error "TwitterKit doesn't support iOS 6.x and lower. Please, change your minimum deployment target to iOS 7.0"
29 | #endif
30 |
31 | #import "Twitter.h"
32 | #import "TWTRAPIClient.h"
33 | #import "TWTRCollectionTimelineDataSource.h"
34 | #import "TWTRComposer.h"
35 | #import "TWTRListTimelineDataSource.h"
36 | #import "TWTRLogInButton.h"
37 | #import "TWTROAuthSigning.h"
38 | #import "TWTRSearchTimelineDataSource.h"
39 | #import "TWTRShareEmailViewController.h"
40 | #import "TWTRTimelineDataSource.h"
41 | #import "TWTRTimelineType.h"
42 | #import "TWTRTimelineViewController.h"
43 | #import "TWTRTweet.h"
44 | #import "TWTRTweetTableViewCell.h"
45 | #import "TWTRTweetView.h"
46 | #import "TWTRTweetViewDelegate.h"
47 | #import "TWTRUser.h"
48 | #import "TWTRUserTimelineDataSource.h"
49 |
50 | /**
51 | * `TwitterKit` can be used as an element in the array passed to the `+[Fabric with:]`.
52 | */
53 | #define TwitterKit [Twitter sharedInstance]
54 |
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BuildMachineOSBuild
6 | 14F27
7 | CFBundleDevelopmentRegion
8 | English
9 | CFBundleGetInfoString
10 | Twitter Kit Framework
11 | CFBundleIdentifier
12 | com.twitter.sdk.ios
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | TwitterKit
17 | CFBundlePackageType
18 | FMWK
19 | CFBundleShortVersionString
20 | 1.11.4
21 | CFBundleSupportedPlatforms
22 |
23 | iPhoneOS
24 |
25 | CFBundleVersion
26 | 1.11.4
27 | DTCompiler
28 | com.apple.compilers.llvm.clang.1_0
29 | DTPlatformBuild
30 | 13A340
31 | DTPlatformName
32 | iphoneos
33 | DTPlatformVersion
34 | 9.0
35 | DTSDKBuild
36 | 13A340
37 | DTSDKName
38 | iphoneos9.0
39 | DTXcode
40 | 0701
41 | DTXcodeBuild
42 | 7A1001
43 | MinimumOSVersion
44 | 7.0
45 | NSHumanReadableCopyright
46 | Copyright 2014 Twitter Inc.
47 | UIDeviceFamily
48 |
49 | 1
50 | 2
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Modules/module.modulemap:
--------------------------------------------------------------------------------
1 | framework module TwitterKit {
2 | umbrella header "TwitterKit.h"
3 |
4 | export *
5 | module * { export * }
6 |
7 | header "TWTRAPIClient.h"
8 | header "TWTRCollectionTimelineDataSource.h"
9 | header "TWTRComposer.h"
10 | header "TWTRListTimelineDataSource.h"
11 | header "TWTRLogInButton.h"
12 | header "TWTROAuthSigning.h"
13 | header "TWTRSearchTimelineDataSource.h"
14 | header "TWTRShareEmailViewController.h"
15 | header "TWTRTimelineDataSource.h"
16 | header "TWTRTimelineType.h"
17 | header "TWTRTimelineViewController.h"
18 | header "TWTRTweet.h"
19 | header "TWTRTweetTableViewCell.h"
20 | header "TWTRTweetView.h"
21 | header "TWTRTweetViewDelegate.h"
22 | header "TWTRUser.h"
23 | header "TWTRUserTimelineDataSource.h"
24 | header "Twitter.h"
25 | header "TwitterKit.h"
26 | }
27 |
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Resources:
--------------------------------------------------------------------------------
1 | Versions/Current/Resources
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/TwitterKit:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/TwitterKit
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/TFSScribe.momd/TFSScribe.mom:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/TFSScribe.momd/TFSScribe.mom
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/TFSScribe.momd/VersionInfo.plist:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/TFSScribe.momd/VersionInfo.plist
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/ar.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/ar.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/bn.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/bn.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/cs.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/cs.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/da.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/da.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/de.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/de.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/emailshare.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/emailshare.png
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/emailshare@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/emailshare@2x.png
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/emailshare@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/emailshare@3x.png
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/en-gb.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/en-gb.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/en.lproj/Localizable.strings:
--------------------------------------------------------------------------------
1 | /* Label for button to bring up share dialog to share this Tweet in a single Tweet view */
2 | "tw__share_tweet" = "Share Tweet";
3 | /* Subject format used to prefill certain sharing options such as Email includes full name (%1$@) and screenname (%2$@) */
4 | "tw__share_tweet_subject_format" = "Tweet from %1$@ (@%2$@)";
5 | /* Generic share text format used in all sharing options includes screenname (%1$@) and URL to the Tweet (%2$@) */
6 | "tw__share_tweet_generic_template_format" = "Check out @%1$@\'s Tweet: %2$@";
7 | /* Label for Sign in with Twitter button */
8 | "tw__sign_in_with_twitter_button" = "Log in with Twitter";
9 | /* Label Email Share Screen negative button */
10 | "tw__email_share_negative_button" = "Not now";
11 | /* Label Email Share Screen affirmative button */
12 | "tw__email_share_affirmative_button" = "Allow";
13 | /* Heading that appears above the detail message on the share your email screen */
14 | "tw__email_share_heading" = "Share your email address";
15 | /* Detail message that includes the app name and username on the share your email screen */
16 | "tw__email_share_detail_message_format" = "Get updates and other information from %@ when you allow them access to your email on your Twitter account @%@.";
17 | /* Fallback string for detail message in case the app name is not available */
18 | "tw__email_share_detail_message_this_app" = "this app";
19 | /* Fallback string for detail message in case the user is not signed in */
20 | "tw__email_share_detail_message_not_signed_in" = "(not signed in)";
21 | /* Label for attributing this Tweet was retweeted by the user %@ */
22 | "tw__tweet_retweeted_by_user" = "Retweeted by %@";
23 |
24 | /* Timestamps */
25 |
26 | /* Really short abbreviation for days (plural). 5 days would be '5d' */
27 | "TIME_SHORT_DAYS_FORMAT" = "%dd";
28 | /* Really short abbreviation for day (singular). 1 day would be '1d' */
29 | "TIME_SHORT_DAY_FORMAT" = "%dd";
30 | /* Really short abbreviation for hours (plural). 5 hours would be '5h' */
31 | "TIME_SHORT_HOURS_FORMAT" = "%dh";
32 | /* Really short abbreviation for hour (singular). 1 hour would be '1h' */
33 | "TIME_SHORT_HOUR_FORMAT" = "%dh";
34 | /* Really short abbreviation for minutes (plural). 5 minutes would be '5m' */
35 | "TIME_SHORT_MINUTES_FORMAT" = "%dm";
36 | /* Really short abbreviation for minute (singular). 1 minute would be '1m' */
37 | "TIME_SHORT_MINUTE_FORMAT" = "%dm";
38 | /* Really short abbreviation for seconds (plural). 5 seconds would be '5s' */
39 | "TIME_SHORT_SECONDS_FORMAT" = "%ds";
40 | /* Really short abbreviation for second (singular). '1s' */
41 | "TIME_SHORT_SECOND_FORMAT" = "%ds";
42 |
43 | /* Accessibility Labels */
44 |
45 | /* Text spoken out with VoiceOver when a tweet has an image showing */
46 | "tw__single_image" = "One image attached";
47 | /* Text spoken out with VoiceOver for selecting the profile image on a regular tweet view */
48 | "tw__tweet_profile_accessibility" = "Profile";
49 | /* Text spoken out with VoiceOver for selecting the attached image on a regular tweet view */
50 | "tw__tweet_image_accessibility" = "Attachment";
51 |
52 | /* Test String (just for unit tests) */
53 | "tw__test_string" = "Test";
54 |
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/es.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/es.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/fa.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/fa.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/fi.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/fi.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/fr.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/fr.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/he.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/he.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/hi.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/hi.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/hu.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/hu.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/id.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/id.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/it.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/it.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/ja.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/ja.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/ko.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/ko.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/ms.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/ms.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/nb.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/nb.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/nl.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/nl.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/pl.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/pl.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/pt.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/pt.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/ro.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/ro.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/ru.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/ru.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/sv.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/sv.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/th.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/th.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/tl.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/tl.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/tr.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/tr.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-favorite-off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-favorite-off.png
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-favorite-off@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-favorite-off@2x.png
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-favorite-off@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-favorite-off@3x.png
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-favorite-on.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-favorite-on.png
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-favorite-on@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-favorite-on@2x.png
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-favorite-on@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-favorite-on@3x.png
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-icn-logo-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-icn-logo-white.png
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-icn-logo-white@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-icn-logo-white@2x.png
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-icn-logo-white@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-icn-logo-white@3x.png
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-icn-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-icn-logo.png
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-icn-logo@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-icn-logo@2x.png
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-icn-logo@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-icn-logo@3x.png
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-icn-tweet-retweeted-by-dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-icn-tweet-retweeted-by-dark.png
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-icn-tweet-retweeted-by-dark@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-icn-tweet-retweeted-by-dark@2x.png
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-icn-tweet-retweeted-by-dark@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-icn-tweet-retweeted-by-dark@3x.png
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-icn-tweet-retweeted-by-light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-icn-tweet-retweeted-by-light.png
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-icn-tweet-retweeted-by-light@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-icn-tweet-retweeted-by-light@2x.png
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-icn-tweet-retweeted-by-light@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-icn-tweet-retweeted-by-light@3x.png
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-icn-tweet-verified.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-icn-tweet-verified.png
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-icn-tweet-verified@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-icn-tweet-verified@2x.png
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-icn-tweet-verified@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-icn-tweet-verified@3x.png
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-share.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-share.png
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-share@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-share@2x.png
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-share@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twtr-share@3x.png
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twttr-icn-tweet-place-holder-photo-error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twttr-icn-tweet-place-holder-photo-error.png
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twttr-icn-tweet-place-holder-photo-error@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twttr-icn-tweet-place-holder-photo-error@2x.png
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twttr-icn-tweet-place-holder-photo-error@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twttr-icn-tweet-place-holder-photo-error@3x.png
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twttr-icn-tweet-place-holder-photo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twttr-icn-tweet-place-holder-photo.png
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twttr-icn-tweet-place-holder-photo@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twttr-icn-tweet-place-holder-photo@2x.png
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twttr-icn-tweet-place-holder-photo@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/twttr-icn-tweet-place-holder-photo@3x.png
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/uk.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/uk.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/ur.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/ur.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/vi.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/vi.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/zh-Hans.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/zh-Hans.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/zh-Hant.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kenwheeler/reactive2015/e96e50e5cf6f48658a3dc23202ac91d6f28afbf4/ios/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle/zh-Hant.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/TwitterKit.framework/Versions/Current:
--------------------------------------------------------------------------------
1 | A
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "App",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "flow": "flow check",
7 | "lint": "eslint --ext .js,.jsx src",
8 | "start": "node_modules/react-native/packager/packager.sh"
9 | },
10 | "dependencies": {
11 | "lodash": "^3.10.1",
12 | "react-motion": "^0.3.0",
13 | "react-native": "^0.11.4",
14 | "react-native-mapbox-gl": "^0.4.2",
15 | "react-redux": "^3.1.0",
16 | "redux": "^3.0.2",
17 | "redux-logger": "^2.0.1",
18 | "redux-thunk": "^1.0.0"
19 | },
20 | "devDependencies": {
21 | "concurrently": "^0.1.1",
22 | "eslint": "^1.6.0",
23 | "eslint-config-defaults": "^7.0.1",
24 | "eslint-plugin-filenames": "^0.1.2",
25 | "eslint-plugin-react": "^3.5.1"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/actions/index.js:
--------------------------------------------------------------------------------
1 | /* @flow */
2 |
3 | import React from "react-native";
4 |
5 | export const REQUEST_TWEETS = 'REQUEST_TWEETS';
6 | export const RECEIVE_TWEETS = 'RECEIVE_TWEETS';
7 |
8 | export function requestTweets() {
9 | return {
10 | type: REQUEST_TWEETS
11 | }
12 | }
13 |
14 | export function receiveTweets(data) {
15 | return {
16 | type: RECEIVE_TWEETS,
17 | tweets: data
18 | }
19 | }
--------------------------------------------------------------------------------
/src/components/map.js:
--------------------------------------------------------------------------------
1 |
2 | /* @flow */
3 | /*eslint-disable prefer-const */
4 |
5 | import React from "react-native";
6 | import MapBox from "react-native-mapbox-gl";
7 |
8 | let {
9 | Image,
10 | Text,
11 | View,
12 | Dimensions,
13 | StyleSheet
14 | } = React;
15 |
16 | const styles = StyleSheet.create({
17 | });
18 |
19 | const mapRef = "map";
20 |
21 | const ReactiveMap = React.createClass({
22 | mixins: [MapBox.Mixin],
23 | componentDidMount() {
24 | setTimeout(()=> {
25 | this.setCenterCoordinateZoomLevelAnimated(mapRef, 48.152458, 17.1145873, 14)
26 | },300)
27 | },
28 | render() {
29 | return (
30 |
51 | );
52 | }
53 | });
54 |
55 | export default ReactiveMap;
--------------------------------------------------------------------------------
/src/components/navigation-bar.js:
--------------------------------------------------------------------------------
1 | /* @flow */
2 | /*eslint-disable prefer-const */
3 |
4 | import React from "react-native";
5 |
6 | let {
7 | StatusBarIOS,
8 | StyleSheet,
9 | Text,
10 | TouchableOpacity,
11 | View
12 | } = React;
13 |
14 | const NAV_BAR_HEIGHT = 44;
15 | const STATUS_BAR_HEIGHT = 20;
16 | const NAV_HEIGHT = NAV_BAR_HEIGHT + STATUS_BAR_HEIGHT;
17 |
18 | const styles = StyleSheet.create({
19 | navBarContainer: {
20 | height: NAV_HEIGHT,
21 | backgroundColor: "white",
22 | paddingBottom: 5,
23 | borderBottomColor: "rgba(0, 0, 0, 0.5)",
24 | borderBottomWidth: 1 / React.PixelRatio.get()
25 | },
26 | navBar: {
27 | height: NAV_HEIGHT,
28 | flexDirection: "row",
29 | justifyContent: "space-between"
30 | },
31 | customTitle: {
32 | position: "absolute",
33 | alignItems: "center",
34 | bottom: 5,
35 | left: 0,
36 | right: 0
37 | },
38 | navBarText: {
39 | fontSize: 16,
40 | marginVertical: 10,
41 | flex: 2,
42 | textAlign: "center"
43 | },
44 | navBarTitleText: {
45 | color: "#373e4d",
46 | fontWeight: "500",
47 | position: "absolute",
48 | left: 0,
49 | right: 0,
50 | bottom: 15
51 | },
52 | navBarLeftButton: {
53 | paddingLeft: 10,
54 | marginVertical: 20
55 | },
56 | navBarRightButton: {
57 | marginVertical: 20,
58 | paddingRight: 10
59 | },
60 | navBarButtonText: {
61 | color: "#5890ff"
62 | }
63 | });
64 |
65 | class NavigationBar extends React.Component {
66 | prevButtonShouldBeHidden(): Boolean {
67 | let {
68 | onPrev,
69 | hidePrev,
70 | navigator
71 | } = this.props;
72 |
73 | const getCurrentRoutes = navigator.getCurrentRoutes;
74 |
75 | return (
76 | hidePrev ||
77 | (getCurrentRoutes && getCurrentRoutes().length <= 1 && !onPrev)
78 | );
79 | }
80 | getLeftButtonElement() {
81 | let {
82 | onPrev,
83 | prevTitle,
84 | navigator,
85 | route,
86 | buttonsColor,
87 | customPrev
88 | } = this.props;
89 |
90 | if (customPrev) {
91 | return React.cloneElement(customPrev, { navigator, route });
92 | }
93 |
94 | if (this.prevButtonShouldBeHidden()) {
95 | return ;
96 | }
97 |
98 | const customStyle = buttonsColor ? { color: buttonsColor } : {};
99 |
100 | let onPress = navigator.pop;
101 |
102 | if (onPrev) {
103 | onPress = () => onPrev(navigator, route);
104 | }
105 |
106 | return (
107 |
108 |
109 |
110 | {prevTitle || "Back"}
111 |
112 |
113 |
114 | );
115 | }
116 | getTitleElement() {
117 | let {
118 | title,
119 | titleColor,
120 | customTitle,
121 | navigator,
122 | route
123 | } = this.props;
124 |
125 | if (customTitle) {
126 | return (
127 |
128 | {React.cloneElement(customTitle, { navigator, route })}
129 |
130 | );
131 | }
132 |
133 | if (title && !title.length) {
134 | return true;
135 | }
136 |
137 | const titleStyle = [
138 | styles.navBarText,
139 | styles.navBarTitleText,
140 | { color: titleColor }
141 | ];
142 |
143 | return (
144 |
145 | {title}
146 |
147 | );
148 | }
149 | getRightButtonElement() {
150 | let {
151 | onNext,
152 | nextTitle,
153 | navigator,
154 | route,
155 | buttonsColor,
156 | customNext
157 | } = this.props;
158 |
159 | if (customNext) {
160 | return React.cloneElement(customNext, { navigator, route });
161 | }
162 |
163 | if (!onNext) {
164 | return ;
165 | }
166 |
167 | const customStyle = buttonsColor ? { color: buttonsColor } : {};
168 |
169 | return (
170 | onNext(navigator, route)}>
171 |
172 |
173 | {nextTitle || "Next"}
174 |
175 |
176 |
177 | );
178 | }
179 | render() {
180 | if (this.props.statusBar === "lightContent") {
181 | StatusBarIOS.setStyle("light-content", false);
182 | } else if (this.props.statusBar === "default") {
183 | StatusBarIOS.setStyle("default", false);
184 | }
185 |
186 | let { style, backgroundStyle } = this.props;
187 |
188 | return (
189 |
190 |
191 | {this.getTitleElement()}
192 | {this.getLeftButtonElement()}
193 | {this.getRightButtonElement()}
194 |
195 |
196 | );
197 | }
198 | }
199 |
200 | NavigationBar.propTypes = {
201 | backgroundStyle: React.PropTypes.object,
202 | buttonsColor: React.PropTypes.string,
203 | customNext: React.PropTypes.node,
204 | customPrev: React.PropTypes.node,
205 | customTitle: React.PropTypes.node,
206 | hidePrev: React.PropTypes.bool,
207 | navigator: React.PropTypes.object,
208 | nextTitle: React.PropTypes.string,
209 | onNext: React.PropTypes.func,
210 | onPrev: React.PropTypes.func,
211 | prevTitle: React.PropTypes.string,
212 | route: React.PropTypes.object,
213 | statusBar: React.PropTypes.string,
214 | style: React.PropTypes.object,
215 | title: React.PropTypes.string,
216 | titleColor: React.PropTypes.string
217 | };
218 |
219 | export default NavigationBar;
220 |
--------------------------------------------------------------------------------
/src/components/scene-config.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var Dimensions = require('Dimensions');
4 | var PixelRatio = require('PixelRatio');
5 |
6 | var buildStyleInterpolator = require('buildStyleInterpolator');
7 |
8 | var SCREEN_WIDTH = Dimensions.get('window').width;
9 | var SCREEN_HEIGHT = Dimensions.get('window').height;
10 |
11 | var FadeToTheLeft = {
12 | // Rotate *requires* you to break out each individual component of
13 | // rotation (x, y, z, w)
14 | transformTranslate: {
15 | from: {x: 0, y: 0, z: 0},
16 | to: {x: -Math.round(Dimensions.get('window').width * 0.3), y: 0, z: 0},
17 | min: 0,
18 | max: 1,
19 | type: 'linear',
20 | extrapolate: true,
21 | round: PixelRatio.get(),
22 | },
23 | // Uncomment to try rotation:
24 | // Quick guide to reasoning about rotations:
25 | // http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-17-quaternions/#Quaternions
26 | // transformRotateRadians: {
27 | // from: {x: 0, y: 0, z: 0, w: 1},
28 | // to: {x: 0, y: 0, z: -0.47, w: 0.87},
29 | // min: 0,
30 | // max: 1,
31 | // type: 'linear',
32 | // extrapolate: true
33 | // },
34 | transformScale: {
35 | from: {x: 1, y: 1, z: 1},
36 | to: {x: 0.95, y: 0.95, z: 1},
37 | min: 0,
38 | max: 1,
39 | type: 'linear',
40 | extrapolate: true
41 | },
42 | opacity: {
43 | from: 1,
44 | to: 0.3,
45 | min: 0,
46 | max: 1,
47 | type: 'linear',
48 | extrapolate: false,
49 | round: 100,
50 | },
51 | translateX: {
52 | from: 0,
53 | to: -Math.round(Dimensions.get('window').width * 0.3),
54 | min: 0,
55 | max: 1,
56 | type: 'linear',
57 | extrapolate: true,
58 | round: PixelRatio.get(),
59 | },
60 | scaleX: {
61 | from: 1,
62 | to: 0.95,
63 | min: 0,
64 | max: 1,
65 | type: 'linear',
66 | extrapolate: true
67 | },
68 | scaleY: {
69 | from: 1,
70 | to: 0.95,
71 | min: 0,
72 | max: 1,
73 | type: 'linear',
74 | extrapolate: true
75 | },
76 | };
77 |
78 | var ToTheLeft = {
79 | transformTranslate: {
80 | from: {x: 0, y: 0, z: 0},
81 | to: {x: -Dimensions.get('window').width, y: 0, z: 0},
82 | min: 0,
83 | max: 1,
84 | type: 'linear',
85 | extrapolate: true,
86 | round: PixelRatio.get(),
87 | },
88 | opacity: {
89 | value: 1.0,
90 | type: 'constant',
91 | },
92 |
93 | translateX: {
94 | from: 0,
95 | to: -Dimensions.get('window').width,
96 | min: 0,
97 | max: 1,
98 | type: 'linear',
99 | extrapolate: true,
100 | round: PixelRatio.get(),
101 | },
102 | };
103 |
104 | var FromTheRight = {
105 | opacity: {
106 | value: 1.0,
107 | type: 'constant',
108 | },
109 |
110 | transformTranslate: {
111 | from: {x: Dimensions.get('window').width, y: 0, z: 0},
112 | to: {x: 0, y: 0, z: 0},
113 | min: 0,
114 | max: 1,
115 | type: 'linear',
116 | extrapolate: true,
117 | round: PixelRatio.get(),
118 | },
119 |
120 | translateX: {
121 | from: Dimensions.get('window').width,
122 | to: 0,
123 | min: 0,
124 | max: 1,
125 | type: 'linear',
126 | extrapolate: true,
127 | round: PixelRatio.get(),
128 | },
129 |
130 | scaleX: {
131 | value: 1,
132 | type: 'constant',
133 | },
134 | scaleY: {
135 | value: 1,
136 | type: 'constant',
137 | },
138 | };
139 |
140 | var BaseLeftToRightGesture = {
141 |
142 | // If the gesture can end and restart during one continuous touch
143 | isDetachable: false,
144 |
145 | // How far the swipe must drag to start transitioning
146 | gestureDetectMovement: 2,
147 |
148 | // Amplitude of release velocity that is considered still
149 | notMoving: 0.3,
150 |
151 | // Fraction of directional move required.
152 | directionRatio: 0.66,
153 |
154 | // Velocity to transition with when the gesture release was "not moving"
155 | snapVelocity: 2,
156 |
157 | // Region that can trigger swipe. iOS default is 30px from the left edge
158 | edgeHitWidth: 30,
159 |
160 | // Ratio of gesture completion when non-velocity release will cause action
161 | stillCompletionRatio: 3 / 5,
162 |
163 | fullDistance: SCREEN_WIDTH,
164 |
165 | direction: 'left-to-right',
166 |
167 | };
168 |
169 | var BaseConfig = {
170 | // A list of all gestures that are enabled on this scene
171 | gestures: {
172 | pop: BaseLeftToRightGesture,
173 | },
174 |
175 | // Rebound spring parameters when transitioning FROM this scene
176 | springFriction: 26,
177 | springTension: 200,
178 |
179 | // Velocity to start at when transitioning without gesture
180 | defaultTransitionVelocity: 1.5,
181 |
182 | // Animation interpolators for horizontal transitioning:
183 | animationInterpolators: {
184 | into: buildStyleInterpolator(FromTheRight),
185 | out: buildStyleInterpolator(FadeToTheLeft),
186 | },
187 | };
188 |
189 | var SceneConfig = {
190 | ...BaseConfig,
191 | animationInterpolators: {
192 | into: buildStyleInterpolator(FromTheRight),
193 | out: buildStyleInterpolator(ToTheLeft),
194 | }
195 | };
196 |
197 | module.exports = SceneConfig;
198 |
--------------------------------------------------------------------------------
/src/components/scene.js:
--------------------------------------------------------------------------------
1 | /* @flow */
2 | /*eslint-disable prefer-const */
3 |
4 | import React from "react-native";
5 | import App from "../containers/app";
6 |
7 | import NavigationBar from "./navigation-bar";
8 | import SceneConfig from "./scene-config";
9 |
10 | let {
11 | ActionSheetIOS,
12 | Image,
13 | Navigator,
14 | Text,
15 | TouchableOpacity,
16 | View
17 | } = React;
18 |
19 | class Scene extends React.Component {
20 | constructor(props) {
21 | super(props);
22 | this.state = {
23 | filter: "All",
24 | showFilter: true
25 | };
26 | }
27 | _setFilter() {
28 | const buttons = [
29 | 'All',
30 | 'Data Flow',
31 | 'Rethinking Rest',
32 | 'React Everywhere',
33 | 'React General'
34 | ];
35 | ActionSheetIOS.showActionSheetWithOptions({
36 | options: buttons
37 | },
38 | (buttonIndex) => {
39 | this.setState({ filter: buttons[buttonIndex] });
40 | });
41 | }
42 | _showFilter(show) {
43 | this.setState({
44 | showFilter: show
45 | });
46 | }
47 | renderPrev() {
48 | return (
49 |
50 |
54 |
61 | Filter
62 |
63 |
64 |
65 | )
66 | }
67 | renderScene(route: Object, navigator: Object) {
68 | const Component = route.component;
69 | return (
70 |
71 |
82 |
89 |
90 | );
91 | }
92 | render() {
93 | return (
94 | SceneConfig}
97 | renderScene={this.renderScene.bind(this)}
98 | initialRoute={{
99 | component: App,
100 | title: "Starter App",
101 | customTitle: ()
109 | }}
110 | />
111 | );
112 | }
113 | }
114 |
115 | export default Scene;
116 |
--------------------------------------------------------------------------------
/src/components/schedule-item.js:
--------------------------------------------------------------------------------
1 | /* @flow */
2 | /*eslint-disable prefer-const */
3 |
4 | import React from "react-native";
5 |
6 | import TalkDetail from "./talk-detail";
7 |
8 | let {
9 | Image,
10 | Text,
11 | View,
12 | StyleSheet,
13 | TouchableHighlight
14 | } = React;
15 |
16 | const styles = StyleSheet.create({
17 | item: {
18 | flex: 1,
19 | borderTopWidth: 1,
20 | borderTopColor: "#ddd"
21 | },
22 | header: {
23 | flex: 1,
24 | flexDirection: "row",
25 | alignItems: "center",
26 | padding: 10,
27 | backgroundColor: "#efefef"
28 | },
29 | content: {
30 | backgroundColor: "white",
31 | padding: 10,
32 | flex: 1,
33 | flexDirection: "row",
34 | alignItems: 'center'
35 | },
36 | description: {
37 | flex: 1
38 | },
39 | time: {
40 | flex: 0,
41 | color: "#16a764",
42 | fontWeight: "bold",
43 | alignSelf: 'flex-start'
44 | },
45 | category: {
46 | flex: 0,
47 | fontWeight: "bold",
48 | position: "absolute",
49 | right: 10
50 | },
51 | image: {
52 | flex: 0,
53 | borderWidth: 2,
54 | borderRadius: 25,
55 | borderColor: "#ddd",
56 | height: 50,
57 | width: 50,
58 | marginRight: 10
59 | },
60 | gray: {
61 | color: "#888"
62 | },
63 | speaker: {
64 | fontSize: 12,
65 | fontWeight: "bold",
66 | marginTop: 2,
67 | color: "#0f1726"
68 | },
69 | company: {
70 | fontWeight: "normal"
71 | },
72 | navigable: {
73 | color: "#aaa",
74 | fontSize: 20
75 | },
76 | RethinkingRest: {
77 | color: "#9b59b6"
78 | },
79 | RethinkingRestImage: {
80 | borderColor: "#9b59b6"
81 | },
82 | DataFlow: {
83 | color: "#3498db"
84 | },
85 | DataFlowImage: {
86 | borderColor: "#3498db"
87 | },
88 | ReactGeneral: {
89 | color: "#f1c40f"
90 | },
91 | ReactGeneralImage: {
92 | borderColor: "#f1c40f"
93 | },
94 | ReactEverywhere: {
95 | color: "#6DDB9C"
96 | },
97 | ReactEverywhereImage: {
98 | borderColor: "#6DDB9C"
99 | }
100 | });
101 |
102 | class ScheduleItem extends React.Component {
103 | _goToItem(item) {
104 | this.props.navigator.push({
105 | component: TalkDetail,
106 | title: item.title.length > 25 ? item.title.substr(0,25) +"..." : item.title,
107 | passProps: {...item}
108 | });
109 | }
110 | render() {
111 | const categoryId = this.props.category ?
112 | this.props.category.replace(/\s/g, "") : null;
113 | return (
114 |
115 |
116 |
118 | {this.props.time}
119 |
120 |
122 | {this.props.category}
123 |
124 |
125 | {this.props.talk ?
126 |
128 |
129 | {this.props.photo && }
133 |
134 |
136 | {this.props.title}
137 |
138 | {this.props.speaker &&
139 |
140 | {this.props.speaker}
141 | {this.props.company &&
142 |
143 | {" - "}{this.props.company}
144 | }
145 | }
146 |
147 | ›
148 |
149 | :
150 |
151 |
152 |
154 | {this.props.title}
155 |
156 |
157 |
158 | }
159 |
160 | );
161 | }
162 | }
163 |
164 | ScheduleItem.propTypes = {
165 | category: React.PropTypes.string,
166 | company: React.PropTypes.string,
167 | speaker: React.PropTypes.string,
168 | photo: React.PropTypes.string,
169 | summary: React.PropTypes.string,
170 | talk: React.PropTypes.bool,
171 | time: React.PropTypes.string,
172 | title: React.PropTypes.string
173 | };
174 |
175 | export default ScheduleItem;
--------------------------------------------------------------------------------
/src/components/schedule-list.js:
--------------------------------------------------------------------------------
1 | /* @flow */
2 | /*eslint-disable prefer-const */
3 |
4 | import React from "react-native";
5 |
6 | import ScheduleItem from "./schedule-item";
7 |
8 | let {
9 | Text,
10 | View,
11 | ScrollView,
12 | TouchableHighlight
13 | } = React;
14 |
15 | class ScheduleList extends React.Component {
16 | render() {
17 | return (
18 |
26 | {this.props.schedule[this.props.day].slots
27 | .filter((item) => {
28 | if (this.props.filter === "All") return true;
29 | return item.category === this.props.filter;
30 | })
31 | .map((item, index) => {
32 | return ;
33 | })}
34 |
35 | );
36 | }
37 | }
38 |
39 | ScheduleList.propTypes = {
40 | day: React.PropTypes.number,
41 | dispatch: React.PropTypes.func,
42 | schedule: React.PropTypes.array,
43 | speakers: React.PropTypes.array
44 | };
45 |
46 | ScheduleList.defaultProps = {
47 | day: 0,
48 | dispatch: () => {},
49 | schedule: [],
50 | speakers: []
51 | };
52 |
53 | export default ScheduleList;
--------------------------------------------------------------------------------
/src/components/schedule.js:
--------------------------------------------------------------------------------
1 | /* @flow */
2 | /*eslint-disable prefer-const */
3 |
4 | import React from "react-native";
5 | import { connect } from "react-redux/native";
6 |
7 | import ScheduleList from "./schedule-list";
8 |
9 | let {
10 | Text,
11 | View,
12 | ScrollView,
13 | StyleSheet,
14 | TouchableHighlight
15 | } = React;
16 |
17 | const styles = StyleSheet.create({
18 | dayPicker: {
19 | flex: 0,
20 | flexDirection: 'row',
21 | shadowColor: "rgba(0,0,0,0.5)",
22 | shadowOffset: {width: -5, height: 15}
23 | },
24 | dayButton: {
25 | flex: 1
26 | },
27 | dayText: {
28 | fontSize: 12,
29 | backgroundColor: "#16a764",
30 | color: "#0f1726",
31 | textAlign: 'center',
32 | padding: 10
33 | },
34 | selected: {
35 | backgroundColor: "#1bce7c",
36 | color: "white"
37 | },
38 | filter: {
39 | textAlign: "center",
40 | fontSize: 10,
41 | padding: 3,
42 | color: "white"
43 | },
44 | RethinkingRest: {
45 | backgroundColor: "#9b59b6"
46 | },
47 | DataFlow: {
48 | backgroundColor: "#3498db"
49 | },
50 | ReactGeneral: {
51 | backgroundColor: "#f1c40f"
52 | },
53 | ReactEverywhere: {
54 | backgroundColor: "#6DDB9C"
55 | }
56 | });
57 |
58 | class Schedule extends React.Component {
59 | constructor(props) {
60 | super(props);
61 | this.state = {
62 | day: 0
63 | };
64 | }
65 | _renderFilter() {
66 | if (this.props.filter !== "All") {
67 | return FILTERED BY {this.props.filter.toUpperCase()}
68 | }
69 | }
70 | _renderSchedule() {
71 | return ;
74 | }
75 | _setDay(index) {
76 | this.setState({
77 | day: index
78 | });
79 | }
80 | render() {
81 | return (
82 |
83 |
84 |
87 |
89 | TUESDAY
90 |
91 |
92 |
95 |
97 | WEDNESDAY
98 |
99 |
100 |
101 | {this._renderFilter()}
102 | {this._renderSchedule()}
103 |
104 | );
105 | }
106 | }
107 |
108 | Schedule.propTypes = {
109 | dispatch: React.PropTypes.func,
110 | schedule: React.PropTypes.array,
111 | speakers: React.PropTypes.array
112 | };
113 |
114 | Schedule.defaultProps = {
115 | dispatch: () => {},
116 | schedule: [],
117 | speakers: []
118 | };
119 |
120 | export default connect((state) => ({
121 | schedule: state.data.schedule,
122 | speakers: state.data.speakers
123 | }))(Schedule);
--------------------------------------------------------------------------------
/src/components/social.js:
--------------------------------------------------------------------------------
1 | /* @flow */
2 | /*eslint-disable prefer-const */
3 |
4 | import React from "react-native";
5 | import { connect } from "react-redux/native";
6 | import { requestTweets, receiveTweets } from "../actions"
7 |
8 | import Tweet from "./tweet";
9 |
10 | let {
11 | ActivityIndicatorIOS,
12 | Image,
13 | Text,
14 | View,
15 | Dimensions,
16 | NativeModules,
17 | StyleSheet,
18 | ScrollView
19 | } = React;
20 |
21 | const styles = StyleSheet.create({
22 | centering: {
23 | flex: 1,
24 | flexDirection: 'column',
25 | alignItems: 'center',
26 | justifyContent: 'center',
27 | }
28 | });
29 |
30 | class Social extends React.Component {
31 | componentDidMount() {
32 | this.props.dispatch(requestTweets());
33 | NativeModules.TwitterAPI.getTweets((e, tweets) => {
34 | this.props.dispatch(receiveTweets(tweets));
35 | });
36 | }
37 | render() {
38 | console.log(this.props)
39 | return (
40 |
41 | {this.props.tweets.length > 0 ?
42 |
50 | {this.props.tweets.map((tweet, index) => {
51 | return (
52 |
53 | );
54 | })}
55 | :
56 |
64 | }
65 |
66 | );
67 | }
68 | }
69 |
70 | export default connect((state) => ({
71 | tweets: state.data.tweets,
72 | loading: state.data.loading
73 | }))(Social);
--------------------------------------------------------------------------------
/src/components/speaker.js:
--------------------------------------------------------------------------------
1 | /* @flow */
2 | /*eslint-disable prefer-const */
3 |
4 | import React from "react-native";
5 |
6 | let {
7 | Image,
8 | Text,
9 | View,
10 | Dimensions,
11 | StyleSheet
12 | } = React;
13 |
14 | const styles = StyleSheet.create({
15 | speaker: {
16 | flex: 1,
17 | height: Dimensions.get('window').height - 65,
18 | justifyContent: 'center',
19 | alignItems: "center"
20 | },
21 | image: {
22 | height: 200,
23 | width: 200,
24 | borderRadius: 100,
25 | borderWidth: 2,
26 | borderColor: "#1bce7c",
27 | marginBottom: 10,
28 | marginTop: 40
29 | },
30 | country: {
31 | fontSize: 16,
32 | color: "#888",
33 | fontStyle: "italic",
34 | textAlign: "center"
35 | },
36 | bio: {
37 | marginTop: 5,
38 | color: "#0f1726",
39 | paddingHorizontal: 30,
40 | textAlign: "center"
41 | }
42 | });
43 |
44 | class Speaker extends React.Component {
45 | render() {
46 | return (
47 |
48 |
52 |
54 | {this.props.country}
55 |
56 |
58 | {this.props.bio}
59 |
60 |
61 | );
62 | }
63 | }
64 |
65 | Speaker.propTypes = {
66 | bio: React.PropTypes.string,
67 | country: React.PropTypes.string,
68 | name: React.PropTypes.string,
69 | photo: React.PropTypes.string
70 | };
71 |
72 | export default Speaker;
--------------------------------------------------------------------------------
/src/components/speakers.js:
--------------------------------------------------------------------------------
1 | /* @flow */
2 | /*eslint-disable prefer-const */
3 |
4 | import React from "react-native";
5 | import { connect } from "react-redux/native";
6 |
7 | import Speaker from "./speaker";
8 |
9 | let {
10 | Text,
11 | View,
12 | ScrollView,
13 | Dimensions
14 | } = React;
15 |
16 | class Speakers extends React.Component {
17 | constructor(props) {
18 | super(props);
19 | this.state = {
20 | selected: 0
21 | };
22 | }
23 | checkScroll(e) {
24 | const selected = Math.floor(e.nativeEvent.contentOffset.y / (Dimensions.get('window').height - 65));
25 | if (selected < 0 || selected > this.props.speakers.length) return;
26 | if (selected !== this.state.selected) {
27 | this.setState({
28 | selected
29 | });
30 | }
31 | }
32 | render() {
33 | return (
34 |
35 |
47 | {this.props.speakers[this.state.selected].name}
57 | {this.props.speakers.map((speaker, index) => {
58 | return
59 | })}
60 |
61 |
62 | );
63 | }
64 | }
65 |
66 | Speakers.propTypes = {
67 | dispatch: React.PropTypes.func,
68 | schedule: React.PropTypes.array,
69 | speakers: React.PropTypes.array
70 | };
71 |
72 | Speakers.defaultProps = {
73 | dispatch: () => {},
74 | schedule: [],
75 | speakers: []
76 | };
77 |
78 | export default connect((state) => ({
79 | schedule: state.data.schedule,
80 | speakers: state.data.speakers
81 | }))(Speakers);
--------------------------------------------------------------------------------
/src/components/talk-detail.js:
--------------------------------------------------------------------------------
1 | /* @flow */
2 | /*eslint-disable prefer-const */
3 |
4 | import React from "react-native";
5 |
6 | let {
7 | Image,
8 | Text,
9 | View,
10 | ScrollView,
11 | StyleSheet
12 | } = React;
13 |
14 | const styles = StyleSheet.create({
15 | title: {
16 | flex: 0,
17 | textAlign: 'center',
18 | color: "#0f1726",
19 | fontSize: 16,
20 | fontWeight: "bold",
21 | padding: 20,
22 | paddingTop: 5
23 | },
24 | time: {
25 | flex: 0,
26 | textAlign: 'center',
27 | color: "#1bce7c",
28 | fontSize: 14,
29 | fontWeight: "bold",
30 | padding: 20,
31 | paddingBottom: 5
32 | },
33 | summary: {
34 | flex: 1,
35 | textAlign: 'left',
36 | color: "#0f1726",
37 | fontSize: 14,
38 | paddingHorizontal: 20
39 | },
40 | image: {
41 | height: 100,
42 | width: 100,
43 | borderRadius: 50,
44 | borderWidth: 2,
45 | borderColor: "#1bce7c",
46 | margin: 10,
47 | alignSelf: 'center'
48 | },
49 | speaker: {
50 | color: "#0f1726",
51 | fontSize: 18,
52 | fontWeight: "600",
53 | margin: 5,
54 | textAlign: "center"
55 | },
56 | company: {
57 | fontSize: 16,
58 | color: "#888",
59 | fontStyle: "italic",
60 | textAlign: "center"
61 | },
62 | });
63 |
64 | class TalkDetail extends React.Component {
65 | render() {
66 | return (
67 |
75 |
79 |
81 | {this.props.speaker}
82 |
83 |
85 | {this.props.company}
86 |
87 | {this.props.time}
88 |
89 | {this.props.title.toUpperCase()}
90 |
91 | {this.props.summary}
92 |
93 | );
94 | }
95 | }
96 |
97 | TalkDetail.propTypes = {
98 | category: React.PropTypes.string,
99 | company: React.PropTypes.string,
100 | speaker: React.PropTypes.string,
101 | photo: React.PropTypes.string,
102 | summary: React.PropTypes.string,
103 | talk: React.PropTypes.bool,
104 | time: React.PropTypes.string,
105 | title: React.PropTypes.string
106 | };
107 |
108 | export default TalkDetail;
--------------------------------------------------------------------------------
/src/components/tweet.js:
--------------------------------------------------------------------------------
1 | /* @flow */
2 | /*eslint-disable prefer-const */
3 |
4 | import React from "react-native";
5 |
6 | let {
7 | Image,
8 | Text,
9 | View,
10 | StyleSheet
11 | } = React;
12 |
13 | const styles = StyleSheet.create({
14 | item: {
15 | flex: 1,
16 | borderTopWidth: 1,
17 | borderTopColor: "#ddd",
18 | backgroundColor: "white",
19 | padding: 10,
20 | flex: 1,
21 | flexDirection: "row",
22 | alignItems: 'flex-start'
23 | },
24 | description: {
25 | flex: 1
26 | },
27 | title: {
28 | flex: 0,
29 | marginBottom: 5
30 | },
31 | image: {
32 | flex: 0,
33 | borderWidth: 2,
34 | borderRadius: 25,
35 | borderColor: "#ddd",
36 | height: 50,
37 | width: 50,
38 | marginRight: 10
39 | },
40 | speaker: {
41 | fontSize: 12,
42 | fontWeight: "bold",
43 | marginTop: 2,
44 | color: "#16a764"
45 | },
46 | company: {
47 | fontWeight: "normal",
48 | color: "#0f1726"
49 | }
50 | });
51 |
52 | class Tweet extends React.Component {
53 | render() {
54 | return (
55 |
56 |
60 |
61 |
63 | {this.props.text}
64 |
65 |
66 | {this.props.user.name}
67 |
68 | {" - @"}{this.props.user.screen_name}
69 |
70 |
71 |
72 |
73 | );
74 | }
75 | }
76 |
77 | export default Tweet;
--------------------------------------------------------------------------------
/src/containers/app.js:
--------------------------------------------------------------------------------
1 | /* @flow */
2 | /*eslint-disable prefer-const */
3 |
4 | import React from "react-native";
5 | import { connect } from "react-redux/native";
6 | import { fetchData } from "../actions";
7 |
8 | import Schedule from "../components/schedule";
9 | import Speakers from "../components/speakers";
10 | import ReactiveMap from "../components/map";
11 | import Social from "../components/social";
12 |
13 | let {
14 | TabBarIOS,
15 | Text
16 | } = React;
17 |
18 | const scheduleIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAFMN540AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAZpJREFUeNpiYCAADAjKGAAEEFbZ/wwkAYAAwqW1gWTdDWTbCxBARCEFIBZA4p8n6B4mIPEeh+QHJjTjkMEFBjyS7zEYxDqIASCAcKEEqGn/oXg9HuvhYUHIOgFsvk8gZDK+xERqynJA5qwnUTOG+vNEOv08oTQK8kYB1HkOUJswAgoggKiOBKA2weL4PTQ2iPJPAw4D/0PTAs6EKkCgcDiPzYAGHGXLf2LE/hOTkpC8gBIGBSRohmdBJuRcS2KMwDXjAoxkpVVS1JOS9Bqw5YHzRPr1PK665DyBWoigC99D/QTLUQXQKKNujQAQYAOGGImMmXxoQG8A4oNYEiQoLO2BOABU/wDxRHKDCBYp5/E2E/DrPw81g2j950kog/8TmRzPE1OBkRJE/0nISO9xeWY9GVn6P4nZfz0uQxxoaLEDsnoWKhtONEAucj/gSIGMBDApKf0DribXfxIbQ6RULP/xVe+wVogBFS01ILbMVUAqPAQo9CWsEFEgtSF/Hsm1AkRaBgu186RayICn6bEeremN3DxbT0aDmf4AAOrcayEDnrqrAAAAAElFTkSuQmCC';
19 | const speakerIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAFMN540AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAi9JREFUeNpiYEADzEjsBAZ8YD2UNgAIIKyy/4H4PgMxQAFEAAQQulYYaIAxmJAEGZHYF9B1w3ScR9ZNFAAIIKJdK4DEP49LIUyiAeTy92heK4TSH5AFG9AUOTCg2YUM3mMwsIQedgAQQLhQAtS0/1C8Ho/18LA4jyVV/EfSKIDFiWCbBLB5Bgr68fkJ3YPYUlkBEtsBW6JlwBGF+3EkchTFAkiKE9BclkAoXcBi+j/UmQ5QvB5bQAEEENWRAFIU/YfamECMRlzZSQBqkAIDnoQqgBb399EC6Dw2AxrQypb1SIr+E0r06ALzcWUfqOsScKWeAPQUhMXw98gF1AW0DHIATfEHLAGIPa1isakBnzx6Wt1PoJhaz4AnC6IXpejiArhyUQKasxKQXCKAK2MYEEhFRGWO91CFsBxVADWUurUAQIDiq62GYRgGagwKIRDCYIEQCGGwQBiDaQgKYaUwBIZSCNkiOZNlxY/up1X7UbWx3bNzdz3tvDje6Z96Q6C37/WeKGTH+oqT3Yfx+S9EETEH0QTY6wFjuNcD42C+lYCIV8X7VSFDsLh6CJgEUcaEWRnrorRrl1T2JcjV4AmVdfFZU6AV47cJEXHlSkriZCCWJJeiVRtIXzVHqqEiJt4Z6UvJs9J/zSlVib6KY3GcFFgd22Yxhu/XSynIY9LrZHBq9HJuIORxR0vQcK9GA42V/F9UQiLhqJEHUu3idE8DNTiaUApYiL41dg1JK84Czzs+qqGoX/ybRuYAAAAASUVORK5CYII=';
20 | const mapIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAFMN540AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAbBJREFUeNpiYMAD/iNz5mNTARYECCDi9GMF72EMgABCRgnEGPGfKPOBYD8DsQAggIhGMF8LoEucR3JcABD3YwsNEH0fiB3wWXGeoAA2oECU8wECCBcSgFoDC9oCYjXNJzWG0YNEAMlW5IjFG0TIgRuAFK5Eh9h9AtFLEIACyICk9I4jDBpwSQIEEE1QAVIon8eWjPE5VQBLYCWQlc2RDBAgJp4DsCQQvPEsgJSC/uPQjBJlTEjsD0jsB+SE8nm0lAYrE7AlXwZScvt8UoooYtM8wSLzPKlpGgYMiC1JkAux+YQSDgsOcVBUPYS6gJEmuQcgwAYMEeudAKTwWwDEB5FSMyhL2CPl2EQg3kCpw2AZM4EEPQlYcgTJhdh7LEVHAFJ2g9UIAVgKhvekJksGtLqdAUv+xobv4wgtrIAJT1GGXioJEKjw0eU+4Gq14LMYpOkCWk0MEgvEYzG6nAPUjA+kBrUBNKgMyIgmSvSipFAFEosuUnMC3izlQIRaB0qzEjZfvCfQKmmAqlFgoAHYD802Amip/T5tmvPYg74AqaVEctCykGHxBmgZP5/E8n5wAABtaHmy0u+nOgAAAABJRU5ErkJggg==';
21 | const socialIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAFMN540AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAKRJREFUeNpiYMAB/sMYTAyEAEAAUQMBBBBBxIjNbVjkKAAAAUQ2+s+Ew2FgwIIrZAkJ/ifKTtIBQABR1++EHEqMZ4jSTJGHmch0NtYYJMZfjMQkXIKJHiCABkf8UiW0ydZMP2djy6mMBAxjHA2wgQgwxgHLUQABNihqQIpLVEqCipYW/yen3GWkwGGMNMsc9PAx1cCAtSZYBiqzjiau0cQ1CqgGAGwBKSveXyQnAAAAAElFTkSuQmCC';
22 |
23 | class App extends React.Component {
24 | constructor(props) {
25 | super(props);
26 | this.state = {
27 | selectedTab: 'schedule'
28 | };
29 | }
30 | render() {
31 | return (
32 |
34 | {
39 | this.setState({
40 | selectedTab: 'schedule',
41 | });
42 | this.props.showFilter(true);
43 | }}>
44 |
45 |
46 | {
51 | this.setState({
52 | selectedTab: 'speakers',
53 | });
54 | this.props.showFilter(false);
55 | }}>
56 |
57 |
58 | {
63 | this.setState({
64 | selectedTab: 'map',
65 | });
66 | this.props.showFilter(false);
67 | }}>
68 |
69 |
70 | {
75 | this.setState({
76 | selectedTab: 'social',
77 | });
78 | this.props.showFilter(false);
79 | }}>
80 |
81 |
82 |
83 | );
84 | }
85 | }
86 |
87 | export default App;
88 |
--------------------------------------------------------------------------------
/src/containers/root.js:
--------------------------------------------------------------------------------
1 | /* @flow */
2 |
3 | import React from "react-native";
4 | import { Provider } from "react-redux/native";
5 | import configureStore from "../store/configure-store";
6 | import Scene from "../components/scene";
7 |
8 | import data from "../data";
9 |
10 | const store = configureStore({data: Object.assign({tweets: [], loading: false},data)});
11 |
12 | class Root extends React.Component {
13 | render() {
14 | return (
15 |
16 | {() => }
17 |
18 | );
19 | }
20 | }
21 |
22 | export default Root;
23 |
--------------------------------------------------------------------------------
/src/reducers/index.js:
--------------------------------------------------------------------------------
1 | /* @flow */
2 |
3 | import { combineReducers } from "redux";
4 | import * as types from "../actions";
5 |
6 | const data = (state = {
7 | schedule: [],
8 | speakers: [],
9 | tweets: [],
10 | loading: false
11 | }, action) => {
12 | switch (action.type) {
13 | case types.REQUEST_TWEETS:
14 | return Object.assign({}, state, {
15 | loading: true
16 | });
17 | case types.RECEIVE_TWEETS:
18 | return Object.assign({}, state, {
19 | loading: false,
20 | tweets: action.tweets
21 | });
22 | default:
23 | return state;
24 | }
25 | return state
26 | };
27 |
28 | const rootReducer = combineReducers({
29 | data
30 | });
31 |
32 | export default rootReducer;
33 |
--------------------------------------------------------------------------------
/src/store/configure-store.js:
--------------------------------------------------------------------------------
1 | /* @flow */
2 |
3 | import { createStore, applyMiddleware } from "redux";
4 | import thunkMiddleware from "redux-thunk";
5 | import createLogger from "redux-logger";
6 | import rootReducer from "../reducers";
7 |
8 | const loggerMiddleware = createLogger();
9 |
10 | const createStoreWithMiddleware = applyMiddleware(
11 | thunkMiddleware,
12 | loggerMiddleware
13 | )(createStore);
14 |
15 | const configureStore = function (initialState: Object = {}): Function {
16 | return createStoreWithMiddleware(rootReducer, initialState);
17 | };
18 |
19 | export default configureStore;
20 |
--------------------------------------------------------------------------------