diff --git a/.gitignore b/.gitignore index 75c71d3..2316c0a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,35 @@ -/android/build +# VSCode +.vscode/ +typings/ +typings.json + +# Node +node_modules/ + +# Xcode +*.xcuserstate +ios/Podfile.lock +ios/Pods/ +ios/RCTQQAPI.xcworkspace/xcuserdata/ +ios/RCTQQAPI.xcodeproj/xcuserdata/ + +# Android .idea +.gradle +local.properties +*.iml +android/app/build +android/update/library/build +android/gradle/ +android/gradlew +android/gradlew.bat + +# Watchman +.watchmanconfig + +*.log +.nvm +package-lock.json + +# OS X +.DS_Store diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..a2efcfa --- /dev/null +++ b/index.d.ts @@ -0,0 +1,11 @@ +declare module "react-native-qq" { + export interface LoginInfo { + access_token: string + expires_in: number + oauth_consumer_key: string, + errCode: number, + openid: string + } + export function login (key: string): Promise +} + diff --git a/ios/RCTQQAPI.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/RCTQQAPI.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/ios/RCTQQAPI.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ios/RCTQQAPI.xcodeproj/xcuserdata/lvbingru.xcuserdatad/xcschemes/RCTQQAPI.xcscheme b/ios/RCTQQAPI.xcodeproj/xcuserdata/lvbingru.xcuserdatad/xcschemes/RCTQQAPI.xcscheme deleted file mode 100644 index e27fed5..0000000 --- a/ios/RCTQQAPI.xcodeproj/xcuserdata/lvbingru.xcuserdatad/xcschemes/RCTQQAPI.xcscheme +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ios/RCTQQAPI.xcodeproj/xcuserdata/lvbingru.xcuserdatad/xcschemes/xcschememanagement.plist b/ios/RCTQQAPI.xcodeproj/xcuserdata/lvbingru.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index b55cc06..0000000 --- a/ios/RCTQQAPI.xcodeproj/xcuserdata/lvbingru.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - SchemeUserState - - RCTQQAPI.xcscheme - - orderHint - 13 - - - SuppressBuildableAutocreation - - 9139321B1C232D310085E3BA - - primary - - - - - diff --git a/ios/RCTQQAPI/RCTQQAPI.m b/ios/RCTQQAPI/RCTQQAPI.m index 27a3f4c..0201ce8 100644 --- a/ios/RCTQQAPI/RCTQQAPI.m +++ b/ios/RCTQQAPI/RCTQQAPI.m @@ -296,4 +296,9 @@ - (void)tencentDidNotNetWork { } ++ (BOOL)requiresMainQueueSetup +{ + return YES; +} + @end diff --git a/package.json b/package.json index 5ce37fd..b2f58eb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-qq", - "version": "3.0.0", + "version": "2.0.5", "description": "QQ Login&Share support in React Native.", "main": "index.js", "scripts": { diff --git a/react-native-qq.podspec b/react-native-qq.podspec new file mode 100644 index 0000000..d0a7bd9 --- /dev/null +++ b/react-native-qq.podspec @@ -0,0 +1,28 @@ +# +# Be sure to run `pod spec lint react-native-qq.podspec' to ensure this is a +# valid spec and to remove all comments including this before submitting the spec. +# +# To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html +# To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ +# + +require "json" + +package = JSON.parse(File.read('package.json')) + +Pod::Spec.new do |s| + + s.name = "react-native-qq" + s.version = package["version"] + s.summary = package["description"] + s.author = 'tdzl2003' + s.homepage = package["homepage"] + s.license = package["license"] + s.platform = :ios, "9.0" + s.source = { :git => "https://github.com/EternalChildren/react-native-qq.git"} + s.source_files = "ios/**/*.{h,m}" + s.vendored_frameworks = 'ios/RCTQQAPI/TencentOpenAPI.framework' + s.libraries = 'iconv', 'sqlite3', 'c++', 'z' + s.dependency "React" + +end \ No newline at end of file