- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个使用 receive_sharing_intent 的 Flutter 应用程序包,根据插件的要求,我创建了一个共享扩展。
我的应用程序和扩展可以正常构建和运行,但是当我存档和分发我的应用程序 (App Store Connect) 时,在上传结束时出现以下错误消息:
ERROR ITMS-90057: "The bundle 'Payload/Runner.app/PlugIns/ShareExtension.appex' is missing plist key. The Info.plist is missing the required key: CFBundleShortVersionString."
ERROR ITMS-90056: "This bundle 'Payload/Runner.app/PlugIns/ShareExtension.appex' is invalid. The Info.plist is missing the required key: CFBundleVersion."
ERROR ITMS-90360: "Missing Info.plist value. A value for the key 'CFBundleVersion' in bundle Payload/Runner.app/PlugIns/ShareExtension.appex is required."
ERROR ITMS-90360: "Missing Info.plist value. A value for the key 'CFBundleShortVersionString' in bundle Payload/Runner.app/PlugIns/ShareExtension.appex is required."
但是在我的 ios/ShareExtension/Info.plist
文件中我有:
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
我也尝试过:
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
这消除了 CFBundleVersion
的错误,但 CFBundleShortVersionString
仍然无效。
通过在扩展 plist 中明确设置我的应用程序版本和内部版本号,上传成功。
但是有没有办法在扩展 plist 中使用 FLUTTER_BUILD_NAME
和 FLUTTER_BUILD_NUMBER
变量?
注意:
我正在使用 Xcode 11.6
最佳答案
根据@Aidan David 的要求分享我的 C 程序,但是:
ZSH 脚本:
./plist_replace_value ./NotificationService/Info.plist CFBundleVersion `grep ^version: ../pubspec.yaml | awk -F'[\+ ]' '{print $3}'`
./plist_replace_value ./NotificationService/Info.plist CFBundleShortVersionString `grep ^version: ../pubspec.yaml | awk -F'[\+ ]' '{print $2}'`
./plist_replace_value ./Share\Extension/Info.plist CFBundleVersion `grep ^version: ../pubspec.yaml | awk -F'[\+ ]' '{print $3}'`
./plist_replace_value ./Share\Extension/Info.plist CFBundleShortVersionString `grep ^version: ../pubspec.yaml | awk -F'[\+ ]' '{print $2}'`
C 程序,plist_replace_value.c:
#include
#include
#define MAX_LINE 256
void print_usage(char *程序名)
{
printf("\nUsage:\n%s
\n", programName);
}
int main(int argc, char *argv[])
{
文件 *plist_file, *output_file;
int 替换 = 0;
字符线[MAX_LINE];
printf("Plist 键值解析器。支持替换值。\n");
fflush(标准输出);
如果(argc < 4)
{
fprintf(stderr, "参数个数不足。");
print_usage(argv[0]);
返回 1;
}
plist_file = fopen(argv[1], "r+");
如果(plist_file == NULL)
{
fprintf(stderr, "无法打开 %s, 中止...\n", argv[1]);
返回 1;
}
output_file = fopen("temp.plist", "w");
如果(输出文件 == NULL)
{
fprintf(stderr, "无法创建临时文件,中止...\n");
返回 1;
}
fgets(线,MAX_LINE,plist_file);
while (!feof(plist_file) && !replaced)
{
fprintf(输出文件,“%s”,行);
如果 (strstr(line, argv[2]) != NULL)
{
fprintf(output_file, "\t
%s
\n", argv[3]);
//跳过下一个输出行
fgets(线,MAX_LINE,plist_file);
}
fgets(线,MAX_LINE,plist_file);
}
fclose(输出文件);
fclose(plist_file);
移除(argv[1]);
重命名(“temp.plist”,argv [1]);
返回 0;
}
关于ios - 使用 ShareExtension 分发 Flutter 应用程序时缺少 CFBundleShortVersionString,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63614181/
我正在开发 ShareExtension 应用程序。 我想将数据从容器应用程序共享到 ShareExtension 应用程序。 以下是我在容器应用程序 View Controller 中使用的代码:
我正在尝试通过我的应用程序的 ShareExtension 访问用户当前所在页面的 url 和标题。 设置完所有内容后,我似乎无法让 completionHandler 中的代码运行。
我有一个使用 receive_sharing_intent 的 Flutter 应用程序包,根据插件的要求,我创建了一个共享扩展。 我的应用程序和扩展可以正常构建和运行,但是当我存档和分发我的应用程序
我正在使用 UIActivityViewController,在通过 Whatsapp 发送图像后,我在控制台中收到此消息 - plugin net.whatsapp.WhatsApp.ShareEx
我无法让 AdMob 或 iAd 横幅广告在 iOS ActionExtension 或 ShareExtension 中运行 - 有没有人成功地运行了其中任何一个,如果成功了,怎么做的? AdMob
我正在创建一个共享扩展程序,但在我对 iOS 13.0 及更高版本进行测试时遇到了一个奇怪的行为。我使用 UISwipeGestureRecognizer 来解释用户在我的扩展程序的主视图上的滑动手势
我是一名优秀的程序员,十分优秀!