From b16d3e6abccfe218ec1ea70372e68b6fe0991358 Mon Sep 17 00:00:00 2001 From: schild Date: Fri, 28 Sep 2018 11:55:00 +0800 Subject: [PATCH 1/5] increase podspec --- ios/react-native-qq.podspec | 28 ++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 ios/react-native-qq.podspec diff --git a/ios/react-native-qq.podspec b/ios/react-native-qq.podspec new file mode 100644 index 0000000..cc8495f --- /dev/null +++ b/ios/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(File.join(__dir__, "../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", :tag => "#{s.version}" } + s.source_files = "RCTQQAPI/*.{h,m}" + s.vendored_frameworks = 'RCTQQAPI/TencentOpenAPI.framework' + s.libraries = 'iconv', 'sqlite3', 'c++', 'z' + s.dependency "React" + +end \ No newline at end of file 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": { From 94e74f24e0a4ccc089d66b93106b66bcb0963ea8 Mon Sep 17 00:00:00 2001 From: schild Date: Fri, 28 Sep 2018 15:54:35 +0800 Subject: [PATCH 2/5] change the path of .podspec --- ios/react-native-qq.podspec => react-native-qq.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename ios/react-native-qq.podspec => react-native-qq.podspec (89%) diff --git a/ios/react-native-qq.podspec b/react-native-qq.podspec similarity index 89% rename from ios/react-native-qq.podspec rename to react-native-qq.podspec index cc8495f..2f3816a 100644 --- a/ios/react-native-qq.podspec +++ b/react-native-qq.podspec @@ -20,8 +20,8 @@ Pod::Spec.new do |s| s.license = package["license"] s.platform = :ios, "9.0" s.source = { :git => "https://github.com/EternalChildren/react-native-qq.git", :tag => "#{s.version}" } - s.source_files = "RCTQQAPI/*.{h,m}" - s.vendored_frameworks = 'RCTQQAPI/TencentOpenAPI.framework' + s.source_files = "ios/**/*.{h,m}" + s.vendored_frameworks = 'ios/RCTQQAPI/TencentOpenAPI.framework' s.libraries = 'iconv', 'sqlite3', 'c++', 'z' s.dependency "React" From c00ffa85b73f90325e00d37bc3405093190c0bbe Mon Sep 17 00:00:00 2001 From: schild Date: Fri, 28 Sep 2018 16:00:16 +0800 Subject: [PATCH 3/5] change tag --- react-native-qq.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/react-native-qq.podspec b/react-native-qq.podspec index 2f3816a..d0a7bd9 100644 --- a/react-native-qq.podspec +++ b/react-native-qq.podspec @@ -8,7 +8,7 @@ require "json" -package = JSON.parse(File.read(File.join(__dir__, "../package.json"))) +package = JSON.parse(File.read('package.json')) Pod::Spec.new do |s| @@ -19,7 +19,7 @@ Pod::Spec.new do |s| s.homepage = package["homepage"] s.license = package["license"] s.platform = :ios, "9.0" - s.source = { :git => "https://github.com/EternalChildren/react-native-qq.git", :tag => "#{s.version}" } + 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' From 3eb55ef32145563cb4ddbccabc1b59cf0d07a48e Mon Sep 17 00:00:00 2001 From: schild Date: Fri, 28 Sep 2018 20:31:13 +0800 Subject: [PATCH 4/5] repair a bug for react-native --- .gitignore | 35 ++++++++++++++++++++++++++++++++++- ios/RCTQQAPI/RCTQQAPI.m | 5 +++++ 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 75c71d3..708b8e6 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/euler_app_v1.xcworkspace/xcuserdata/ +ios/euler_app_v1.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/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 From 119a2fe85fcd21fafafc40f97c0ff3c940dfd34e Mon Sep 17 00:00:00 2001 From: EternalChildren Date: Fri, 28 Dec 2018 21:30:30 +0800 Subject: [PATCH 5/5] increase declare file --- .gitignore | 4 +- index.d.ts | 11 +++ .../xcshareddata/IDEWorkspaceChecks.plist | 8 ++ .../xcschemes/RCTQQAPI.xcscheme | 80 ------------------- .../xcschemes/xcschememanagement.plist | 22 ----- 5 files changed, 21 insertions(+), 104 deletions(-) create mode 100644 index.d.ts create mode 100644 ios/RCTQQAPI.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 ios/RCTQQAPI.xcodeproj/xcuserdata/lvbingru.xcuserdatad/xcschemes/RCTQQAPI.xcscheme delete mode 100644 ios/RCTQQAPI.xcodeproj/xcuserdata/lvbingru.xcuserdatad/xcschemes/xcschememanagement.plist diff --git a/.gitignore b/.gitignore index 708b8e6..2316c0a 100644 --- a/.gitignore +++ b/.gitignore @@ -10,8 +10,8 @@ node_modules/ *.xcuserstate ios/Podfile.lock ios/Pods/ -ios/euler_app_v1.xcworkspace/xcuserdata/ -ios/euler_app_v1.xcodeproj/xcuserdata/ +ios/RCTQQAPI.xcworkspace/xcuserdata/ +ios/RCTQQAPI.xcodeproj/xcuserdata/ # Android .idea 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 - - - - -