PlatformException (ошибка канала, невозможно установить соединение на канале., ноль, ноль) xcodeIOS

Программируем под IOS
Ответить
Anonymous
 PlatformException (ошибка канала, невозможно установить соединение на канале., ноль, ноль) xcode

Сообщение Anonymous »

Я работаю над версией своего приложения Flutter для iOS. Я получаю несколько ошибок, таких как ошибка канала PlatformException, когда я использую поставщика пути флаттера. Для пакета общих настроек флаттера я получаю сообщение об ошибке

Код: Выделить всё

Unable to establish connection on channel: "dev.flutter.pigeon.shared_preferences_foundation.LegacyUserDefaultsApi.getAll"., null, null
Когда я пытаюсь использовать базу данных с помощью Floor, я получаю сообщение

Код: Выделить всё

MissingPluginException(No implementation found for method getDatabasesPath on channel com.tekartik.sqflite)
Похоже, iOS и Flutter не могут взаимодействовать должным образом. Я поделюсь здесь своим файлом делегата приложения, файлом pod и файлом pubspec.
Appdelegate

Код: Выделить всё

import UIKit
import Flutter
import GoogleMaps

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)

GMSServices.provideAPIKey("my_api_key")

if #available(iOS 10.0, *) {
UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate
}

return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
Файл pod

Код: Выделить всё

platform :ios, '14.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}

def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), _FILE_)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end

File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}.  Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
use_frameworks!
use_modular_headers!

flutter_install_all_ios_pods File.dirname(File.realpath(_FILE_))
target 'RunnerTests' do
inherit! :search_paths
end
end

post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
Файл pubspec

Код: Выделить всё

name: inhrm
description: InHRM Flutter Application

publish_to: 'none'

version: 1.0.0+1

environment:
sdk: ">=2.13.0 

Подробнее здесь: [url]https://stackoverflow.com/questions/79011256/platformexceptionchannel-error-unable-to-establish-connection-on-channel-nul[/url]
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «IOS»