惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Hacker News: Ask HN
Hacker News: Ask HN
WordPress大学
WordPress大学
T
The Blog of Author Tim Ferriss
The GitHub Blog
The GitHub Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 聂微东
A
About on SuperTechFans
Stack Overflow Blog
Stack Overflow Blog
雷峰网
雷峰网
Microsoft Azure Blog
Microsoft Azure Blog
腾讯CDC
爱范儿
爱范儿
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 【当耐特】
V
Visual Studio Blog
有赞技术团队
有赞技术团队
U
Unit 42
D
Docker
小众软件
小众软件
F
Full Disclosure
I
Intezer
Scott Helme
Scott Helme
P
Privacy International News Feed
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
Google DeepMind News
Google DeepMind News
B
Blog
Martin Fowler
Martin Fowler
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Vercel News
Vercel News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Spread Privacy
Spread Privacy
宝玉的分享
宝玉的分享
S
Security Affairs
www.infosecurity-magazine.com
www.infosecurity-magazine.com
月光博客
月光博客
C
Cisco Blogs
云风的 BLOG
云风的 BLOG
Schneier on Security
Schneier on Security
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Threat Research - Cisco Blogs
量子位
Hacker News - Newest:
Hacker News - Newest: "LLM"
H
Heimdal Security Blog
N
Netflix TechBlog - Medium
H
Hacker News: Front Page
P
Proofpoint News Feed
G
GRAHAM CLULEY
V
Vulnerabilities – Threatpost
S
Schneier on Security

博客园 - wjwdive

如何使用git submodule拆分大的git项目 MAC多github账号配置步骤 记录一次flutter boost5.0.2示例调试的过程 【算法】可获得的最大点数问题 使用1panel一键建站 关于混合加密(AES+RSA) C++设计模式汇总 设计模式C++005__桥模式 设计模式C++007__抽象工厂方法模式 设计模式C++004__装饰器模式 设计模式C++003__观察者模式 设计模式C++002__策略模式 设计模式C++001__模板方法 AI图片生成网站 suno AI编曲创作利器 iOS组件化开发之私有库 iOS、Android获取apk公钥MD5信息 阿里图标库批量下载iOS适配的图标 C语言实现回调函数标准方式 swift 自定义tabbar为基本结构的项目 swift 可选类型
使用bundler自动化构建Xcode项目时遇到的问题。
wjwdive · 2024-04-05 · via 博客园 - wjwdive

报错信息:
Multiple commands produce '/Users/wjw/Library/Developer/Xcode/DerivedData/Moments-dgddojujkmrazagmddjvfywoqzwo/Build/Products/Debug-iphonesimulator/Moments.app/Info.plist':

  1. Target 'Moments' (project 'Moments') has copy command from '/Users/wjw/Documents/Projects24/swift/Moments/Moments/Info.plist' to '/Users/wjw/Library/Developer/Xcode/DerivedData/Moments-dgddojujkmrazagmddjvfywoqzwo/Build/Products/Debug-iphonesimulator/Moments.app/Info.plist'
  2. Target 'Moments' (project 'Moments') has process command with output '/Users/wjw/Library/Developer/Xcode/DerivedData/Moments-dgddojujkmrazagmddjvfywoqzwo/Build/Products/Debug-iphonesimulator/Moments.app/Info.plist'

警告信息:
duplicate output file '/Users/wjw/Library/Developer/Xcode/DerivedData/Moments-dgddojujkmrazagmddjvfywoqzwo/Build/Products/Debug-iphonesimulator/Moments.app/Info.plist' on task: ProcessInfoPlistFile /Users/wjw/Library/Developer/Xcode/DerivedData/Moments-dgddojujkmrazagmddjvfywoqzwo/Build/Products/Debug-iphonesimulator/Moments.app/Info.plist /Users/wjw/Documents/Projects24/swift/Moments/Moments/Moments/Info.plist

在构建我们的Target时,命令从项目源代码里的Info.plist 被copy到了Xcode/DerivedData/.../Monments.app/Info.plist 这一步骤被执行了两次。

苹果开发者论坛里有前辈遇到过这些问题
https://forums.developer.apple.com/forums/thread/129896

使用bundler 自动化构建脚本的时候,bundler会自动拷贝一份 info.plist 到 project.bundlePhase files。
大佬给出的方案是在buildPhase 构建脚本中加入以下语句。

#!/bin/bash
bN=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE")
bN=$((bN += 1))
bN=$(printf "%d" $bN)
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $bN" "$INFOPLIST_FILE"

以上方法对我来说并没有作用
我又找到stackoverflow上面相关资料,

需要把 Target -> build phases中 -> copy Bundle Resources 中的Info.plist删除掉。
程序可以正常构建成功了!