RxReader / wechat_kit

Flutter 版微信登录/分享/支付 SDK
https://pub.dev/packages/wechat_kit
MIT License
736 stars 127 forks source link

配置ios: no_pay 后出现以下错误,大佬帮忙看一下 #133

Open suyie001 opened 1 year ago

suyie001 commented 1 year ago

在pubspec里是这么写的 wechat_kit: ios: no_pay app_id: xxx universal_link: xxx

以前可以运行的,最近增加新功能后不能运行了,错误如下: using sdk with normal [!] Failed to load 'wechat_kit' podspec: [!] Invalid wechat_kit.podspec file: Alias parsing was not enabled. To enable it, pass aliases: true to Psych::load or Psych::safe_load..

from /Users/suya/StudioProjects/miyue_fm/ios/.symlinks/plugins/wechat_kit/ios/wechat_kit.podspec:13

-------------------------------------------

flutter_project_dir = calling_dir.slice(0..(calling_dir.index('/ios/.symlinks')))

cfg = YAML.load_file(File.join(flutter_project_dir, 'pubspec.yaml'))

if cfg['wechat_kit'] && cfg['wechat_kit']['ios'] == 'no_pay'

-------------------------------------------

droplet-js commented 1 year ago

升级cocoapods

suyie001 commented 1 year ago

我把wechat_kit.podspec文件改成这样后可以运行了。。 pubspec = YAML.load_file(File.join('..', 'pubspec.yaml')) library_version = pubspec['version'].gsub('+', '-')

current_dir = Dir.pwd calling_dir = File.dirname(FILE) project_dir = calling_dir.slice(0..(calling_dir.index('/.symlinks'))) flutter_project_dir = calling_dir.slice(0..(calling_dir.index('/ios/.symlinks')))

puts Psych::VERSION psych_version_gte_500 = Gem::Version.new(Psych::VERSION) >= Gem::Version.new('5.0.0') if psych_version_gte_500 == true cfg = YAML.load_file(File.join(flutter_project_dir, 'pubspec.yaml'), aliases: true) else cfg = YAML.load_file(File.join(flutter_project_dir, 'pubspec.yaml')) end

droplet-js commented 1 year ago

我把wechat_kit.podspec文件改成这样后可以运行了。。 pubspec = YAML.load_file(File.join('..', 'pubspec.yaml')) library_version = pubspec['version'].gsub('+', '-')

current_dir = Dir.pwd calling_dir = File.dirname(FILE) project_dir = calling_dir.slice(0..(calling_dir.index('/.symlinks'))) flutter_project_dir = calling_dir.slice(0..(calling_dir.index('/ios/.symlinks')))

puts Psych::VERSION psych_version_gte_500 = Gem::Version.new(Psych::VERSION) >= Gem::Version.new('5.0.0') if psych_version_gte_500 == true cfg = YAML.load_file(File.join(flutter_project_dir, 'pubspec.yaml'), aliases: true) else cfg = YAML.load_file(File.join(flutter_project_dir, 'pubspec.yaml')) end

你这遇到的问题和之前一个 tencent_kit 的 BUG 一致,我这两天统一处理一下吧

kennethkwok commented 1 year ago

@droplet-js 有其他解決方法嗎?我已經把cocoapods升到最新版本了(1.14.2) 但是問題依然出現

這是CI環境上的 flutter doctor -v

+ flutter doctor -v
[✓] Flutter (Channel stable, 3.13.6, on macOS 13.2 22D49 darwin-arm64 (Rosetta), locale en-US)
    • Flutter version 3.13.6 on channel stable at /Users/vagrant/flutter-sdk/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ead455963c (5 weeks ago), 2023-09-26 18:28:17 -0700
    • Engine revision a794cf2681
    • Dart version 3.1.3
    • DevTools version 2.25.0
[!] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at /usr/local/share/android-sdk
    • Platform android-32, build-tools 32.1.0-rc1
    • ANDROID_HOME = /usr/local/share/android-sdk
    • ANDROID_SDK_ROOT = /usr/local/share/android-sdk
    • Java binary at: /Users/vagrant/.jenv/versions/11.0/bin/java
    • Java version OpenJDK Runtime Environment Temurin-11.0.17+8 (build 11.0.17+8)
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode-14.2.0.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.14.2
[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
[✓] Connected device (1 available)
    • macOS (desktop) • macos • darwin-arm64 • macOS 13.2 22D49 darwin-arm64 (Rosetta)
[✓] Network resources
    • All expected network resources are available.