Xcode -Parse -Fehler auf macOS 15.4 mit GRPC in Flutter
Posted: 12 Apr 2025, 07:19
hat vor 2 Tagen ohne Probleme an meiner Flutter -App gearbeitet. Heute habe ich meine macOS auf 15.4 aktualisiert, was ich auch für eine neuere Version von Xcode aktualisiert habe. Beim ersten Build der App ohne Aktualisierung von Paketen (Pub oder POD) ist es mit dem folgenden Code fehlgeschlagen: < /p>
Code: Select all
Parse Issue (Xcode): A template argument list is expected after a name prefixed by the template keyword
(root)/ios/Pods/gRPC-Core/src/core/lib/promise/detail/basic_seq.h:102:37
< /code>
Dies führt dazu, dass die App überhaupt nicht erstellt und natürlich nicht geladen wird. in der Datei manuell ohne mehr Fehler zu verursachen. Ich habe fast ähnliche Probleme mit etwas gesehen, das "LLVM" genannt wird, aber nicht genau gleich. Dateien: < /p>
Podfile: < /p>
platform :ios, '16.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|
# This removes the warning about script phases
installer.pods_project.build_configurations.each do |config|
config.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES'
end
installer.pods_project.targets.each do |target|
# New BoringSSL-GRPC compiler flags fix
if target.name == 'BoringSSL-GRPC'
target.source_build_phase.files.each do |file|
if file.settings && file.settings['COMPILER_FLAGS']
flags = file.settings['COMPILER_FLAGS'].split
flags.reject! { |flag| flag == '-GCC_WARN_INHIBIT_ALL_WARNINGS' }
file.settings['COMPILER_FLAGS'] = flags.join(' ')
end
end
end
flutter_additional_ios_build_settings(target)
# This disables the script phase warnings
target.build_phases.each do |build_phase|
if build_phase.respond_to?(:name) && build_phase.name.start_with?("Create Symlinks")
build_phase.always_out_of_date = "1"
end
end
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '16.0'
config.build_settings['ENABLE_BITCODE'] = 'NO'
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'NO'
# Fix for BoringSSL-GRPC
if target.name == 'BoringSSL-GRPC'
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= '$(inherited)'
config.build_settings['OTHER_CFLAGS'] = '$(inherited) -fno-inline'
config.build_settings.delete('OTHER_CFLAGS') if config.build_settings['OTHER_CFLAGS']&.include?('-G')
end
# Fix for Xcode 15 framework issues
config.build_settings['FRAMEWORK_SEARCH_PATHS'] ||= ['$(inherited)']
config.build_settings['FRAMEWORK_SEARCH_PATHS']
Fehlerdatei (Basic_seq.h): < /p>
// Copyright 2021 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef GRPC_SRC_CORE_LIB_PROMISE_DETAIL_BASIC_SEQ_H
#define GRPC_SRC_CORE_LIB_PROMISE_DETAIL_BASIC_SEQ_H
#include
#include "src/core/lib/gprpp/construct_destruct.h"
#include "src/core/lib/promise/poll.h"
namespace grpc_core {
namespace promise_detail {
// Models a sequence of unknown size
// At each element, the accumulator A and the current value V is passed to some
// function of type IterTraits::Factory as f(V, IterTraits::Argument); f is
// expected to return a promise that resolves to IterTraits::Wrapped.
template
class BasicSeqIter {
private:
using Traits = typename IterTraits::Traits;
using Iter = typename IterTraits::Iter;
using Factory = typename IterTraits::Factory;
using Argument = typename IterTraits::Argument;
using IterValue = typename IterTraits::IterValue;
using StateCreated = typename IterTraits::StateCreated;
using State = typename IterTraits::State;
using Wrapped = typename IterTraits::Wrapped;
public:
BasicSeqIter(Iter begin, Iter end, Factory f, Argument arg)
: cur_(begin), end_(end), f_(std::move(f)) {
if (cur_ == end_) {
Construct(&result_, std::move(arg));
} else {
Construct(&state_, f_(*cur_, std::move(arg)));
}
}
~BasicSeqIter() {
if (cur_ == end_) {
Destruct(&result_);
} else {
Destruct(&state_);
}
}
BasicSeqIter(const BasicSeqIter& other) = delete;
BasicSeqIter& operator=(const BasicSeqIter&) = delete;
BasicSeqIter(BasicSeqIter&& other) noexcept
: cur_(other.cur_), end_(other.end_), f_(std::move(other.f_)) {
if (cur_ == end_) {
Construct(&result_, std::move(other.result_));
} else {
Construct(&state_, std::move(other.state_));
}
}
BasicSeqIter& operator=(BasicSeqIter&& other) noexcept {
cur_ = other.cur_;
end_ = other.end_;
if (cur_ == end_) {
Construct(&result_, std::move(other.result_));
} else {
Construct(&state_, std::move(other.state_));
}
return *this;
}
Poll operator()() {
if (cur_ == end_) {
return std::move(result_);
}
return PollNonEmpty();
}
private:
Poll PollNonEmpty() {
Poll r = state_();
if (r.pending()) return r;
return Traits::template CheckResultAndRunNext(
std::move(r.value()), [this](Wrapped arg) -> Poll {
auto next = cur_;
++next;
if (next == end_) {
return std::move(arg);
}
cur_ = next;
state_.~State();
Construct(&state_,
Traits::template CallSeqFactory(f_, *cur_, std::move(arg)));
return PollNonEmpty();
});
}
Iter cur_;
const Iter end_;
GPR_NO_UNIQUE_ADDRESS Factory f_;
union {
GPR_NO_UNIQUE_ADDRESS State state_;
GPR_NO_UNIQUE_ADDRESS Argument result_;
};
};
} // namespace promise_detail
} // namespace grpc_core
#endif // GRPC_SRC_CORE_LIB_PROMISE_DETAIL_BASIC_SEQ_H