gpt4 book ai didi

ios - 在 flutter 时从 NotificationServiceExtension 更改 CFBundleVersion #66448

转载 作者:行者123 更新时间:2023-12-04 13:32:53 26 4
gpt4 key购买 nike

我已经在我的应用程序 OneSignal 中进行了配置,所以我需要在我的 iOS 项目上创建一个通知服务扩展。
问题是,当我在 Apple Store 上发布我的应用程序时,我收到此错误:

ITMS-90473: CFBundleVersion Mismatch - The CFBundleVersion value '15' of extension 'Runner.app/PlugIns/OneSignalNotificationServiceExtension.appex' does not match the CFBundleVersion value '147' of its containing iOS application 'Runner.app'.


我使用 FastLane 构建项目,这是我的发布脚本:
platform :ios do
desc "Push a new beta build to TestFlight"
lane :beta do
build_number = number_of_commits(all: true)

Dir.chdir ".." do
sh("flutter", "packages", "get")
sh("flutter", "clean")
sh("flutter", "pub", "get")
sh("flutter", "build", "ios", "--obfuscate", "--split-debug-info=logs", "--release", "-t", "lib/main_prod.dart", "--build-number=#{build_number}")
end

build_app(workspace: "Runner.xcworkspace", scheme: "Runner", export_method: 'app-store', silent: true)
upload_to_testflight(skip_waiting_for_build_processing: true)
end
end
我的问题是:我应该怎么做才能构建 flutter ,从我的 ServiceExtension 更改 CFBundleVersion?
谢谢 :)

最佳答案

这是我做完 flutter build ios 后所做的.
基本上,我保存了当前版本和构建号,这已经由 flutter 和 pubspec.yaml 增加了,然后使用增量脚本将它强制用于所有目标和 plist。

platform :ios do
desc "Push a new beta build to TestFlight"
lane :beta do
build_number = get_build_number(xcodeproj: "Runner.xcodeproj")
version_number = get_version_number(xcodeproj: "Runner.xcodeproj", target: 'Runner')
increment_build_number(xcodeproj: "Runner.xcodeproj", build_number: build_number)
increment_version_number(xcodeproj: "Runner.xcodeproj", version_number: version_number)
build_app(workspace: "Runner.xcworkspace", scheme: "Runner")
upload_to_testflight
end
end

关于ios - 在 flutter 时从 NotificationServiceExtension 更改 CFBundleVersion #66448,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64030081/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com