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

推荐订阅源

MyScale Blog
MyScale Blog
U
Unit 42
The Register - Security
The Register - Security
S
Security Affairs
博客园 - 【当耐特】
Latest news
Latest news
爱范儿
爱范儿
T
The Exploit Database - CXSecurity.com
F
Full Disclosure
C
Cisco Blogs
宝玉的分享
宝玉的分享
C
Cyber Attacks, Cyber Crime and Cyber Security
L
LangChain Blog
P
Privacy & Cybersecurity Law Blog
腾讯CDC
C
CXSECURITY Database RSS Feed - CXSecurity.com
V
Vulnerabilities – Threatpost
Jina AI
Jina AI
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 叶小钗
www.infosecurity-magazine.com
www.infosecurity-magazine.com
博客园_首页
博客园 - 三生石上(FineUI控件)
D
DataBreaches.Net
WordPress大学
WordPress大学
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Microsoft Security Blog
Microsoft Security Blog
N
News and Events Feed by Topic
Recorded Future
Recorded Future
Scott Helme
Scott Helme
Hacker News: Ask HN
Hacker News: Ask HN
Webroot Blog
Webroot Blog
AWS News Blog
AWS News Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
人人都是产品经理
人人都是产品经理
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
Tor Project blog
F
Fortinet All Blogs
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
H
Hacker News: Front Page
J
Java Code Geeks
A
About on SuperTechFans
The GitHub Blog
The GitHub Blog
博客园 - 聂微东
Last Week in AI
Last Week in AI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
W
WeLiveSecurity
V2EX - 技术
V2EX - 技术
T
Troy Hunt's Blog
Attack and Defense Labs
Attack and Defense Labs

博客园 - 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删除掉。
程序可以正常构建成功了!