commit b4c42d0dbcab3ec3cd1afb862e6420341c04cb2f Author: gta02 <190525238@qq.com> Date: Fri Jun 8 16:29:41 2018 +0800 publish 1.0.1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..eb39591 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.pbxproj -text \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9cadbfe --- /dev/null +++ b/.gitignore @@ -0,0 +1,46 @@ + +# OSX +# +.DS_Store + +# node.js +# +node_modules/ +npm-debug.log +yarn-error.log + + +# Xcode +# +build/ +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata +*.xccheckout +*.moved-aside +DerivedData +*.hmap +*.ipa +*.xcuserstate +project.xcworkspace + + +# Android/IntelliJ +# +build/ +.idea +.gradle +local.properties +*.iml + +# BUCK +buck-out/ +\.buckd/ +*.keystore + \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..a51af1b --- /dev/null +++ b/README.md @@ -0,0 +1,107 @@ + +# react-native-weibo-login + +## Getting started + +`$ npm install react-native-weibo-login --save` + +### Mostly automatic installation + +`$ react-native link react-native-weibo-login` + +### Manual installation + + +#### iOS + +1. Add `node_modules/react-native-weibo-login/ios/WeiboSDK.bundle` in you project, or else it will be crash. +2. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`, Go to `node_modules` ➜ `react-native-weibo-login` and add `RCTWeiBo.xcodeproj`. +3. In XCode, in the project navigator, select your project. + + Add + - libRCTWeiBo.a + - QuartzCore.framework + - ImageIO.framework + - SystemConfiguration.framework + - Security.framework + - CoreTelephony.framework + - CoreText.framework + - UIKit.framework + - Foundation.framework + - CoreGraphics.framework + - Photos.framework + - libz.tbd + - libsqlite3.tbd + + to your project's `Build Phases` ➜ `Link Binary With Libraries`. +4. In the project navigator, in `Targets` ➜ `info` ➜ `URL types`. Add new URL type, `Identifier` value is `com.weibo`, `URL Schemes` value is `wb` + `you weibo appKey`, such as: `wb2317411734`. +5. Right click `Info.plist` open as source code, insert the following lines: + ```xml + LSApplicationQueriesSchemes + + sinaweibohd + weibosdk + sinaweibo + weibosdk2.5 + + ``` +6. Copy the following in `AppDelegate.m`: +``` +- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url +sourceApplication:(NSString *)sourceApplication annotation:(id)annotation +{ + return [RCTLinkingManager application:application openURL:url + sourceApplication:sourceApplication annotation:annotation]; +} +``` + +#### Android + +1. Open up `android/app/src/main/java/[...]/MainActivity.java` + - Add `import com.gratong.WeiBoPackage;` to the imports at the top of the file. + - Add `new WeiBoPackage()` to the list returned by the `getPackages()` method. +2. Append the following lines to `android/settings.gradle`: + ``` + include ':react-native-weibo-login' + project(':react-native-weibo-login').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-weibo-login/android') + ``` +3. Insert the following lines inside the dependencies block in `android/app/build.gradle`: + ``` + compile project(':react-native-weibo-login') + ``` +4. Insert the following lines inside the allprojects block in `android/build.gradle`: + ``` + maven { url "https://dl.bintray.com/thelasterstar/maven/" } + ``` + such as: + ``` + allprojects { + repositories { + mavenLocal() + jcenter() + maven { url "https://dl.bintray.com/thelasterstar/maven/" } + } + } + ``` +} + + +## Usage +```javascript +import * as WeiBo from 'react-native-weibo-login'; + + // 设置登录参数 +let config = { + appKey:"2317411734", + scope: 'all', + redirectURI: 'https://api.weibo.com/oauth2/default.html', +} + +WeiBo.login(config) + .then(res=>{ + console.log('login success:',res) + }).catch(err=>{ + console.log('login fail:',err) +}) +``` + \ No newline at end of file diff --git a/WeiboLoginDemo/.babelrc b/WeiboLoginDemo/.babelrc new file mode 100644 index 0000000..a9ce136 --- /dev/null +++ b/WeiboLoginDemo/.babelrc @@ -0,0 +1,3 @@ +{ + "presets": ["react-native"] +} diff --git a/WeiboLoginDemo/.buckconfig b/WeiboLoginDemo/.buckconfig new file mode 100644 index 0000000..934256c --- /dev/null +++ b/WeiboLoginDemo/.buckconfig @@ -0,0 +1,6 @@ + +[android] + target = Google Inc.:Google APIs:23 + +[maven_repositories] + central = https://repo1.maven.org/maven2 diff --git a/WeiboLoginDemo/.flowconfig b/WeiboLoginDemo/.flowconfig new file mode 100644 index 0000000..7d5e2d3 --- /dev/null +++ b/WeiboLoginDemo/.flowconfig @@ -0,0 +1,54 @@ +[ignore] +; We fork some components by platform +.*/*[.]android.js + +; Ignore "BUCK" generated dirs +/\.buckd/ + +; Ignore unexpected extra "@providesModule" +.*/node_modules/.*/node_modules/fbjs/.* + +; Ignore duplicate module providers +; For RN Apps installed via npm, "Libraries" folder is inside +; "node_modules/react-native" but in the source repo it is in the root +.*/Libraries/react-native/React.js + +; Ignore polyfills +.*/Libraries/polyfills/.* + +; Ignore metro +.*/node_modules/metro/.* + +[include] + +[libs] +node_modules/react-native/Libraries/react-native/react-native-interface.js +node_modules/react-native/flow/ +node_modules/react-native/flow-github/ + +[options] +emoji=true + +module.system=haste + +munge_underscores=true + +module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' + +module.file_ext=.js +module.file_ext=.jsx +module.file_ext=.json +module.file_ext=.native.js + +suppress_type=$FlowIssue +suppress_type=$FlowFixMe +suppress_type=$FlowFixMeProps +suppress_type=$FlowFixMeState + +suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) +suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ +suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy +suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError + +[version] +^0.67.0 diff --git a/WeiboLoginDemo/.gitattributes b/WeiboLoginDemo/.gitattributes new file mode 100644 index 0000000..d42ff18 --- /dev/null +++ b/WeiboLoginDemo/.gitattributes @@ -0,0 +1 @@ +*.pbxproj -text diff --git a/WeiboLoginDemo/.gitignore b/WeiboLoginDemo/.gitignore new file mode 100644 index 0000000..5d64756 --- /dev/null +++ b/WeiboLoginDemo/.gitignore @@ -0,0 +1,56 @@ +# OSX +# +.DS_Store + +# Xcode +# +build/ +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata +*.xccheckout +*.moved-aside +DerivedData +*.hmap +*.ipa +*.xcuserstate +project.xcworkspace + +# Android/IntelliJ +# +build/ +.idea +.gradle +local.properties +*.iml + +# node.js +# +node_modules/ +npm-debug.log +yarn-error.log + +# BUCK +buck-out/ +\.buckd/ +*.keystore + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/ + +*/fastlane/report.xml +*/fastlane/Preview.html +*/fastlane/screenshots + +# Bundle artifact +*.jsbundle diff --git a/WeiboLoginDemo/.watchmanconfig b/WeiboLoginDemo/.watchmanconfig new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/WeiboLoginDemo/.watchmanconfig @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/WeiboLoginDemo/App.js b/WeiboLoginDemo/App.js new file mode 100644 index 0000000..e34959a --- /dev/null +++ b/WeiboLoginDemo/App.js @@ -0,0 +1,118 @@ +/** + * Sample React Native App + * https://github.com/facebook/react-native + * @flow + */ + +import React, { Component } from 'react'; +import { + StyleSheet, + Text, + View, + TouchableOpacity, + Image, +} from 'react-native'; +import * as WeiBo from 'react-native-weibo-login'; + +type Props = {}; +export default class App extends Component { + + constructor(props){ + super(props); + this.state={ + data:'' + } + } + + wbLogin=()=>{ + // 设置登录参数 + let config = { + appKey:"2317411734", + scope: 'all', + redirectURI: 'https://api.weibo.com/oauth2/default.html', + } + WeiBo.login(config) + .then(res=>{ + console.log('login success:',res) + this.setState({data:res}) + }).catch(err=>{ + console.log('login fail:',err) + this.setState({data:err.errMsg}) + }) +} + +renderWeiboLogin(){ + return( + + + + 第三方登录 + + + + + + 微博 + + + + ) +} + +render() { + return ( + + + + 微博登录回调信息: + + {this.state.data?JSON.stringify(this.state.data):'未授权'} + + + + {this.renderWeiboLogin()} + + ); + } +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + marginHorizontal:20 + }, + text:{ + fontSize:15, + lineHeight:25, + }, + + loginContainer:{ + marginTop:25, + flexDirection:'row', + justifyContent:'space-around' + }, + loginItem:{ + alignItems:'center', + }, + loginLine:{ + flex:1, + backgroundColor:"#ECECEC", + height:1 + }, + loginIcon:{ + width:50, + height:50 + }, + loginText:{ + fontSize:13, + color:'#444444', + marginTop:10 + }, + +}); diff --git a/WeiboLoginDemo/android/app/BUCK b/WeiboLoginDemo/android/app/BUCK new file mode 100644 index 0000000..28b0768 --- /dev/null +++ b/WeiboLoginDemo/android/app/BUCK @@ -0,0 +1,65 @@ +# To learn about Buck see [Docs](https://buckbuild.com/). +# To run your application with Buck: +# - install Buck +# - `npm start` - to start the packager +# - `cd android` +# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` +# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck +# - `buck install -r android/app` - compile, install and run application +# + +lib_deps = [] + +for jarfile in glob(['libs/*.jar']): + name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')] + lib_deps.append(':' + name) + prebuilt_jar( + name = name, + binary_jar = jarfile, + ) + +for aarfile in glob(['libs/*.aar']): + name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')] + lib_deps.append(':' + name) + android_prebuilt_aar( + name = name, + aar = aarfile, + ) + +android_library( + name = "all-libs", + exported_deps = lib_deps, +) + +android_library( + name = "app-code", + srcs = glob([ + "src/main/java/**/*.java", + ]), + deps = [ + ":all-libs", + ":build_config", + ":res", + ], +) + +android_build_config( + name = "build_config", + package = "com.weibologindemo", +) + +android_resource( + name = "res", + package = "com.weibologindemo", + res = "src/main/res", +) + +android_binary( + name = "app", + keystore = "//android/keystores:debug", + manifest = "src/main/AndroidManifest.xml", + package_type = "debug", + deps = [ + ":app-code", + ], +) diff --git a/WeiboLoginDemo/android/app/build.gradle b/WeiboLoginDemo/android/app/build.gradle new file mode 100644 index 0000000..a0f3925 --- /dev/null +++ b/WeiboLoginDemo/android/app/build.gradle @@ -0,0 +1,151 @@ +apply plugin: "com.android.application" + +import com.android.build.OutputFile + +/** + * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets + * and bundleReleaseJsAndAssets). + * These basically call `react-native bundle` with the correct arguments during the Android build + * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the + * bundle directly from the development server. Below you can see all the possible configurations + * and their defaults. If you decide to add a configuration block, make sure to add it before the + * `apply from: "../../node_modules/react-native/react.gradle"` line. + * + * project.ext.react = [ + * // the name of the generated asset file containing your JS bundle + * bundleAssetName: "index.android.bundle", + * + * // the entry file for bundle generation + * entryFile: "index.android.js", + * + * // whether to bundle JS and assets in debug mode + * bundleInDebug: false, + * + * // whether to bundle JS and assets in release mode + * bundleInRelease: true, + * + * // whether to bundle JS and assets in another build variant (if configured). + * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants + * // The configuration property can be in the following formats + * // 'bundleIn${productFlavor}${buildType}' + * // 'bundleIn${buildType}' + * // bundleInFreeDebug: true, + * // bundleInPaidRelease: true, + * // bundleInBeta: true, + * + * // whether to disable dev mode in custom build variants (by default only disabled in release) + * // for example: to disable dev mode in the staging build type (if configured) + * devDisabledInStaging: true, + * // The configuration property can be in the following formats + * // 'devDisabledIn${productFlavor}${buildType}' + * // 'devDisabledIn${buildType}' + * + * // the root of your project, i.e. where "package.json" lives + * root: "../../", + * + * // where to put the JS bundle asset in debug mode + * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", + * + * // where to put the JS bundle asset in release mode + * jsBundleDirRelease: "$buildDir/intermediates/assets/release", + * + * // where to put drawable resources / React Native assets, e.g. the ones you use via + * // require('./image.png')), in debug mode + * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", + * + * // where to put drawable resources / React Native assets, e.g. the ones you use via + * // require('./image.png')), in release mode + * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", + * + * // by default the gradle tasks are skipped if none of the JS files or assets change; this means + * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to + * // date; if you have any other folders that you want to ignore for performance reasons (gradle + * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ + * // for example, you might want to remove it from here. + * inputExcludes: ["android/**", "ios/**"], + * + * // override which node gets called and with what additional arguments + * nodeExecutableAndArgs: ["node"], + * + * // supply additional arguments to the packager + * extraPackagerArgs: [] + * ] + */ + +project.ext.react = [ + entryFile: "index.js" +] + +apply from: "../../node_modules/react-native/react.gradle" + +/** + * Set this to true to create two separate APKs instead of one: + * - An APK that only works on ARM devices + * - An APK that only works on x86 devices + * The advantage is the size of the APK is reduced by about 4MB. + * Upload all the APKs to the Play Store and people will download + * the correct one based on the CPU architecture of their device. + */ +def enableSeparateBuildPerCPUArchitecture = false + +/** + * Run Proguard to shrink the Java bytecode in release builds. + */ +def enableProguardInReleaseBuilds = false + +android { + compileSdkVersion 23 + buildToolsVersion "23.0.1" + + defaultConfig { + applicationId "com.weibologindemo" + minSdkVersion 16 + targetSdkVersion 22 + versionCode 1 + versionName "1.0" + ndk { + abiFilters "armeabi-v7a", "x86" + } + } + splits { + abi { + reset() + enable enableSeparateBuildPerCPUArchitecture + universalApk false // If true, also generate a universal APK + include "armeabi-v7a", "x86" + } + } + buildTypes { + release { + minifyEnabled enableProguardInReleaseBuilds + proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" + } + } + // applicationVariants are e.g. debug, release + applicationVariants.all { variant -> + variant.outputs.each { output -> + // For each separate APK per architecture, set a unique version code as described here: + // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits + def versionCodes = ["armeabi-v7a":1, "x86":2] + def abi = output.getFilter(OutputFile.ABI) + if (abi != null) { // null for the universal-debug, universal-release variants + output.versionCodeOverride = + versionCodes.get(abi) * 1048576 + defaultConfig.versionCode + } + } + } +} + +dependencies { + compile project(':react-native-weibo-login') + compile fileTree(dir: "libs", include: ["*.jar"]) + compile "com.android.support:appcompat-v7:23.0.1" + compile "com.facebook.react:react-native:+" // From node_modules +} + +// Run this once to be able to run the application with BUCK +// puts all compile dependencies into folder libs for BUCK to use +task copyDownloadableDepsToLibs(type: Copy) { + from configurations.compile + into 'libs' +} diff --git a/WeiboLoginDemo/android/app/proguard-rules.pro b/WeiboLoginDemo/android/app/proguard-rules.pro new file mode 100644 index 0000000..6e8516c --- /dev/null +++ b/WeiboLoginDemo/android/app/proguard-rules.pro @@ -0,0 +1,70 @@ +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the proguardFiles +# directive in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Disabling obfuscation is useful if you collect stack traces from production crashes +# (unless you are using a system that supports de-obfuscate the stack traces). +-dontobfuscate + +# React Native + +# Keep our interfaces so they can be used by other ProGuard rules. +# See http://sourceforge.net/p/proguard/bugs/466/ +-keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip +-keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters +-keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip + +# Do not strip any method/class that is annotated with @DoNotStrip +-keep @com.facebook.proguard.annotations.DoNotStrip class * +-keep @com.facebook.common.internal.DoNotStrip class * +-keepclassmembers class * { + @com.facebook.proguard.annotations.DoNotStrip *; + @com.facebook.common.internal.DoNotStrip *; +} + +-keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * { + void set*(***); + *** get*(); +} + +-keep class * extends com.facebook.react.bridge.JavaScriptModule { *; } +-keep class * extends com.facebook.react.bridge.NativeModule { *; } +-keepclassmembers,includedescriptorclasses class * { native ; } +-keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; } +-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp ; } +-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup ; } + +-dontwarn com.facebook.react.** + +# TextLayoutBuilder uses a non-public Android constructor within StaticLayout. +# See libs/proxy/src/main/java/com/facebook/fbui/textlayoutbuilder/proxy for details. +-dontwarn android.text.StaticLayout + +# okhttp + +-keepattributes Signature +-keepattributes *Annotation* +-keep class okhttp3.** { *; } +-keep interface okhttp3.** { *; } +-dontwarn okhttp3.** + +# okio + +-keep class sun.misc.Unsafe { *; } +-dontwarn java.nio.file.* +-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement +-dontwarn okio.** diff --git a/WeiboLoginDemo/android/app/src/main/AndroidManifest.xml b/WeiboLoginDemo/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..da7b67e --- /dev/null +++ b/WeiboLoginDemo/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + diff --git a/WeiboLoginDemo/android/app/src/main/java/com/weibologindemo/MainActivity.java b/WeiboLoginDemo/android/app/src/main/java/com/weibologindemo/MainActivity.java new file mode 100644 index 0000000..2f4d724 --- /dev/null +++ b/WeiboLoginDemo/android/app/src/main/java/com/weibologindemo/MainActivity.java @@ -0,0 +1,15 @@ +package com.weibologindemo; + +import com.facebook.react.ReactActivity; + +public class MainActivity extends ReactActivity { + + /** + * Returns the name of the main component registered from JavaScript. + * This is used to schedule rendering of the component. + */ + @Override + protected String getMainComponentName() { + return "WeiboLoginDemo"; + } +} diff --git a/WeiboLoginDemo/android/app/src/main/java/com/weibologindemo/MainApplication.java b/WeiboLoginDemo/android/app/src/main/java/com/weibologindemo/MainApplication.java new file mode 100644 index 0000000..72f09a8 --- /dev/null +++ b/WeiboLoginDemo/android/app/src/main/java/com/weibologindemo/MainApplication.java @@ -0,0 +1,47 @@ +package com.weibologindemo; + +import android.app.Application; + +import com.facebook.react.ReactApplication; +import com.gratong.WeiBoPackage; +import com.facebook.react.ReactNativeHost; +import com.facebook.react.ReactPackage; +import com.facebook.react.shell.MainReactPackage; +import com.facebook.soloader.SoLoader; + +import java.util.Arrays; +import java.util.List; + +public class MainApplication extends Application implements ReactApplication { + + private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { + @Override + public boolean getUseDeveloperSupport() { + return BuildConfig.DEBUG; + } + + @Override + protected List getPackages() { + return Arrays.asList( + new MainReactPackage(), + new WeiBoPackage() + ); + } + + @Override + protected String getJSMainModuleName() { + return "index"; + } + }; + + @Override + public ReactNativeHost getReactNativeHost() { + return mReactNativeHost; + } + + @Override + public void onCreate() { + super.onCreate(); + SoLoader.init(this, /* native exopackage */ false); + } +} diff --git a/WeiboLoginDemo/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/WeiboLoginDemo/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..cde69bc Binary files /dev/null and b/WeiboLoginDemo/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/WeiboLoginDemo/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/WeiboLoginDemo/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..c133a0c Binary files /dev/null and b/WeiboLoginDemo/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/WeiboLoginDemo/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/WeiboLoginDemo/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..bfa42f0 Binary files /dev/null and b/WeiboLoginDemo/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/WeiboLoginDemo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/WeiboLoginDemo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..324e72c Binary files /dev/null and b/WeiboLoginDemo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/WeiboLoginDemo/android/app/src/main/res/values/strings.xml b/WeiboLoginDemo/android/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..6cdd183 --- /dev/null +++ b/WeiboLoginDemo/android/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + WeiboLoginDemo + diff --git a/WeiboLoginDemo/android/app/src/main/res/values/styles.xml b/WeiboLoginDemo/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..319eb0c --- /dev/null +++ b/WeiboLoginDemo/android/app/src/main/res/values/styles.xml @@ -0,0 +1,8 @@ + + + + + + diff --git a/WeiboLoginDemo/android/build.gradle b/WeiboLoginDemo/android/build.gradle new file mode 100644 index 0000000..6b506fe --- /dev/null +++ b/WeiboLoginDemo/android/build.gradle @@ -0,0 +1,25 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +buildscript { + repositories { + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle:2.2.3' + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + mavenLocal() + jcenter() + maven { + // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm + url "$rootDir/../node_modules/react-native/android" + } + maven { url "https://dl.bintray.com/thelasterstar/maven/" } + } +} diff --git a/WeiboLoginDemo/android/gradle.properties b/WeiboLoginDemo/android/gradle.properties new file mode 100644 index 0000000..1fd964e --- /dev/null +++ b/WeiboLoginDemo/android/gradle.properties @@ -0,0 +1,20 @@ +# Project-wide Gradle settings. + +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. + +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html + +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +# Default value: -Xmx10248m -XX:MaxPermSize=256m +# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 + +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true + +android.useDeprecatedNdk=true diff --git a/WeiboLoginDemo/android/gradle/wrapper/gradle-wrapper.jar b/WeiboLoginDemo/android/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..b5166da Binary files /dev/null and b/WeiboLoginDemo/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/WeiboLoginDemo/android/gradle/wrapper/gradle-wrapper.properties b/WeiboLoginDemo/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..dbdc05d --- /dev/null +++ b/WeiboLoginDemo/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip diff --git a/WeiboLoginDemo/android/gradlew b/WeiboLoginDemo/android/gradlew new file mode 100755 index 0000000..91a7e26 --- /dev/null +++ b/WeiboLoginDemo/android/gradlew @@ -0,0 +1,164 @@ +#!/usr/bin/env bash + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; +esac + +# For Cygwin, ensure paths are in UNIX format before anything is touched. +if $cygwin ; then + [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` +fi + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >&- +APP_HOME="`pwd -P`" +cd "$SAVED" >&- + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/WeiboLoginDemo/android/gradlew.bat b/WeiboLoginDemo/android/gradlew.bat new file mode 100644 index 0000000..aec9973 --- /dev/null +++ b/WeiboLoginDemo/android/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/WeiboLoginDemo/android/keystores/BUCK b/WeiboLoginDemo/android/keystores/BUCK new file mode 100644 index 0000000..88e4c31 --- /dev/null +++ b/WeiboLoginDemo/android/keystores/BUCK @@ -0,0 +1,8 @@ +keystore( + name = "debug", + properties = "debug.keystore.properties", + store = "debug.keystore", + visibility = [ + "PUBLIC", + ], +) diff --git a/WeiboLoginDemo/android/keystores/debug.keystore.properties b/WeiboLoginDemo/android/keystores/debug.keystore.properties new file mode 100644 index 0000000..121bfb4 --- /dev/null +++ b/WeiboLoginDemo/android/keystores/debug.keystore.properties @@ -0,0 +1,4 @@ +key.store=debug.keystore +key.alias=androiddebugkey +key.store.password=android +key.alias.password=android diff --git a/WeiboLoginDemo/android/settings.gradle b/WeiboLoginDemo/android/settings.gradle new file mode 100644 index 0000000..1064903 --- /dev/null +++ b/WeiboLoginDemo/android/settings.gradle @@ -0,0 +1,5 @@ +rootProject.name = 'WeiboLoginDemo' +include ':react-native-weibo-login' +project(':react-native-weibo-login').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-weibo-login/android') + +include ':app' diff --git a/WeiboLoginDemo/app.json b/WeiboLoginDemo/app.json new file mode 100644 index 0000000..1d2c5f0 --- /dev/null +++ b/WeiboLoginDemo/app.json @@ -0,0 +1,4 @@ +{ + "name": "WeiboLoginDemo", + "displayName": "WeiboLoginDemo" +} \ No newline at end of file diff --git a/WeiboLoginDemo/index.js b/WeiboLoginDemo/index.js new file mode 100644 index 0000000..7267722 --- /dev/null +++ b/WeiboLoginDemo/index.js @@ -0,0 +1,4 @@ +import { AppRegistry } from 'react-native'; +import App from './App'; + +AppRegistry.registerComponent('WeiboLoginDemo', () => App); diff --git a/WeiboLoginDemo/ios/WeiboLoginDemo-tvOS/Info.plist b/WeiboLoginDemo/ios/WeiboLoginDemo-tvOS/Info.plist new file mode 100644 index 0000000..2fb6a11 --- /dev/null +++ b/WeiboLoginDemo/ios/WeiboLoginDemo-tvOS/Info.plist @@ -0,0 +1,54 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + NSLocationWhenInUseUsageDescription + + NSAppTransportSecurity + + + NSExceptionDomains + + localhost + + NSExceptionAllowsInsecureHTTPLoads + + + + + + diff --git a/WeiboLoginDemo/ios/WeiboLoginDemo-tvOSTests/Info.plist b/WeiboLoginDemo/ios/WeiboLoginDemo-tvOSTests/Info.plist new file mode 100644 index 0000000..886825c --- /dev/null +++ b/WeiboLoginDemo/ios/WeiboLoginDemo-tvOSTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/WeiboLoginDemo/ios/WeiboLoginDemo.xcodeproj/project.pbxproj b/WeiboLoginDemo/ios/WeiboLoginDemo.xcodeproj/project.pbxproj new file mode 100644 index 0000000..72766c6 --- /dev/null +++ b/WeiboLoginDemo/ios/WeiboLoginDemo.xcodeproj/project.pbxproj @@ -0,0 +1,1615 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; + 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; + 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; }; + 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; }; + 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; }; + 00E356F31AD99517003FC87E /* WeiboLoginDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* WeiboLoginDemoTests.m */; }; + 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; }; + 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; }; + 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; }; + 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; + 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; + 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; + 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; + 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; + 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; + 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; + 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; + 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; + 2D02E4C21E0B4AEC006451C7 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */; }; + 2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */; }; + 2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */; }; + 2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */; }; + 2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */; }; + 2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */; }; + 2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */; }; + 2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D16E6891FA4F8E400B85C8A /* libReact.a */; }; + 2DCD954D1E0B4F2C00145EB5 /* WeiboLoginDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* WeiboLoginDemoTests.m */; }; + 2DF0FFEE2056DD460020B375 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact.a */; }; + 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; }; + 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; + A8BC437B20CA547B00C29B7B /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A8BC437920CA547B00C29B7B /* CoreTelephony.framework */; }; + A8BC437C20CA547B00C29B7B /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A8BC437A20CA547B00C29B7B /* CoreText.framework */; }; + A8BC437E20CA548200C29B7B /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A8BC437D20CA548200C29B7B /* QuartzCore.framework */; }; + A8BC438020CA548900C29B7B /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A8BC437F20CA548900C29B7B /* ImageIO.framework */; }; + A8BC438220CA548E00C29B7B /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A8BC438120CA548D00C29B7B /* SystemConfiguration.framework */; }; + A8BC438420CA549400C29B7B /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A8BC438320CA549400C29B7B /* Security.framework */; }; + A8BC438620CA549C00C29B7B /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A8BC438520CA549C00C29B7B /* UIKit.framework */; }; + A8BC438820CA54A100C29B7B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A8BC438720CA54A100C29B7B /* Foundation.framework */; }; + A8BC438A20CA54A600C29B7B /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A8BC438920CA54A600C29B7B /* CoreGraphics.framework */; }; + A8BC438C20CA54AA00C29B7B /* Photos.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A8BC438B20CA54AA00C29B7B /* Photos.framework */; }; + A8BC439020CA61A400C29B7B /* WeiboSDK.bundle in Resources */ = {isa = PBXBuildFile; fileRef = A8BC438F20CA61A400C29B7B /* WeiboSDK.bundle */; }; + ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; }; + CCE5B4E05D5649A5B4DC8B44 /* libRCTWeiBo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BA53AAFC1134E488C100704 /* libRCTWeiBo.a */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 134814201AA4EA6300B7C361; + remoteInfo = RCTActionSheet; + }; + 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 134814201AA4EA6300B7C361; + remoteInfo = RCTGeolocation; + }; + 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 58B5115D1A9E6B3D00147676; + remoteInfo = RCTImage; + }; + 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 58B511DB1A9E6C8500147676; + remoteInfo = RCTNetwork; + }; + 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 832C81801AAF6DEF007FA2F7; + remoteInfo = RCTVibration; + }; + 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 13B07F861A680F5B00A75B9A; + remoteInfo = WeiboLoginDemo; + }; + 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 134814201AA4EA6300B7C361; + remoteInfo = RCTSettings; + }; + 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3C86DF461ADF2C930047B81A; + remoteInfo = RCTWebSocket; + }; + 146834031AC3E56700842450 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192; + remoteInfo = React; + }; + 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 2D02E47A1E0B4A5D006451C7; + remoteInfo = "WeiboLoginDemo-tvOS"; + }; + 2D16E6711FA4F8DC00B85C8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = ADD01A681E09402E00F6D226; + remoteInfo = "RCTBlob-tvOS"; + }; + 2D16E6831FA4F8DC00B85C8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3DBE0D001F3B181A0099AA32; + remoteInfo = fishhook; + }; + 2D16E6851FA4F8DC00B85C8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3DBE0D0D1F3B181C0099AA32; + remoteInfo = "fishhook-tvOS"; + }; + 2DF0FFDE2056DD460020B375 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = EBF21BDC1FC498900052F4D5; + remoteInfo = jsinspector; + }; + 2DF0FFE02056DD460020B375 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = EBF21BFA1FC4989A0052F4D5; + remoteInfo = "jsinspector-tvOS"; + }; + 2DF0FFE22056DD460020B375 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 139D7ECE1E25DB7D00323FB7; + remoteInfo = "third-party"; + }; + 2DF0FFE42056DD460020B375 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3D383D3C1EBD27B6005632C8; + remoteInfo = "third-party-tvOS"; + }; + 2DF0FFE62056DD460020B375 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 139D7E881E25C6D100323FB7; + remoteInfo = "double-conversion"; + }; + 2DF0FFE82056DD460020B375 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3D383D621EBD27B9005632C8; + remoteInfo = "double-conversion-tvOS"; + }; + 2DF0FFEA2056DD460020B375 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 9936F3131F5F2E4B0010BF04; + remoteInfo = privatedata; + }; + 2DF0FFEC2056DD460020B375 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 9936F32F1F5F2E5B0010BF04; + remoteInfo = "privatedata-tvOS"; + }; + 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A283A1D9B042B00D4039D; + remoteInfo = "RCTImage-tvOS"; + }; + 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A28471D9B043800D4039D; + remoteInfo = "RCTLinking-tvOS"; + }; + 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A28541D9B044C00D4039D; + remoteInfo = "RCTNetwork-tvOS"; + }; + 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A28611D9B046600D4039D; + remoteInfo = "RCTSettings-tvOS"; + }; + 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A287B1D9B048500D4039D; + remoteInfo = "RCTText-tvOS"; + }; + 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A28881D9B049200D4039D; + remoteInfo = "RCTWebSocket-tvOS"; + }; + 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A28131D9B038B00D4039D; + remoteInfo = "React-tvOS"; + }; + 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3D3C059A1DE3340900C268FA; + remoteInfo = yoga; + }; + 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3D3C06751DE3340C00C268FA; + remoteInfo = "yoga-tvOS"; + }; + 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3D3CD9251DE5FBEC00167DC4; + remoteInfo = cxxreact; + }; + 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3D3CD9321DE5FBEE00167DC4; + remoteInfo = "cxxreact-tvOS"; + }; + 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3D3CD90B1DE5FBD600167DC4; + remoteInfo = jschelpers; + }; + 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3D3CD9181DE5FBD800167DC4; + remoteInfo = "jschelpers-tvOS"; + }; + 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 134814201AA4EA6300B7C361; + remoteInfo = RCTAnimation; + }; + 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A28201D9B03D100D4039D; + remoteInfo = "RCTAnimation-tvOS"; + }; + 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 134814201AA4EA6300B7C361; + remoteInfo = RCTLinking; + }; + 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 58B5119B1A9E6C1200147676; + remoteInfo = RCTText; + }; + A8BC436720CA545300C29B7B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4189BD5E666A4AEBB212DD79 /* RCTWeiBo.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 915450F51C3D1520000CBFD2; + remoteInfo = RCTWeiBo; + }; + ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 358F4ED71D1E81A9004DF814; + remoteInfo = RCTBlob; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; + 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; }; + 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; }; + 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; }; + 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; }; + 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; }; + 00E356EE1AD99517003FC87E /* WeiboLoginDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WeiboLoginDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 00E356F21AD99517003FC87E /* WeiboLoginDemoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WeiboLoginDemoTests.m; sourceTree = ""; }; + 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; }; + 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; }; + 13B07F961A680F5B00A75B9A /* WeiboLoginDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WeiboLoginDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = WeiboLoginDemo/AppDelegate.h; sourceTree = ""; }; + 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = WeiboLoginDemo/AppDelegate.m; sourceTree = ""; }; + 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; + 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = WeiboLoginDemo/Images.xcassets; sourceTree = ""; }; + 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = WeiboLoginDemo/Info.plist; sourceTree = ""; }; + 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = WeiboLoginDemo/main.m; sourceTree = ""; }; + 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; }; + 2D02E47B1E0B4A5D006451C7 /* WeiboLoginDemo-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "WeiboLoginDemo-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 2D02E4901E0B4A5D006451C7 /* WeiboLoginDemo-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "WeiboLoginDemo-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + 2D16E6891FA4F8E400B85C8A /* libReact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libReact.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 4189BD5E666A4AEBB212DD79 /* RCTWeiBo.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RCTWeiBo.xcodeproj; path = "../node_modules/react-native-weibo-login/ios/RCTWeiBo.xcodeproj"; sourceTree = ""; }; + 4BA53AAFC1134E488C100704 /* libRCTWeiBo.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRCTWeiBo.a; sourceTree = ""; }; + 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = ""; }; + 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; }; + 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; + A8BC437920CA547B00C29B7B /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; }; + A8BC437A20CA547B00C29B7B /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; }; + A8BC437D20CA548200C29B7B /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + A8BC437F20CA548900C29B7B /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; }; + A8BC438120CA548D00C29B7B /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; + A8BC438320CA549400C29B7B /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; + A8BC438520CA549C00C29B7B /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + A8BC438720CA54A100C29B7B /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + A8BC438920CA54A600C29B7B /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + A8BC438B20CA54AA00C29B7B /* Photos.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Photos.framework; path = System/Library/Frameworks/Photos.framework; sourceTree = SDKROOT; }; + A8BC438F20CA61A400C29B7B /* WeiboSDK.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = WeiboSDK.bundle; path = "../node_modules/react-native-weibo-login/ios/WeiboSDK.bundle"; sourceTree = ""; }; + ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 00E356EB1AD99517003FC87E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A8BC438C20CA54AA00C29B7B /* Photos.framework in Frameworks */, + A8BC438A20CA54A600C29B7B /* CoreGraphics.framework in Frameworks */, + A8BC438820CA54A100C29B7B /* Foundation.framework in Frameworks */, + A8BC438620CA549C00C29B7B /* UIKit.framework in Frameworks */, + A8BC438420CA549400C29B7B /* Security.framework in Frameworks */, + A8BC438220CA548E00C29B7B /* SystemConfiguration.framework in Frameworks */, + A8BC438020CA548900C29B7B /* ImageIO.framework in Frameworks */, + A8BC437E20CA548200C29B7B /* QuartzCore.framework in Frameworks */, + A8BC437B20CA547B00C29B7B /* CoreTelephony.framework in Frameworks */, + A8BC437C20CA547B00C29B7B /* CoreText.framework in Frameworks */, + ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */, + 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */, + 146834051AC3E58100842450 /* libReact.a in Frameworks */, + 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */, + 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, + 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, + 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */, + 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */, + 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */, + 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */, + 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */, + 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */, + 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */, + CCE5B4E05D5649A5B4DC8B44 /* libRCTWeiBo.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2D02E4781E0B4A5D006451C7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */, + 2D02E4C21E0B4AEC006451C7 /* libRCTAnimation.a in Frameworks */, + 2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */, + 2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */, + 2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */, + 2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */, + 2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */, + 2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2D02E48D1E0B4A5D006451C7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 2DF0FFEE2056DD460020B375 /* libReact.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 00C302A81ABCB8CE00DB3ED1 /* Products */ = { + isa = PBXGroup; + children = ( + 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */, + ); + name = Products; + sourceTree = ""; + }; + 00C302B61ABCB90400DB3ED1 /* Products */ = { + isa = PBXGroup; + children = ( + 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */, + ); + name = Products; + sourceTree = ""; + }; + 00C302BC1ABCB91800DB3ED1 /* Products */ = { + isa = PBXGroup; + children = ( + 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */, + 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */, + ); + name = Products; + sourceTree = ""; + }; + 00C302D41ABCB9D200DB3ED1 /* Products */ = { + isa = PBXGroup; + children = ( + 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */, + 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */, + ); + name = Products; + sourceTree = ""; + }; + 00C302E01ABCB9EE00DB3ED1 /* Products */ = { + isa = PBXGroup; + children = ( + 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */, + ); + name = Products; + sourceTree = ""; + }; + 00E356EF1AD99517003FC87E /* WeiboLoginDemoTests */ = { + isa = PBXGroup; + children = ( + 00E356F21AD99517003FC87E /* WeiboLoginDemoTests.m */, + 00E356F01AD99517003FC87E /* Supporting Files */, + ); + path = WeiboLoginDemoTests; + sourceTree = ""; + }; + 00E356F01AD99517003FC87E /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 00E356F11AD99517003FC87E /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 139105B71AF99BAD00B5F7CC /* Products */ = { + isa = PBXGroup; + children = ( + 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */, + 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */, + ); + name = Products; + sourceTree = ""; + }; + 139FDEE71B06529A00C62182 /* Products */ = { + isa = PBXGroup; + children = ( + 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */, + 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */, + 2D16E6841FA4F8DC00B85C8A /* libfishhook.a */, + 2D16E6861FA4F8DC00B85C8A /* libfishhook-tvOS.a */, + ); + name = Products; + sourceTree = ""; + }; + 13B07FAE1A68108700A75B9A /* WeiboLoginDemo */ = { + isa = PBXGroup; + children = ( + A8BC438F20CA61A400C29B7B /* WeiboSDK.bundle */, + 008F07F21AC5B25A0029DE68 /* main.jsbundle */, + 13B07FAF1A68108700A75B9A /* AppDelegate.h */, + 13B07FB01A68108700A75B9A /* AppDelegate.m */, + 13B07FB51A68108700A75B9A /* Images.xcassets */, + 13B07FB61A68108700A75B9A /* Info.plist */, + 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, + 13B07FB71A68108700A75B9A /* main.m */, + ); + name = WeiboLoginDemo; + sourceTree = ""; + }; + 146834001AC3E56700842450 /* Products */ = { + isa = PBXGroup; + children = ( + 146834041AC3E56700842450 /* libReact.a */, + 3DAD3EA31DF850E9000B6D8A /* libReact.a */, + 3DAD3EA51DF850E9000B6D8A /* libyoga.a */, + 3DAD3EA71DF850E9000B6D8A /* libyoga.a */, + 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */, + 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */, + 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */, + 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */, + 2DF0FFDF2056DD460020B375 /* libjsinspector.a */, + 2DF0FFE12056DD460020B375 /* libjsinspector-tvOS.a */, + 2DF0FFE32056DD460020B375 /* libthird-party.a */, + 2DF0FFE52056DD460020B375 /* libthird-party.a */, + 2DF0FFE72056DD460020B375 /* libdouble-conversion.a */, + 2DF0FFE92056DD460020B375 /* libdouble-conversion.a */, + 2DF0FFEB2056DD460020B375 /* libprivatedata.a */, + 2DF0FFED2056DD460020B375 /* libprivatedata-tvOS.a */, + ); + name = Products; + sourceTree = ""; + }; + 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { + isa = PBXGroup; + children = ( + A8BC438B20CA54AA00C29B7B /* Photos.framework */, + A8BC438920CA54A600C29B7B /* CoreGraphics.framework */, + A8BC438720CA54A100C29B7B /* Foundation.framework */, + A8BC438520CA549C00C29B7B /* UIKit.framework */, + A8BC438320CA549400C29B7B /* Security.framework */, + A8BC438120CA548D00C29B7B /* SystemConfiguration.framework */, + A8BC437F20CA548900C29B7B /* ImageIO.framework */, + A8BC437D20CA548200C29B7B /* QuartzCore.framework */, + A8BC437920CA547B00C29B7B /* CoreTelephony.framework */, + A8BC437A20CA547B00C29B7B /* CoreText.framework */, + 2D16E6891FA4F8E400B85C8A /* libReact.a */, + ); + name = Frameworks; + sourceTree = ""; + }; + 5E91572E1DD0AC6500FF2AA8 /* Products */ = { + isa = PBXGroup; + children = ( + 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */, + 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */, + ); + name = Products; + sourceTree = ""; + }; + 78C398B11ACF4ADC00677621 /* Products */ = { + isa = PBXGroup; + children = ( + 78C398B91ACF4ADC00677621 /* libRCTLinking.a */, + 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */, + ); + name = Products; + sourceTree = ""; + }; + 832341AE1AAA6A7D00B99B32 /* Libraries */ = { + isa = PBXGroup; + children = ( + 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */, + 146833FF1AC3E56700842450 /* React.xcodeproj */, + 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */, + ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */, + 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */, + 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */, + 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */, + 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */, + 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */, + 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */, + 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, + 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */, + 4189BD5E666A4AEBB212DD79 /* RCTWeiBo.xcodeproj */, + ); + name = Libraries; + sourceTree = ""; + }; + 832341B11AAA6A8300B99B32 /* Products */ = { + isa = PBXGroup; + children = ( + 832341B51AAA6A8300B99B32 /* libRCTText.a */, + 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */, + ); + name = Products; + sourceTree = ""; + }; + 83CBB9F61A601CBA00E9B192 = { + isa = PBXGroup; + children = ( + 13B07FAE1A68108700A75B9A /* WeiboLoginDemo */, + 832341AE1AAA6A7D00B99B32 /* Libraries */, + 00E356EF1AD99517003FC87E /* WeiboLoginDemoTests */, + 83CBBA001A601CBA00E9B192 /* Products */, + 2D16E6871FA4F8E400B85C8A /* Frameworks */, + A8BC434E20CA545200C29B7B /* Recovered References */, + ); + indentWidth = 2; + sourceTree = ""; + tabWidth = 2; + usesTabs = 0; + }; + 83CBBA001A601CBA00E9B192 /* Products */ = { + isa = PBXGroup; + children = ( + 13B07F961A680F5B00A75B9A /* WeiboLoginDemo.app */, + 00E356EE1AD99517003FC87E /* WeiboLoginDemoTests.xctest */, + 2D02E47B1E0B4A5D006451C7 /* WeiboLoginDemo-tvOS.app */, + 2D02E4901E0B4A5D006451C7 /* WeiboLoginDemo-tvOSTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + A8BC434E20CA545200C29B7B /* Recovered References */ = { + isa = PBXGroup; + children = ( + 4BA53AAFC1134E488C100704 /* libRCTWeiBo.a */, + ); + name = "Recovered References"; + sourceTree = ""; + }; + A8BC434F20CA545300C29B7B /* Products */ = { + isa = PBXGroup; + children = ( + A8BC436820CA545300C29B7B /* libRCTWeiBo.a */, + ); + name = Products; + sourceTree = ""; + }; + ADBDB9201DFEBF0600ED6528 /* Products */ = { + isa = PBXGroup; + children = ( + ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */, + 2D16E6721FA4F8DC00B85C8A /* libRCTBlob-tvOS.a */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 00E356ED1AD99517003FC87E /* WeiboLoginDemoTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "WeiboLoginDemoTests" */; + buildPhases = ( + 00E356EA1AD99517003FC87E /* Sources */, + 00E356EB1AD99517003FC87E /* Frameworks */, + 00E356EC1AD99517003FC87E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 00E356F51AD99517003FC87E /* PBXTargetDependency */, + ); + name = WeiboLoginDemoTests; + productName = WeiboLoginDemoTests; + productReference = 00E356EE1AD99517003FC87E /* WeiboLoginDemoTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 13B07F861A680F5B00A75B9A /* WeiboLoginDemo */ = { + isa = PBXNativeTarget; + buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "WeiboLoginDemo" */; + buildPhases = ( + 13B07F871A680F5B00A75B9A /* Sources */, + 13B07F8C1A680F5B00A75B9A /* Frameworks */, + 13B07F8E1A680F5B00A75B9A /* Resources */, + 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = WeiboLoginDemo; + productName = "Hello World"; + productReference = 13B07F961A680F5B00A75B9A /* WeiboLoginDemo.app */; + productType = "com.apple.product-type.application"; + }; + 2D02E47A1E0B4A5D006451C7 /* WeiboLoginDemo-tvOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "WeiboLoginDemo-tvOS" */; + buildPhases = ( + 2D02E4771E0B4A5D006451C7 /* Sources */, + 2D02E4781E0B4A5D006451C7 /* Frameworks */, + 2D02E4791E0B4A5D006451C7 /* Resources */, + 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "WeiboLoginDemo-tvOS"; + productName = "WeiboLoginDemo-tvOS"; + productReference = 2D02E47B1E0B4A5D006451C7 /* WeiboLoginDemo-tvOS.app */; + productType = "com.apple.product-type.application"; + }; + 2D02E48F1E0B4A5D006451C7 /* WeiboLoginDemo-tvOSTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "WeiboLoginDemo-tvOSTests" */; + buildPhases = ( + 2D02E48C1E0B4A5D006451C7 /* Sources */, + 2D02E48D1E0B4A5D006451C7 /* Frameworks */, + 2D02E48E1E0B4A5D006451C7 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */, + ); + name = "WeiboLoginDemo-tvOSTests"; + productName = "WeiboLoginDemo-tvOSTests"; + productReference = 2D02E4901E0B4A5D006451C7 /* WeiboLoginDemo-tvOSTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 83CBB9F71A601CBA00E9B192 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 610; + ORGANIZATIONNAME = Facebook; + TargetAttributes = { + 00E356ED1AD99517003FC87E = { + CreatedOnToolsVersion = 6.2; + TestTargetID = 13B07F861A680F5B00A75B9A; + }; + 13B07F861A680F5B00A75B9A = { + DevelopmentTeam = YA448Q2A45; + }; + 2D02E47A1E0B4A5D006451C7 = { + CreatedOnToolsVersion = 8.2.1; + ProvisioningStyle = Automatic; + }; + 2D02E48F1E0B4A5D006451C7 = { + CreatedOnToolsVersion = 8.2.1; + ProvisioningStyle = Automatic; + TestTargetID = 2D02E47A1E0B4A5D006451C7; + }; + }; + }; + buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "WeiboLoginDemo" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 83CBB9F61A601CBA00E9B192; + productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */; + ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; + }, + { + ProductGroup = 5E91572E1DD0AC6500FF2AA8 /* Products */; + ProjectRef = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; + }, + { + ProductGroup = ADBDB9201DFEBF0600ED6528 /* Products */; + ProjectRef = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */; + }, + { + ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */; + ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; + }, + { + ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */; + ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; + }, + { + ProductGroup = 78C398B11ACF4ADC00677621 /* Products */; + ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; + }, + { + ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */; + ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; + }, + { + ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */; + ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; + }, + { + ProductGroup = 832341B11AAA6A8300B99B32 /* Products */; + ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; + }, + { + ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */; + ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; + }, + { + ProductGroup = 139FDEE71B06529A00C62182 /* Products */; + ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; + }, + { + ProductGroup = A8BC434F20CA545300C29B7B /* Products */; + ProjectRef = 4189BD5E666A4AEBB212DD79 /* RCTWeiBo.xcodeproj */; + }, + { + ProductGroup = 146834001AC3E56700842450 /* Products */; + ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 13B07F861A680F5B00A75B9A /* WeiboLoginDemo */, + 00E356ED1AD99517003FC87E /* WeiboLoginDemoTests */, + 2D02E47A1E0B4A5D006451C7 /* WeiboLoginDemo-tvOS */, + 2D02E48F1E0B4A5D006451C7 /* WeiboLoginDemo-tvOSTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTActionSheet.a; + remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTGeolocation.a; + remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTImage.a; + remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTNetwork.a; + remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTVibration.a; + remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTSettings.a; + remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTWebSocket.a; + remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 146834041AC3E56700842450 /* libReact.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libReact.a; + remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 2D16E6721FA4F8DC00B85C8A /* libRCTBlob-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libRCTBlob-tvOS.a"; + remoteRef = 2D16E6711FA4F8DC00B85C8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 2D16E6841FA4F8DC00B85C8A /* libfishhook.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libfishhook.a; + remoteRef = 2D16E6831FA4F8DC00B85C8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 2D16E6861FA4F8DC00B85C8A /* libfishhook-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libfishhook-tvOS.a"; + remoteRef = 2D16E6851FA4F8DC00B85C8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 2DF0FFDF2056DD460020B375 /* libjsinspector.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libjsinspector.a; + remoteRef = 2DF0FFDE2056DD460020B375 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 2DF0FFE12056DD460020B375 /* libjsinspector-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libjsinspector-tvOS.a"; + remoteRef = 2DF0FFE02056DD460020B375 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 2DF0FFE32056DD460020B375 /* libthird-party.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libthird-party.a"; + remoteRef = 2DF0FFE22056DD460020B375 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 2DF0FFE52056DD460020B375 /* libthird-party.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libthird-party.a"; + remoteRef = 2DF0FFE42056DD460020B375 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 2DF0FFE72056DD460020B375 /* libdouble-conversion.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libdouble-conversion.a"; + remoteRef = 2DF0FFE62056DD460020B375 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 2DF0FFE92056DD460020B375 /* libdouble-conversion.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libdouble-conversion.a"; + remoteRef = 2DF0FFE82056DD460020B375 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 2DF0FFEB2056DD460020B375 /* libprivatedata.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libprivatedata.a; + remoteRef = 2DF0FFEA2056DD460020B375 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 2DF0FFED2056DD460020B375 /* libprivatedata-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libprivatedata-tvOS.a"; + remoteRef = 2DF0FFEC2056DD460020B375 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libRCTImage-tvOS.a"; + remoteRef = 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libRCTLinking-tvOS.a"; + remoteRef = 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libRCTNetwork-tvOS.a"; + remoteRef = 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libRCTSettings-tvOS.a"; + remoteRef = 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libRCTText-tvOS.a"; + remoteRef = 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libRCTWebSocket-tvOS.a"; + remoteRef = 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3DAD3EA31DF850E9000B6D8A /* libReact.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libReact.a; + remoteRef = 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3DAD3EA51DF850E9000B6D8A /* libyoga.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libyoga.a; + remoteRef = 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3DAD3EA71DF850E9000B6D8A /* libyoga.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libyoga.a; + remoteRef = 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libcxxreact.a; + remoteRef = 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libcxxreact.a; + remoteRef = 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libjschelpers.a; + remoteRef = 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libjschelpers.a; + remoteRef = 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTAnimation.a; + remoteRef = 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTAnimation.a; + remoteRef = 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTLinking.a; + remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 832341B51AAA6A8300B99B32 /* libRCTText.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTText.a; + remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + A8BC436820CA545300C29B7B /* libRCTWeiBo.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTWeiBo.a; + remoteRef = A8BC436720CA545300C29B7B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTBlob.a; + remoteRef = ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 00E356EC1AD99517003FC87E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 13B07F8E1A680F5B00A75B9A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, + 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, + A8BC439020CA61A400C29B7B /* WeiboSDK.bundle in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2D02E4791E0B4A5D006451C7 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2D02E48E1E0B4A5D006451C7 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Bundle React Native code and images"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; + }; + 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Bundle React Native Code And Images"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 00E356EA1AD99517003FC87E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 00E356F31AD99517003FC87E /* WeiboLoginDemoTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 13B07F871A680F5B00A75B9A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, + 13B07FC11A68108700A75B9A /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2D02E4771E0B4A5D006451C7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */, + 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2D02E48C1E0B4A5D006451C7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2DCD954D1E0B4F2C00145EB5 /* WeiboLoginDemoTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 13B07F861A680F5B00A75B9A /* WeiboLoginDemo */; + targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; + }; + 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 2D02E47A1E0B4A5D006451C7 /* WeiboLoginDemo-tvOS */; + targetProxy = 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { + isa = PBXVariantGroup; + children = ( + 13B07FB21A68108700A75B9A /* Base */, + ); + name = LaunchScreen.xib; + path = WeiboLoginDemo; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 00E356F61AD99517003FC87E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/../node_modules/react-native-weibo-login/ios", + ); + INFOPLIST_FILE = WeiboLoginDemoTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/$(TARGET_NAME)\"", + ); + OTHER_LDFLAGS = ( + "-ObjC", + "-lc++", + ); + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WeiboLoginDemo.app/WeiboLoginDemo"; + }; + name = Debug; + }; + 00E356F71AD99517003FC87E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + COPY_PHASE_STRIP = NO; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/../node_modules/react-native-weibo-login/ios", + ); + INFOPLIST_FILE = WeiboLoginDemoTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/$(TARGET_NAME)\"", + ); + OTHER_LDFLAGS = ( + "-ObjC", + "-lc++", + ); + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WeiboLoginDemo.app/WeiboLoginDemo"; + }; + name = Release; + }; + 13B07F941A680F5B00A75B9A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CURRENT_PROJECT_VERSION = 1; + DEAD_CODE_STRIPPING = NO; + DEVELOPMENT_TEAM = YA448Q2A45; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/../node_modules/react-native-weibo-login/ios", + ); + INFOPLIST_FILE = WeiboLoginDemo/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.weibologindemo; + PRODUCT_NAME = WeiboLoginDemo; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 13B07F951A680F5B00A75B9A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = YA448Q2A45; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/../node_modules/react-native-weibo-login/ios", + ); + INFOPLIST_FILE = WeiboLoginDemo/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.weibologindemo; + PRODUCT_NAME = WeiboLoginDemo; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; + 2D02E4971E0B4A5E006451C7 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ANALYZER_NONNULL = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_TESTABILITY = YES; + GCC_NO_COMMON_BLOCKS = YES; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/../node_modules/react-native-weibo-login/ios", + ); + INFOPLIST_FILE = "WeiboLoginDemo-tvOS/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/$(TARGET_NAME)\"", + ); + OTHER_LDFLAGS = ( + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.WeiboLoginDemo-tvOS"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 9.2; + }; + name = Debug; + }; + 2D02E4981E0B4A5E006451C7 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ANALYZER_NONNULL = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_NO_COMMON_BLOCKS = YES; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/../node_modules/react-native-weibo-login/ios", + ); + INFOPLIST_FILE = "WeiboLoginDemo-tvOS/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/$(TARGET_NAME)\"", + ); + OTHER_LDFLAGS = ( + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.WeiboLoginDemo-tvOS"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 9.2; + }; + name = Release; + }; + 2D02E4991E0B4A5E006451C7 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CLANG_ANALYZER_NONNULL = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_TESTABILITY = YES; + GCC_NO_COMMON_BLOCKS = YES; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/../node_modules/react-native-weibo-login/ios", + ); + INFOPLIST_FILE = "WeiboLoginDemo-tvOSTests/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/$(TARGET_NAME)\"", + ); + OTHER_LDFLAGS = ( + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.WeiboLoginDemo-tvOSTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WeiboLoginDemo-tvOS.app/WeiboLoginDemo-tvOS"; + TVOS_DEPLOYMENT_TARGET = 10.1; + }; + name = Debug; + }; + 2D02E49A1E0B4A5E006451C7 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CLANG_ANALYZER_NONNULL = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_NO_COMMON_BLOCKS = YES; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/../node_modules/react-native-weibo-login/ios", + ); + INFOPLIST_FILE = "WeiboLoginDemo-tvOSTests/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/$(TARGET_NAME)\"", + ); + OTHER_LDFLAGS = ( + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.WeiboLoginDemo-tvOSTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WeiboLoginDemo-tvOS.app/WeiboLoginDemo-tvOS"; + TVOS_DEPLOYMENT_TARGET = 10.1; + }; + name = Release; + }; + 83CBBA201A601CBA00E9B192 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 83CBBA211A601CBA00E9B192 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "WeiboLoginDemoTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 00E356F61AD99517003FC87E /* Debug */, + 00E356F71AD99517003FC87E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "WeiboLoginDemo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 13B07F941A680F5B00A75B9A /* Debug */, + 13B07F951A680F5B00A75B9A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "WeiboLoginDemo-tvOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2D02E4971E0B4A5E006451C7 /* Debug */, + 2D02E4981E0B4A5E006451C7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "WeiboLoginDemo-tvOSTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2D02E4991E0B4A5E006451C7 /* Debug */, + 2D02E49A1E0B4A5E006451C7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "WeiboLoginDemo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 83CBBA201A601CBA00E9B192 /* Debug */, + 83CBBA211A601CBA00E9B192 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; +} diff --git a/WeiboLoginDemo/ios/WeiboLoginDemo.xcodeproj/xcshareddata/xcschemes/WeiboLoginDemo-tvOS.xcscheme b/WeiboLoginDemo/ios/WeiboLoginDemo.xcodeproj/xcshareddata/xcschemes/WeiboLoginDemo-tvOS.xcscheme new file mode 100644 index 0000000..9f12afe --- /dev/null +++ b/WeiboLoginDemo/ios/WeiboLoginDemo.xcodeproj/xcshareddata/xcschemes/WeiboLoginDemo-tvOS.xcscheme @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WeiboLoginDemo/ios/WeiboLoginDemo.xcodeproj/xcshareddata/xcschemes/WeiboLoginDemo.xcscheme b/WeiboLoginDemo/ios/WeiboLoginDemo.xcodeproj/xcshareddata/xcschemes/WeiboLoginDemo.xcscheme new file mode 100644 index 0000000..cf9a93f --- /dev/null +++ b/WeiboLoginDemo/ios/WeiboLoginDemo.xcodeproj/xcshareddata/xcschemes/WeiboLoginDemo.xcscheme @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WeiboLoginDemo/ios/WeiboLoginDemo/AppDelegate.h b/WeiboLoginDemo/ios/WeiboLoginDemo/AppDelegate.h new file mode 100644 index 0000000..d4f2580 --- /dev/null +++ b/WeiboLoginDemo/ios/WeiboLoginDemo/AppDelegate.h @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#import + +@interface AppDelegate : UIResponder + +@property (nonatomic, strong) UIWindow *window; + +@end diff --git a/WeiboLoginDemo/ios/WeiboLoginDemo/AppDelegate.m b/WeiboLoginDemo/ios/WeiboLoginDemo/AppDelegate.m new file mode 100644 index 0000000..ea73d14 --- /dev/null +++ b/WeiboLoginDemo/ios/WeiboLoginDemo/AppDelegate.m @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#import "AppDelegate.h" + +#import +#import +#import + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + NSURL *jsCodeLocation; + + jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; + + RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation + moduleName:@"WeiboLoginDemo" + initialProperties:nil + launchOptions:launchOptions]; + rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; + + self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; + UIViewController *rootViewController = [UIViewController new]; + rootViewController.view = rootView; + self.window.rootViewController = rootViewController; + [self.window makeKeyAndVisible]; + return YES; +} + +- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url + sourceApplication:(NSString *)sourceApplication annotation:(id)annotation +{ + return [RCTLinkingManager application:application openURL:url + sourceApplication:sourceApplication annotation:annotation]; +} + +@end diff --git a/WeiboLoginDemo/ios/WeiboLoginDemo/Base.lproj/LaunchScreen.xib b/WeiboLoginDemo/ios/WeiboLoginDemo/Base.lproj/LaunchScreen.xib new file mode 100644 index 0000000..2ba84b6 --- /dev/null +++ b/WeiboLoginDemo/ios/WeiboLoginDemo/Base.lproj/LaunchScreen.xib @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WeiboLoginDemo/ios/WeiboLoginDemo/Images.xcassets/AppIcon.appiconset/Contents.json b/WeiboLoginDemo/ios/WeiboLoginDemo/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..19882d5 --- /dev/null +++ b/WeiboLoginDemo/ios/WeiboLoginDemo/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,53 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/WeiboLoginDemo/ios/WeiboLoginDemo/Images.xcassets/Contents.json b/WeiboLoginDemo/ios/WeiboLoginDemo/Images.xcassets/Contents.json new file mode 100644 index 0000000..2d92bd5 --- /dev/null +++ b/WeiboLoginDemo/ios/WeiboLoginDemo/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/WeiboLoginDemo/ios/WeiboLoginDemo/Info.plist b/WeiboLoginDemo/ios/WeiboLoginDemo/Info.plist new file mode 100644 index 0000000..331cd98 --- /dev/null +++ b/WeiboLoginDemo/ios/WeiboLoginDemo/Info.plist @@ -0,0 +1,75 @@ + + + + + LSApplicationQueriesSchemes + + sinaweibohd + weibosdk + sinaweibo + weibosdk2.5 + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + WeiboLoginDemo + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleURLTypes + + + CFBundleTypeRole + Editor + CFBundleURLName + com.weibo + CFBundleURLSchemes + + wb2317411734 + + + + CFBundleVersion + 1 + LSRequiresIPhoneOS + + NSAppTransportSecurity + + NSExceptionDomains + + localhost + + NSExceptionAllowsInsecureHTTPLoads + + + + + NSLocationWhenInUseUsageDescription + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + + diff --git a/WeiboLoginDemo/ios/WeiboLoginDemo/main.m b/WeiboLoginDemo/ios/WeiboLoginDemo/main.m new file mode 100644 index 0000000..c73e006 --- /dev/null +++ b/WeiboLoginDemo/ios/WeiboLoginDemo/main.m @@ -0,0 +1,16 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#import + +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/WeiboLoginDemo/ios/WeiboLoginDemoTests/Info.plist b/WeiboLoginDemo/ios/WeiboLoginDemoTests/Info.plist new file mode 100644 index 0000000..886825c --- /dev/null +++ b/WeiboLoginDemo/ios/WeiboLoginDemoTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/WeiboLoginDemo/ios/WeiboLoginDemoTests/WeiboLoginDemoTests.m b/WeiboLoginDemo/ios/WeiboLoginDemoTests/WeiboLoginDemoTests.m new file mode 100644 index 0000000..086aca2 --- /dev/null +++ b/WeiboLoginDemo/ios/WeiboLoginDemoTests/WeiboLoginDemoTests.m @@ -0,0 +1,68 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#import +#import + +#import +#import + +#define TIMEOUT_SECONDS 600 +#define TEXT_TO_LOOK_FOR @"Welcome to React Native!" + +@interface WeiboLoginDemoTests : XCTestCase + +@end + +@implementation WeiboLoginDemoTests + +- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test +{ + if (test(view)) { + return YES; + } + for (UIView *subview in [view subviews]) { + if ([self findSubviewInView:subview matching:test]) { + return YES; + } + } + return NO; +} + +- (void)testRendersWelcomeScreen +{ + UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; + NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; + BOOL foundElement = NO; + + __block NSString *redboxError = nil; + RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { + if (level >= RCTLogLevelError) { + redboxError = message; + } + }); + + while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { + [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; + [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; + + foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { + if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { + return YES; + } + return NO; + }]; + } + + RCTSetLogFunction(RCTDefaultLogFunction); + + XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); + XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); +} + + +@end diff --git a/WeiboLoginDemo/package.json b/WeiboLoginDemo/package.json new file mode 100644 index 0000000..ad7e075 --- /dev/null +++ b/WeiboLoginDemo/package.json @@ -0,0 +1,23 @@ +{ + "name": "WeiboLoginDemo", + "version": "0.0.1", + "private": true, + "scripts": { + "start": "node node_modules/react-native/local-cli/cli.js start", + "test": "jest" + }, + "dependencies": { + "react": "16.3.1", + "react-native": "0.55.4", + "react-native-weibo-login": "^1.0.1" + }, + "devDependencies": { + "babel-jest": "23.0.1", + "babel-preset-react-native": "4.0.0", + "jest": "23.1.0", + "react-test-renderer": "16.3.1" + }, + "jest": { + "preset": "react-native" + } +} diff --git a/WeiboLoginDemo/src/login_weibo.png b/WeiboLoginDemo/src/login_weibo.png new file mode 100644 index 0000000..f5eb20f Binary files /dev/null and b/WeiboLoginDemo/src/login_weibo.png differ diff --git a/WeiboLoginDemo/src/login_weibo@2x.png b/WeiboLoginDemo/src/login_weibo@2x.png new file mode 100644 index 0000000..1c824e5 Binary files /dev/null and b/WeiboLoginDemo/src/login_weibo@2x.png differ diff --git a/WeiboLoginDemo/src/login_weibo@3x.png b/WeiboLoginDemo/src/login_weibo@3x.png new file mode 100644 index 0000000..6fff854 Binary files /dev/null and b/WeiboLoginDemo/src/login_weibo@3x.png differ diff --git a/android/build.gradle b/android/build.gradle new file mode 100644 index 0000000..6d56ef7 --- /dev/null +++ b/android/build.gradle @@ -0,0 +1,38 @@ + +buildscript { + repositories { + jcenter() +// maven { url "https://dl.bintray.com/thelasterstar/maven/" } + } + + dependencies { + classpath 'com.android.tools.build:gradle:1.3.1' + } +} + +apply plugin: 'com.android.library' + +android { + compileSdkVersion 26 + buildToolsVersion "23.0.1" + + defaultConfig { + minSdkVersion 16 + targetSdkVersion 22 + versionCode 1 + versionName "1.0" + } + lintOptions { + abortOnError false + } +} + +repositories { + mavenCentral() +} + +dependencies { + compile 'com.facebook.react:react-native:+' + compile 'com.sina.weibo.sdk:core:4.2.7:openDefaultRelease@aar' +} + \ No newline at end of file diff --git a/android/proguard-rules.pro b/android/proguard-rules.pro new file mode 100644 index 0000000..2265d7a --- /dev/null +++ b/android/proguard-rules.pro @@ -0,0 +1,18 @@ +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in /Users/heng/Desktop/android-sdk-macosx/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the proguardFiles +# directive in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} +-keep class com.sina.weibo.sdk.** { *; } \ No newline at end of file diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml new file mode 100644 index 0000000..7893b27 --- /dev/null +++ b/android/src/main/AndroidManifest.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/android/src/main/java/com/gratong/WeiBoModule.java b/android/src/main/java/com/gratong/WeiBoModule.java new file mode 100644 index 0000000..586e257 --- /dev/null +++ b/android/src/main/java/com/gratong/WeiBoModule.java @@ -0,0 +1,114 @@ + +package com.gratong; + +import com.facebook.react.bridge.ActivityEventListener; +import android.app.Activity; +import android.content.Intent; +import android.util.Log; + +import com.facebook.react.bridge.Callback; +import com.facebook.react.bridge.ReadableMap; +import com.facebook.react.bridge.Promise; +import com.facebook.react.bridge.ReactApplicationContext; +import com.facebook.react.bridge.ReactContextBaseJavaModule; +import com.facebook.react.bridge.WritableMap; +import com.facebook.react.bridge.WritableNativeMap; +import com.facebook.react.modules.core.RCTNativeAppEventEmitter; +import com.facebook.react.bridge.ReactMethod; +import com.facebook.react.bridge.BaseActivityEventListener; +import com.sina.weibo.sdk.auth.AuthInfo; +import com.sina.weibo.sdk.WbSdk; +import com.sina.weibo.sdk.auth.WbAuthListener; +import com.sina.weibo.sdk.auth.WbConnectErrorMessage; +import com.sina.weibo.sdk.auth.Oauth2AccessToken; +import com.sina.weibo.sdk.auth.sso.SsoHandler; +import com.sina.weibo.sdk.auth.AuthInfo; +import com.sina.weibo.sdk.auth.WbAuthListener; + +public class WeiBoModule extends ReactContextBaseJavaModule{ + + private final ReactApplicationContext mContext; + private static final String RCTWBEventName = "weibo_login"; + + /** 注意:SsoHandler 仅当 SDK 支持 SSO 时有效 */ + private SsoHandler mSsoHandler; + + public WeiBoModule(ReactApplicationContext reactContext) { + super(reactContext); + mContext = reactContext; + reactContext.addActivityEventListener(mActivityEventListener); + } + + private final ActivityEventListener mActivityEventListener = new BaseActivityEventListener() { + + @Override + public void onActivityResult(Activity activity, int requestCode, int resultCode, Intent data) { + if (mSsoHandler != null) { + mSsoHandler.authorizeCallBack(requestCode, resultCode, data); + } + } + }; + + @ReactMethod + public void login(final ReadableMap config, final Callback callback){ + if (mSsoHandler == null){ + String appKey = config.getString("appKey"); + String redirectURI = config.getString("redirectURI"); + String scope = config.getString("scope"); + + AuthInfo mAuthInfo = new AuthInfo(mContext, appKey, redirectURI, scope); + WbSdk.install(mContext,mAuthInfo); + + mSsoHandler = new SsoHandler(mContext.getCurrentActivity()); + } + + mSsoHandler.authorize(new SelfWbAuthListener()); + callback.invoke("Weibo open success."); + } + + private class SelfWbAuthListener implements WbAuthListener{ + @Override + public void onSuccess(final Oauth2AccessToken token) { + Log.d("'WbAuthListener:","onSuccess"); + WritableMap map = new WritableNativeMap(); + if (token.isSessionValid()) { + map.putString("accessToken", token.getToken()); + map.putDouble("expirationDate", token.getExpiresTime()); + map.putString("userID", token.getUid()); + map.putString("refreshToken", token.getRefreshToken()); + map.putInt("errCode", 0); + } else { + map.putInt("errCode", -1); + map.putString("errMsg", "token invalid"); + } + map.putString("type", "WBAuthorizeResponse"); + mContext.getJSModule(RCTNativeAppEventEmitter.class).emit(RCTWBEventName,map); + } + + @Override + public void cancel() { + Log.d("'WbAuthListener:","cancel"); + WritableMap map = new WritableNativeMap(); + map.putString("type", "WBAuthorizeResponse"); + map.putString("errMsg", "Cancel"); + map.putInt("errCode", -1); + mContext.getJSModule(RCTNativeAppEventEmitter.class).emit(RCTWBEventName,map); + } + + @Override + public void onFailure(WbConnectErrorMessage errorMessage) { + Log.d("WbAuthListener","onFailure: "+errorMessage.getErrorMessage()); + WritableMap map = new WritableNativeMap(); + map.putString("type", "WBAuthorizeResponse"); + map.putString("errMsg", errorMessage.getErrorMessage()); + map.putInt("errCode", -1); + mContext.getJSModule(RCTNativeAppEventEmitter.class).emit(RCTWBEventName,map); + } + } + + @Override + public String getName() { + return "WeiBo"; + } + +} \ No newline at end of file diff --git a/android/src/main/java/com/gratong/WeiBoPackage.java b/android/src/main/java/com/gratong/WeiBoPackage.java new file mode 100644 index 0000000..056220c --- /dev/null +++ b/android/src/main/java/com/gratong/WeiBoPackage.java @@ -0,0 +1,32 @@ +package com.gratong; + + +import com.facebook.react.ReactPackage; +import com.facebook.react.bridge.JavaScriptModule; +import com.facebook.react.bridge.NativeModule; +import com.facebook.react.bridge.ReactApplicationContext; +import com.facebook.react.uimanager.ViewManager; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +public class WeiBoPackage implements ReactPackage { + + @Override + public List createNativeModules(ReactApplicationContext reactContext) { + List modules = new ArrayList<>(); + modules.add(new WeiBoModule(reactContext)); + return modules; + } + + // @Override + public List> createJSModules() { + return Collections.emptyList(); + } + + @Override + public List createViewManagers(ReactApplicationContext reactContext) { + return Collections.emptyList(); + } +} diff --git a/index.js b/index.js new file mode 100644 index 0000000..a139e78 --- /dev/null +++ b/index.js @@ -0,0 +1,51 @@ + +import { NativeModules, NativeEventEmitter } from 'react-native'; + +const { WeiBo } = NativeModules +//创建原生监听器 +const WeiBoNativeEventEmitter = new NativeEventEmitter(WeiBo) +/* +* Scope 是 OAuth2.0 授权机制中 authorize 接口的一个参数。通过 Scope,平台将开放更多的微博 +* 核心功能给开发者,同时也加强用户隐私保护,提升了用户体验,用户在新 OAuth2.0 授权页中有权利 +* 选择赋予应用的功能。 +* 目前 Scope 支持传入多个 Scope 权限,用逗号分隔。 +* +* 有关哪些 OpenAPI 需要权限申请,请查看:http://open.weibo.com/wiki/%E5%BE%AE%E5%8D%9AAPI +* 关于 Scope 概念及注意事项,请查看:http://open.weibo.com/wiki/Scope +* */ + +const defaultScope = "all" +// 默认 'https://api.weibo.com/oauth2/default.html' +// 必须和sina微博开放平台中应用高级设置中的redirectURI设置的一致,不然会登录失败 +const defaultRedirectURI = "https://api.weibo.com/oauth2/default.html" + +function checkConfig(config) { + if(!config.redirectURI) { + config.redirectURI = defaultRedirectURI + } + if(!config.scope) { + config.scope = defaultScope + } +} + +let weiBoAuthListener +const WeiBoLoginEventName = 'weibo_login' + +export function login(config={}) { + return new Promise((resolve,reject)=>{ + checkConfig(config) + //此回调只会返回SDK是否调用成功,授权登录是否成功通过监听返回 + WeiBo.login(config,(status)=>{ + console.log(status) + }); + weiBoAuthListener = WeiBoNativeEventEmitter.addListener(WeiBoLoginEventName,(data)=>{ + weiBoAuthListener.remove() + if(data.errCode == 0){ //login success + resolve(data) + }else{ //login fail + reject(data) + } + }) + }) + +} \ No newline at end of file diff --git a/ios/RCTWeiBo.h b/ios/RCTWeiBo.h new file mode 100644 index 0000000..7328503 --- /dev/null +++ b/ios/RCTWeiBo.h @@ -0,0 +1,10 @@ + +#import +#import +#import + +@interface RCTWeiBo : RCTEventEmitter + + +@end + diff --git a/ios/RCTWeiBo.m b/ios/RCTWeiBo.m new file mode 100644 index 0000000..0d47483 --- /dev/null +++ b/ios/RCTWeiBo.m @@ -0,0 +1,168 @@ + +#import "RCTWeiBo.h" +#import "WeiboSDK.h" + +#define RCTWBEventName (@"weibo_login") +BOOL registerSDK = NO; //if SDK registered + +@interface RCTWeiBo() +@end + +@implementation RCTWeiBo{ + bool hasListeners; + WBAuthorizeRequest *request; +} + +- (dispatch_queue_t)methodQueue +{ + return dispatch_get_main_queue(); +} +RCT_EXPORT_MODULE(); + +- (NSArray *)supportedEvents { + return @[RCTWBEventName]; +} + +// Will be called when this module's first listener is added. +-(void)startObserving { + hasListeners = YES; + // Set up any upstream listeners or background tasks as necessary +} + +// Will be called when this module's last listener is removed, or on dealloc. +-(void)stopObserving { + hasListeners = NO; + // Remove upstream listeners, stop unnecessary background tasks +} + +- (instancetype)init +{ + self = [super init]; + if (self) { + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleOpenURL:) + name:@"RCTOpenURLNotification" object:nil]; + } + return self; +} + +- (void)handleOpenURL:(NSNotification *)note +{ + NSDictionary *userInfo = note.userInfo; + NSString *url = userInfo[@"url"]; + [WeiboSDK handleOpenURL:[NSURL URLWithString:url] delegate:self]; +} + +RCT_EXPORT_METHOD(login:(NSDictionary *)config :(RCTResponseSenderBlock)callback) +{ + NSString *redirectURI = config[@"redirectURI"]; + NSString *scope = config[@"scope"]; + NSString *appKey = config[@"appKey"]; + + //注册SDK + if(!registerSDK){ + #ifdef DEBUG + [WeiboSDK enableDebugMode:YES]; + #endif + if([WeiboSDK registerApp:appKey]){ + registerSDK = YES; + } + } + + if(request == nil){ + request = [WBAuthorizeRequest request]; + request.redirectURI = redirectURI; + request.scope = scope; + } + + BOOL success = [WeiboSDK sendRequest:request]; + callback(@[success?@"Weibo open success.":@"Weibo open fail."]); +} + +- (void)didReceiveWeiboRequest:(WBBaseRequest *)request +{ + +} + +- (void)didReceiveWeiboResponse:(WBBaseResponse *)response +{ + NSMutableDictionary *body = [NSMutableDictionary new]; + body[@"errCode"] = @(response.statusCode); + // 分享 + if ([response isKindOfClass:WBSendMessageToWeiboResponse.class]) + { + body[@"type"] = @"WBSendMessageToWeiboResponse"; + if (response.statusCode == WeiboSDKResponseStatusCodeSuccess) + { + WBSendMessageToWeiboResponse *sendResponse = (WBSendMessageToWeiboResponse *)response; + WBAuthorizeResponse *authorizeResponse = sendResponse.authResponse; + if (sendResponse.authResponse != nil) { + body[@"userID"] = authorizeResponse.userID; + body[@"accessToken"] = authorizeResponse.accessToken; + body[@"expirationDate"] = @([authorizeResponse.expirationDate timeIntervalSince1970]); + body[@"refreshToken"] = authorizeResponse.refreshToken; + } + } + else + { + body[@"errMsg"] = [self _getErrMsg:response.statusCode]; + } + } + // 认证 + else if ([response isKindOfClass:WBAuthorizeResponse.class]) + { + body[@"type"] = @"WBAuthorizeResponse"; + if (response.statusCode == WeiboSDKResponseStatusCodeSuccess) + { + WBAuthorizeResponse *authorizeResponse = (WBAuthorizeResponse *)response; + body[@"userID"] = authorizeResponse.userID; + body[@"accessToken"] = authorizeResponse.accessToken; + body[@"expirationDate"] = @([authorizeResponse.expirationDate timeIntervalSince1970]*1000); + body[@"refreshToken"] = authorizeResponse.refreshToken; + } + else + { + body[@"errMsg"] = [self _getErrMsg:response.statusCode]; + } + } + if (hasListeners) { + [self sendEventWithName:RCTWBEventName body:body]; + } +} + + +- (NSString *)_getErrMsg:(NSInteger)errCode +{ + NSString *errMsg = @"微博认证失败"; + switch (errCode) { + case WeiboSDKResponseStatusCodeUserCancel: + errMsg = @"用户取消发送"; + break; + case WeiboSDKResponseStatusCodeSentFail: + errMsg = @"发送失败"; + break; + case WeiboSDKResponseStatusCodeAuthDeny: + errMsg = @"授权失败"; + break; + case WeiboSDKResponseStatusCodeUserCancelInstall: + errMsg = @"用户取消安装微博客户端"; + break; + case WeiboSDKResponseStatusCodePayFail: + errMsg = @"支付失败"; + break; + case WeiboSDKResponseStatusCodeShareInSDKFailed: + errMsg = @"分享失败"; + break; + case WeiboSDKResponseStatusCodeUnsupport: + errMsg = @"不支持的请求"; + break; + default: + errMsg = @"位置"; + break; + } + return errMsg; +} + +@end + + diff --git a/ios/RCTWeiBo.xcodeproj/project.pbxproj b/ios/RCTWeiBo.xcodeproj/project.pbxproj new file mode 100755 index 0000000..61ea46b --- /dev/null +++ b/ios/RCTWeiBo.xcodeproj/project.pbxproj @@ -0,0 +1,294 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + A82E006320C90DFC00312A3A /* RCTWeiBo.m in Sources */ = {isa = PBXBuildFile; fileRef = A82E006220C90DFC00312A3A /* RCTWeiBo.m */; }; + A82E00A720C9214D00312A3A /* libWeiboSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A82E00A320C9214100312A3A /* libWeiboSDK.a */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 915450F31C3D1520000CBFD2 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "include/$(PRODUCT_NAME)"; + dstSubfolderSpec = 16; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 915450F51C3D1520000CBFD2 /* libRCTWeiBo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRCTWeiBo.a; sourceTree = BUILT_PRODUCTS_DIR; }; + A82E006020C90DFC00312A3A /* RCTWeiBo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTWeiBo.h; sourceTree = ""; }; + A82E006220C90DFC00312A3A /* RCTWeiBo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTWeiBo.m; sourceTree = ""; }; + A82E006520C90E0500312A3A /* libWeiboSDK.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libWeiboSDK.a; path = libWeiboSDK/libWeiboSDK.a; sourceTree = ""; }; + A82E00A220C9214100312A3A /* WBHttpRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WBHttpRequest.h; sourceTree = ""; }; + A82E00A320C9214100312A3A /* libWeiboSDK.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libWeiboSDK.a; sourceTree = ""; }; + A82E00A420C9214100312A3A /* WeiboSDK.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = WeiboSDK.bundle; sourceTree = ""; }; + A82E00A520C9214200312A3A /* WeiboSDK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeiboSDK.h; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 915450F21C3D1520000CBFD2 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A82E00A720C9214D00312A3A /* libWeiboSDK.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 915450EC1C3D1520000CBFD2 = { + isa = PBXGroup; + children = ( + A82E00A120C9211A00312A3A /* libWeiboSDK */, + A82E006020C90DFC00312A3A /* RCTWeiBo.h */, + A82E006220C90DFC00312A3A /* RCTWeiBo.m */, + 915450F61C3D1520000CBFD2 /* Products */, + A82E006420C90E0500312A3A /* Frameworks */, + ); + sourceTree = ""; + }; + 915450F61C3D1520000CBFD2 /* Products */ = { + isa = PBXGroup; + children = ( + 915450F51C3D1520000CBFD2 /* libRCTWeiBo.a */, + ); + name = Products; + sourceTree = ""; + }; + A82E006420C90E0500312A3A /* Frameworks */ = { + isa = PBXGroup; + children = ( + A82E006520C90E0500312A3A /* libWeiboSDK.a */, + ); + name = Frameworks; + sourceTree = ""; + }; + A82E00A120C9211A00312A3A /* libWeiboSDK */ = { + isa = PBXGroup; + children = ( + A82E00A320C9214100312A3A /* libWeiboSDK.a */, + A82E00A220C9214100312A3A /* WBHttpRequest.h */, + A82E00A420C9214100312A3A /* WeiboSDK.bundle */, + A82E00A520C9214200312A3A /* WeiboSDK.h */, + ); + name = libWeiboSDK; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 915450F41C3D1520000CBFD2 /* RCTWeiBo */ = { + isa = PBXNativeTarget; + buildConfigurationList = 915450FE1C3D1520000CBFD2 /* Build configuration list for PBXNativeTarget "RCTWeiBo" */; + buildPhases = ( + 915450F11C3D1520000CBFD2 /* Sources */, + 915450F21C3D1520000CBFD2 /* Frameworks */, + 915450F31C3D1520000CBFD2 /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = RCTWeiBo; + productName = RCTWeiboAPI; + productReference = 915450F51C3D1520000CBFD2 /* libRCTWeiBo.a */; + productType = "com.apple.product-type.library.static"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 915450ED1C3D1520000CBFD2 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0720; + ORGANIZATIONNAME = erica; + TargetAttributes = { + 915450F41C3D1520000CBFD2 = { + CreatedOnToolsVersion = 7.2; + }; + }; + }; + buildConfigurationList = 915450F01C3D1520000CBFD2 /* Build configuration list for PBXProject "RCTWeiBo" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 915450EC1C3D1520000CBFD2; + productRefGroup = 915450F61C3D1520000CBFD2 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 915450F41C3D1520000CBFD2 /* RCTWeiBo */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 915450F11C3D1520000CBFD2 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A82E006320C90DFC00312A3A /* RCTWeiBo.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 915450FC1C3D1520000CBFD2 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.2; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 915450FD1C3D1520000CBFD2 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.2; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 915450FF1C3D1520000CBFD2 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/../../react-native/React/**", + "$(SRCROOT)/../../react-native/Libraries/**", + "$(BUILT_PRODUCTS_DIR)/include/**", + ); + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/libWeiboSDK", + "$(PROJECT_DIR)", + ); + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + 915451001C3D1520000CBFD2 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/../../react-native/React/**", + "$(SRCROOT)/../../react-native/Libraries/**", + "$(BUILT_PRODUCTS_DIR)/include/**", + ); + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/libWeiboSDK", + "$(PROJECT_DIR)", + ); + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 915450F01C3D1520000CBFD2 /* Build configuration list for PBXProject "RCTWeiBo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 915450FC1C3D1520000CBFD2 /* Debug */, + 915450FD1C3D1520000CBFD2 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 915450FE1C3D1520000CBFD2 /* Build configuration list for PBXNativeTarget "RCTWeiBo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 915450FF1C3D1520000CBFD2 /* Debug */, + 915451001C3D1520000CBFD2 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 915450ED1C3D1520000CBFD2 /* Project object */; +} diff --git a/ios/WBHttpRequest.h b/ios/WBHttpRequest.h new file mode 100755 index 0000000..2412c9a --- /dev/null +++ b/ios/WBHttpRequest.h @@ -0,0 +1,184 @@ +// +// WBHttpRequest.h +// WeiboSDK +// +// Created by DannionQiu on 14-9-18. +// Copyright (c) 2014年 SINA iOS Team. All rights reserved. +// + +#import +#import + +#pragma mark - WBHttpRequest and WBHttpRequestDelegate +@class WBHttpRequest; + +/** + 接收并处理来自微博sdk对于网络请求接口的调用响应 以及logOutWithToken的请求 + */ +@protocol WBHttpRequestDelegate + +/** + 收到一个来自微博Http请求的响应 + + @param response 具体的响应对象 + */ +@optional +- (void)request:(WBHttpRequest *)request didReceiveResponse:(NSURLResponse *)response; + +/** + 收到一个来自微博Http请求失败的响应 + + @param error 错误信息 + */ +@optional +- (void)request:(WBHttpRequest *)request didFailWithError:(NSError *)error; + +/** + 收到一个来自微博Http请求的网络返回 + + @param result 请求返回结果 + */ +@optional +- (void)request:(WBHttpRequest *)request didFinishLoadingWithResult:(NSString *)result; + +/** + 收到一个来自微博Http请求的网络返回 + + @param data 请求返回结果 + */ +@optional +- (void)request:(WBHttpRequest *)request didFinishLoadingWithDataResult:(NSData *)data; + +/** + 收到快速SSO授权的重定向 + + @param URI + */ +@optional +- (void)request:(WBHttpRequest *)request didReciveRedirectResponseWithURI:(NSURL *)redirectUrl; + +@end + + +/** + 微博封装Http请求的消息结构 + + */ +@interface WBHttpRequest : NSObject +{ + NSURLConnection *connection; + NSMutableData *responseData; +} + +/** + 用户自定义请求地址URL + */ +@property (nonatomic, strong) NSString *url; + +/** + 用户自定义请求方式 + + 支持"GET" "POST" + */ +@property (nonatomic, strong) NSString *httpMethod; + +/** + 用户自定义请求参数字典 + */ +@property (nonatomic, strong) NSDictionary *params; + +/** + WBHttpRequestDelegate对象,用于接收微博SDK对于发起的接口请求的请求的响应 + */ +@property (nonatomic, weak) id delegate; + +/** + 用户自定义TAG + + 用于区分回调Request + */ +@property (nonatomic, strong) NSString* tag; + +/** + 统一HTTP请求接口 + 调用此接口后,将发送一个HTTP网络请求 + @param url 请求url地址 + @param httpMethod 支持"GET" "POST" + @param params 向接口传递的参数结构 + @param delegate WBHttpRequestDelegate对象,用于接收微博SDK对于发起的接口请求的请求的响应 + @param tag 用户自定义TAG,将通过回调WBHttpRequest实例的tag属性返回 + */ ++ (WBHttpRequest *)requestWithURL:(NSString *)url + httpMethod:(NSString *)httpMethod + params:(NSDictionary *)params + delegate:(id)delegate + withTag:(NSString *)tag; + +/** + 统一微博Open API HTTP请求接口 + 调用此接口后,将发送一个HTTP网络请求(用于访问微博open api) + @param accessToken 应用获取到的accessToken,用于身份验证 + @param url 请求url地址 + @param httpMethod 支持"GET" "POST" + @param params 向接口传递的参数结构 + @param delegate WBHttpRequestDelegate对象,用于接收微博SDK对于发起的接口请求的请求的响应 + @param tag 用户自定义TAG,将通过回调WBHttpRequest实例的tag属性返回 + */ + ++ (WBHttpRequest *)requestWithAccessToken:(NSString *)accessToken + url:(NSString *)url + httpMethod:(NSString *)httpMethod + params:(NSDictionary *)params + delegate:(id)delegate + withTag:(NSString *)tag; + + + +/** + 取消网络请求接口 + 调用此接口后,将取消当前网络请求,建议同时[WBHttpRequest setDelegate:nil]; + 注意:该方法只对使用delegate的request方法有效。无法取消任何使用block的request的网络请求接口。 + */ +- (void)disconnect; + +#pragma mark - block extension + +typedef void (^WBRequestHandler)(WBHttpRequest *httpRequest, + id result, + NSError *error); + +/** + 统一微博Open API HTTP请求接口 + 调用此接口后,将发送一个HTTP网络请求(用于访问微博open api) + @param url 请求url地址 + @param httpMethod 支持"GET" "POST" + @param params 向接口传递的参数结构 + @param queue 发起请求的NSOperationQueue对象,如queue为nil,则在主线程([NSOperationQueue mainQueue])发起请求。 + @param handler 接口请求返回调用的block方法 + */ ++ (WBHttpRequest *)requestWithURL:(NSString *)url + httpMethod:(NSString *)httpMethod + params:(NSDictionary *)params + queue:(NSOperationQueue*)queue + withCompletionHandler:(WBRequestHandler)handler; + + +/** + 统一HTTP请求接口 + 调用此接口后,将发送一个HTTP网络请求 + @param url 请求url地址 + @param httpMethod 支持"GET" "POST" + @param params 向接口传递的参数结构 + @param queue 发起请求的NSOperationQueue对象,如queue为nil,则在主线程([NSOperationQueue mainQueue])发起请求。 + @param handler 接口请求返回调用的block方法 + */ + ++ (WBHttpRequest *)requestWithAccessToken:(NSString *)accessToken + url:(NSString *)url + httpMethod:(NSString *)httpMethod + params:(NSDictionary *)params + queue:(NSOperationQueue*)queue + withCompletionHandler:(WBRequestHandler)handler; + + +@end diff --git a/ios/WeiboSDK.bundle/images/common_button_white@2x.png b/ios/WeiboSDK.bundle/images/common_button_white@2x.png new file mode 100755 index 0000000..fa8a56f Binary files /dev/null and b/ios/WeiboSDK.bundle/images/common_button_white@2x.png differ diff --git a/ios/WeiboSDK.bundle/images/common_button_white_highlighted@2x.png b/ios/WeiboSDK.bundle/images/common_button_white_highlighted@2x.png new file mode 100755 index 0000000..afae092 Binary files /dev/null and b/ios/WeiboSDK.bundle/images/common_button_white_highlighted@2x.png differ diff --git a/ios/WeiboSDK.bundle/images/empty_failed@2x.png b/ios/WeiboSDK.bundle/images/empty_failed@2x.png new file mode 100755 index 0000000..3f368f6 Binary files /dev/null and b/ios/WeiboSDK.bundle/images/empty_failed@2x.png differ diff --git a/ios/WeiboSDK.bundle/others/mfp.cer b/ios/WeiboSDK.bundle/others/mfp.cer new file mode 100755 index 0000000..56dd026 Binary files /dev/null and b/ios/WeiboSDK.bundle/others/mfp.cer differ diff --git a/ios/WeiboSDK.h b/ios/WeiboSDK.h new file mode 100755 index 0000000..60438bc --- /dev/null +++ b/ios/WeiboSDK.h @@ -0,0 +1,675 @@ +// +// WeiboSDKHeaders.h +// WeiboSDKDemo +// +// Created by Wade Cheng on 4/3/13. +// Copyright (c) 2013 SINA iOS Team. All rights reserved. +// + +#import +#import + +#import "WBHttpRequest.h" + + +typedef NS_ENUM(NSInteger, WeiboSDKResponseStatusCode) +{ + WeiboSDKResponseStatusCodeSuccess = 0,//成功 + WeiboSDKResponseStatusCodeUserCancel = -1,//用户取消发送 + WeiboSDKResponseStatusCodeSentFail = -2,//发送失败 + WeiboSDKResponseStatusCodeAuthDeny = -3,//授权失败 + WeiboSDKResponseStatusCodeUserCancelInstall = -4,//用户取消安装微博客户端 + WeiboSDKResponseStatusCodePayFail = -5,//支付失败 + WeiboSDKResponseStatusCodeShareInSDKFailed = -8,//分享失败 详情见response UserInfo + WeiboSDKResponseStatusCodeUnsupport = -99,//不支持的请求 + WeiboSDKResponseStatusCodeUnknown = -100, +}; + + +@protocol WeiboSDKDelegate; +@protocol WBHttpRequestDelegate; +@class WBBaseRequest; +@class WBBaseResponse; +@class WBMessageObject; +@class WBImageObject; +@class WBBaseMediaObject; +@class WBHttpRequest; +@class PHAsset; +@class WBNewVideoObject; + +/** + 微博SDK接口类 + */ +@interface WeiboSDK : NSObject + +/** + 检查用户是否安装了微博客户端程序 + @return 已安装返回YES,未安装返回NO + */ ++ (BOOL)isWeiboAppInstalled; + +/** + 检查用户是否可以通过微博客户端进行分享 + @return 可以使用返回YES,不可以使用返回NO + */ ++ (BOOL)isCanShareInWeiboAPP; + +/** + 检查用户是否可以使用微博客户端进行SSO授权 + @return 可以使用返回YES,不可以使用返回NO + */ ++ (BOOL)isCanSSOInWeiboApp; + +/** + 打开微博客户端程序 + @return 成功打开返回YES,失败返回NO + */ ++ (BOOL)openWeiboApp; + + + +/** + 获取微博客户端程序的itunes安装地址 + @return 微博客户端程序的itunes安装地址 + */ ++ (NSString *)getWeiboAppInstallUrl; + +/** + 获取当前微博SDK的版本号 + @return 当前微博SDK的版本号 + */ ++ (NSString *)getSDKVersion; + + +extern NSString * const WeiboSDKGetAidSucessNotification; +extern NSString * const WeiboSDKGetAidFailNotification; +/** + 获取当前微博SDK的aid + 返回的aid值可能为 nil ,当值为 nil 时会尝试获取 aid 值。 + 当获取成功( aid 值变为有效值)时,SDK会发出名为 WeiboSDKGetAidSucessNotification 的通知,通知中带有 aid 值。 + 当获取失败时,SDK会发出名为 WeiboSDKGetAidFailNotification 的通知,通知中带有 NSError 对象。 + @return aid 用于广告的与设备信息相关的标识符 + */ ++ (NSString *)getWeiboAid; + + +/** + 向微博客户端程序注册第三方应用 + @param appKey 微博开放平台第三方应用appKey + @return 注册成功返回YES,失败返回NO + */ ++ (BOOL)registerApp:(NSString *)appKey; + +/** + 处理微博客户端程序通过URL启动第三方应用时传递的数据 + + 需要在 application:openURL:sourceApplication:annotation:或者application:handleOpenURL中调用 + @param url 启动第三方应用的URL + @param delegate WeiboSDKDelegate对象,用于接收微博触发的消息 + @see WeiboSDKDelegate + */ ++ (BOOL)handleOpenURL:(NSURL *)url delegate:(id)delegate; + +/** + 发送请求给微博客户端程序,并切换到微博 + + 请求发送给微博客户端程序之后,微博客户端程序会进行相关的处理,处理完成之后一定会调用 [WeiboSDKDelegate didReceiveWeiboResponse:] 方法将处理结果返回给第三方应用 + + @param request 具体的发送请求 + + @see [WeiboSDKDelegate didReceiveWeiboResponse:] + @see WBBaseResponse + */ ++ (BOOL)sendRequest:(WBBaseRequest *)request; + +/** + 收到微博客户端程序的请求后,发送对应的应答给微博客户端端程序,并切换到微博 + + 第三方应用收到微博的请求后,异步处理该请求,完成后必须调用该函数将应答返回给微博 + + @param response 具体的应答内容 + @see WBBaseRequest + */ ++ (BOOL)sendResponse:(WBBaseResponse *)response; + +/** + 设置WeiboSDK的调试模式 + + 当开启调试模式时,WeiboSDK会在控制台输出详细的日志信息,开发者可以据此调试自己的程序。默认为 NO + @param enabled 开启或关闭WeiboSDK的调试模式 + */ ++ (void)enableDebugMode:(BOOL)enabled; + +/** + 取消授权,登出接口 + 调用此接口后,token将失效 + @param token 第三方应用之前申请的Token + @param delegate WBHttpRequestDelegate对象,用于接收微博SDK对于发起的接口请求的请求的响应 + @param tag 用户自定义TAG,将通过回调WBHttpRequest实例的tag属性返回 + + */ ++ (void)logOutWithToken:(NSString *)token delegate:(id)delegate withTag:(NSString*)tag; + +/** + 呼起微博客户端或打开微博H5页面,SDK自动检测是否安装微博客户端,当调用SDK相关方法时: + + 有的话呼起微博客户端定位到对应界面; + 没有的话打开 webView 加载相应的微博H5页面; + @param uid 用户id + @param mid 微博id + @param aid 文章id +*/ + +//连接到指定用户的微博个人主页,连接后可进行加关注等互动 ++ (void)linkToUser:(NSString *)uid; + +//连接到指定的单条微博详情页,连接后可对这条微博进行转、评、赞等互动 ++ (void)linkToSingleBlog:(NSString *)uid blogID:(NSString *)mid; + +//连接到指定的微博头条文章页 ++ (void)linkToArticle:(NSString *)aid; + +//分享到微博 ++ (void)shareToWeibo:(NSString *)content; + +//评论指定的微博 ++ (void)commentToWeibo:(NSString *)mid; + +//连接到微博搜索内容流 ++ (void)linkToSearch:(NSString *)keyword; + +//连接到我的微博消息流 ++ (void)linkToTimeLine; + +//连接到我的微博个人主页 ++ (void)linkToProfile; + +@end + +/** + 接收并处理来至微博客户端程序的事件消息 + */ +@protocol WeiboSDKDelegate + +/** + 收到一个来自微博客户端程序的请求 + + 收到微博的请求后,第三方应用应该按照请求类型进行处理,处理完后必须通过 [WeiboSDK sendResponse:] 将结果回传给微博 + @param request 具体的请求对象 + */ +- (void)didReceiveWeiboRequest:(WBBaseRequest *)request; + +/** + 收到一个来自微博客户端程序的响应 + + 收到微博的响应后,第三方应用可以通过响应类型、响应的数据和 WBBaseResponse.userInfo 中的数据完成自己的功能 + @param response 具体的响应对象 + */ +- (void)didReceiveWeiboResponse:(WBBaseResponse *)response; + +@end + + +#pragma mark - DataTransferObject and Base Request/Response + +/** + 微博客户端程序和第三方应用之间传输数据信息的基类 + */ +@interface WBDataTransferObject : NSObject + +/** + 自定义信息字典,用于数据传输过程中存储相关的上下文环境数据 + + 第三方应用给微博客户端程序发送 request 时,可以在 userInfo 中存储请求相关的信息。 + + @warning userInfo中的数据必须是实现了 `NSCoding` 协议的对象,必须保证能序列化和反序列化 + @warning 序列化后的数据不能大于10M + */ +@property (nonatomic, strong) NSDictionary *userInfo; + + +/** + 发送该数据对象的SDK版本号 + + 如果数据对象是自己生成的,则sdkVersion为当前SDK的版本号;如果是接收到的数据对象,则sdkVersion为数据发送方SDK版本号 + */ +@property (strong, nonatomic, readonly) NSString *sdkVersion; + + +/** + 当用户没有安装微博客户端程序时是否提示用户打开微博安装页面 + + 如果设置为YES,当用户未安装微博时会弹出Alert询问用户是否要打开微博App的安装页面。默认为YES + */ +@property (nonatomic, assign) BOOL shouldOpenWeiboAppInstallPageIfNotInstalled; + + +@end + + +/** + 微博SDK所有请求类的基类 + */ +@interface WBBaseRequest : WBDataTransferObject + +/** + 返回一个 WBBaseRequest 对象 + + @return 返回一个*自动释放的*WBBaseRequest对象 + */ ++ (id)request; + +@end + + +/** + 微博SDK所有响应类的基类 + */ +@interface WBBaseResponse : WBDataTransferObject + +/** + 对应的 request 中的自定义信息字典 + + 如果当前 response 是由微博客户端响应给第三方应用的,则 requestUserInfo 中会包含原 request.userInfo 中的所有数据 + + @see WBBaseRequest.userInfo + */ +@property (strong, nonatomic, readonly) NSDictionary *requestUserInfo; + +/** + 响应状态码 + + 第三方应用可以通过statusCode判断请求的处理结果 + */ +@property (nonatomic, assign) WeiboSDKResponseStatusCode statusCode; + +/** + 返回一个 WBBaseResponse 对象 + + @return 返回一个*自动释放的*WBBaseResponse对象 + */ ++ (id)response; + +@end + +#pragma mark - Authorize Request/Response + +/** + 第三方应用向微博客户端请求认证的消息结构 + + 第三方应用向微博客户端申请认证时,需要调用 [WeiboSDK sendRequest:] 函数, 向微博客户端发送一个 WBAuthorizeRequest 的消息结构。 + 微博客户端处理完后会向第三方应用发送一个结构为 WBAuthorizeResponse 的处理结果。 + */ +@interface WBAuthorizeRequest : WBBaseRequest + +/** + 微博开放平台第三方应用授权回调页地址,默认为`http://` + + 参考 http://open.weibo.com/wiki/%E6%8E%88%E6%9D%83%E6%9C%BA%E5%88%B6%E8%AF%B4%E6%98%8E#.E5.AE.A2.E6.88.B7.E7.AB.AF.E9.BB.98.E8.AE.A4.E5.9B.9E.E8.B0.83.E9.A1.B5 + + @warning 必须保证和在微博开放平台应用管理界面配置的“授权回调页”地址一致,如未进行配置则默认为`http://` + @warning 不能为空,长度小于1K + */ +@property (nonatomic, strong) NSString *redirectURI; + +/** + 微博开放平台第三方应用scope,多个scrope用逗号分隔 + + 参考 http://open.weibo.com/wiki/%E6%8E%88%E6%9D%83%E6%9C%BA%E5%88%B6%E8%AF%B4%E6%98%8E#scope + + @warning 长度小于1K + */ +@property (nonatomic, strong) NSString *scope; + +/** + 当用户没有安装微博客户端或微博客户端过低无法支持SSO的时候是否弹出SDK自带的Webview进行授权 + + 如果设置为YES,当用户没有安装微博客户端或微博客户端过低无法支持SSO的时候会自动弹出SDK自带的Webview进行授权。 + + 如果设置为NO,会根据 shouldOpenWeiboAppInstallPageIfNotInstalled 属性判断是否弹出安装/更新微博的对话框 + + 默认为YES + */ +@property (nonatomic, assign) BOOL shouldShowWebViewForAuthIfCannotSSO; + + +@end + + +/** + 微博客户端处理完第三方应用的认证申请后向第三方应用回送的处理结果 + + WBAuthorizeResponse 结构中仅包含常用的 userID 、accessToken 和 expirationDate 信息,其他的认证信息(比如部分应用可以获取的 refresh_token 信息)会统一存放到 userInfo 中 + */ +@interface WBAuthorizeResponse : WBBaseResponse + +/** + 用户ID + */ +@property (nonatomic, strong) NSString *userID; + +/** + 认证口令 + */ +@property (nonatomic, strong) NSString *accessToken; + +/** + 认证过期时间 + */ +@property (nonatomic, strong) NSDate *expirationDate; + +/** + 当认证口令过期时用于换取认证口令的更新口令 + */ +@property (nonatomic, strong) NSString *refreshToken; + +@end + +#pragma mark - ProvideMessageForWeibo Request/Response + +/** + 微博客户端向第三方程序请求提供内容的消息结构 + */ +@interface WBProvideMessageForWeiboRequest : WBBaseRequest + +@end + +/** + 微博客户端向第三方应用请求提供内容,第三方应用向微博客户端返回的消息结构 + */ +@interface WBProvideMessageForWeiboResponse : WBBaseResponse + +/** + 提供给微博客户端的消息 + */ +@property (nonatomic, strong) WBMessageObject *message; + +/** + 返回一个 WBProvideMessageForWeiboResponse 对象 + @param message 需要回送给微博客户端程序的消息对象 + @return 返回一个*自动释放的*WBProvideMessageForWeiboResponse对象 + */ ++ (id)responseWithMessage:(WBMessageObject *)message; + +@end + +#pragma mark - SendMessageToWeibo Request/Response + +/** + 第三方应用发送消息至微博客户端程序的消息结构体 + */ +@interface WBSendMessageToWeiboRequest : WBBaseRequest + +/** + 发送给微博客户端的消息 + */ +@property (nonatomic, strong) WBMessageObject *message; + +/** + 返回一个 WBSendMessageToWeiboRequest 对象 + 此方法生成对象被[WeiboSDK sendRequest:]会唤起微博客户端的发布器进行分享,如果未安装微博客户端或客户端版本太低 + 会根据 shouldOpenWeiboAppInstallPageIfNotInstalled 属性判断是否弹出安装/更新微博的对话框 + @param message 需要发送给微博客户端的消息对象 + @return 返回一个*自动释放的*WBSendMessageToWeiboRequest对象 + */ ++ (id)requestWithMessage:(WBMessageObject *)message; + +/** + 返回一个 WBSendMessageToWeiboRequest 对象 + + 当用户安装了可以支持微博客户端內分享的微博客户端时,会自动唤起微博并分享 + 当用户没有安装微博客户端或微博客户端过低无法支持通过客户端內分享的时候会自动唤起SDK內微博发布器 + + @param message 需要发送给微博的消息对象 + @param authRequest 授权相关信息,与access_token二者至少有一个不为空,当access_token为空并且需要弹出SDK內发布器时会通过此信息先进行授权后再分享 + @param access_token 第三方应用之前申请的Token,当此值不为空并且无法通过客户端分享的时候,会使用此token进行分享。 + @return 返回一个*自动释放的*WBSendMessageToWeiboRequest对象 + */ ++ (id)requestWithMessage:(WBMessageObject *)message + authInfo:(WBAuthorizeRequest *)authRequest + access_token:(NSString *)access_token; + +@end + +/** + WBSendMessageToWeiboResponse + */ +@interface WBSendMessageToWeiboResponse : WBBaseResponse + +/** + 可能在分享过程中用户进行了授权操作,当此值不为空时,为用户相应授权信息 + */ +@property (nonatomic,strong) WBAuthorizeResponse *authResponse; +@end + + + +#pragma mark - MessageObject / ImageObject + +/** + 微博客户端程序和第三方应用之间传递的消息结构 + + 一个消息结构由三部分组成:文字、图片和多媒体数据。三部分内容中至少有一项不为空,图片和多媒体数据不能共存。(新版的多图和视频属于图片数据,并且图片和视频也不能共存) + */ +@interface WBMessageObject : NSObject + +/** + 消息的文本内容 + + @warning 长度小于2000个汉字 + */ +@property (nonatomic, strong) NSString *text; + +/** + 消息的图片内容 + + @see WBImageObject + */ +@property (nonatomic, strong) WBImageObject *imageObject; + +/** + 消息的多媒体内容 + + @see WBBaseMediaObject + */ +@property (nonatomic, strong) WBBaseMediaObject *mediaObject; + +/** + 消息的视频内容 + + @see WBVideoObject + */ +@property (nonatomic, strong) WBNewVideoObject *videoObject; +/** + 返回一个 WBMessageObject 对象 + + @return 返回一个*自动释放的*WBMessageObject对象 + */ ++ (id)message; + +@end + +/** + 图片视频分享时错误枚举 + */ + +typedef NS_ENUM(NSInteger, WBSDKMediaTransferErrorCode) +{ + WBSDKMediaTransferAlbumPermissionError = 0,//相册权限 + WBSDKMediaTransferAlbumWriteError = 0,//相册写入错误 + WBSDKMediaTransferAlbumAssetTypeError = 0,//资源类型错误 +}; + +/** + 图片视频分享协议 + */ +@protocol WBMediaTransferProtocol + +/** + 数据准备成功回调 + */ +-(void)wbsdk_TransferDidReceiveObject:(id)object; + +/** + 数据准备失败回调 + */ +-(void)wbsdk_TransferDidFailWithErrorCode:(WBSDKMediaTransferErrorCode)errorCode andError:(NSError*)error; + +@end + +/** + 消息中包含的图片数据对象 + */ +@interface WBImageObject : NSObject + +/** + 图片真实数据内容 + + @warning 大小不能超过10M + */ +@property (nonatomic, strong) NSData *imageData; + +/** + 是否分享到story + */ +@property (nonatomic) BOOL isShareToStory; + +/** + 返回一个 WBImageObject 对象 + + @return 返回一个*自动释放的*WBImageObject对象 + */ ++ (id)object; + +/** + 返回一个 UIImage 对象 + + @return 返回一个*自动释放的*UIImage对象 + */ +- (UIImage *)image; + + +/** + 多图分享委托 + */ +@property(nonatomic,weak)id delegate; + +/** + 图片对象添加图片数组 + */ +- (void)addImages:(NSArray*)imageArray; + +/** + 图片对象添加照片数组 + */ +- (void)addImageAssets:(NSArray*)assetArray; + +/** + 多图最终传递对象 + */ +-(NSArray*)finalAssetArray; + +@end + +@interface WBNewVideoObject : NSObject + +/** + 返回一个 WBNewVideoObject 对象 + + @return 返回一个*自动释放的*WBNewVideoObject对象 + */ ++ (id)object; + +/** + 是否分享到story + */ +@property (nonatomic) BOOL isShareToStory; + +/** + 多图分享委托 + */ +@property(nonatomic,weak)id delegate; + +/** + 视频对象添加视频 + */ +-(void)addVideo:(NSURL*)videoUrl; + +/** + 视频对象添加视频资源 + */ +-(void)addVideoAsset:(PHAsset*)videoAsset; + +/** + 视频最终传递对象 + */ +-(NSString*)finalAsset; + +@end + + +#pragma mark - Message Media Objects + +/** + 消息中包含的多媒体数据对象基类,该类后期会被废弃,在发布器不再显示为linkcard样式,只显示为普通网络连接 + */ +@interface WBBaseMediaObject : NSObject + +/** + 对象唯一ID,用于唯一标识一个多媒体内容 + + 当第三方应用分享多媒体内容到微博时,应该将此参数设置为被分享的内容在自己的系统中的唯一标识 + @warning 不能为空,长度小于255 + */ +@property (nonatomic, strong) NSString *objectID; + +/** + 多媒体内容标题 + @warning 不能为空且长度小于1k + */ +@property (nonatomic, strong) NSString *title; + +/** + 多媒体内容描述 + @warning 长度小于1k + */ +@property (nonatomic, strong) NSString *description; + +/** + 多媒体内容缩略图 + @warning 大小小于32k + */ +@property (nonatomic, strong) NSData *thumbnailData; + +/** + 点击多媒体内容之后呼起第三方应用特定页面的scheme + @warning 长度小于255 + */ +@property (nonatomic, strong) NSString *scheme; + +/** + 返回一个 WBBaseMediaObject 对象 + + @return 返回一个*自动释放的*WBBaseMediaObject对象 + */ ++ (id)object; + +@end + +#pragma mark - Message WebPage Objects + +/** + 消息中包含的网页数据对象 + */ +@interface WBWebpageObject : WBBaseMediaObject + +/** + 网页的url地址 + + @warning 不能为空且长度不能超过255 + */ +@property (nonatomic, strong) NSString *webpageUrl; + +@end + + diff --git a/ios/libWeiboSDK.a b/ios/libWeiboSDK.a new file mode 100755 index 0000000..987de65 Binary files /dev/null and b/ios/libWeiboSDK.a differ diff --git a/package.json b/package.json new file mode 100644 index 0000000..0f29497 --- /dev/null +++ b/package.json @@ -0,0 +1,29 @@ + +{ + "name": "react-native-weibo-login", + "version": "1.0.1", + "description": "新浪微博登录模块", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/zhanguangao/react-native-weibo-login.git" + }, + "keywords": [ + "react-native", + "ios", + "android", + "weibo", + "sina", + "login" + ], + "author": "zhanguangao", + "license": "ISC", + "bugs": { + "url": "https://github.com/zhanguangao/react-native-weibo-login/issues" + }, + "homepage": "https://github.com/zhanguangao/react-native-weibo-login#readme" + +}