标签: xcode13

iOS 15 导航栏透明

我的 iOS 应用程序使用故事板作为 UI,并使用自定义色调作为导航栏的背景颜色。

我已经在 Xcode 13 beta 5 上测试了我的应用程序,导航栏为“白色”,并且导航栏上的文本不可见。

在https://developer.apple.com/forums/thread/682420的苹果开发者论坛中,它指出“在 iOS 15 中,UIKit 已将scrollEdgeAppearance(默认情况下会生成透明背景)的使用扩展到所有导航栏”。要恢复旧的外观,您必须采用新的 UINavigationBar 外观 API

我将以下代码(来自上面的链接)添加到应用程序委托“application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions”:

        if #available(iOS 13, *) {
            let navigationController = UINavigationController(navigationBarClass: nil, toolbarClass: nil)
            let navigationBar = navigationController.navigationBar
            let appearance = UINavigationBarAppearance()
            appearance.configureWithOpaqueBackground()
            appearance.backgroundColor = UIColor(red: 0.0/255.0, green: 125/255.0, blue: 0.0/255.0, alpha: 1.0)
            navigationBar.standardAppearance = appearance;
            navigationBar.scrollEdgeAppearance = navigationBar.standardAppearance
            navigationBar.isTranslucent = false
        }
Run Code Online (Sandbox Code Playgroud)

这并不能解决问题。我仍然在故事板编辑器中为导航栏设置了自定义色调。我是否需要删除自定义色调,或者我是否错误地实现了外观 API?

uinavigationcontroller swift ios15 xcode13

166
推荐指数
8
解决办法
8万
查看次数

Xcode 13.3 beta 3:“swift package init”显示警告:“~/Library/org.swift.swiftpm/collections.json 已被弃用”,但不知道如何使用新的

刚刚升级到 Xcode 13.3 beta 3(从 Xcode 13.2.1)并运行swift package init. 它生成了一个弃用警告,我以前没有见过这个:

\n
warning: Usage of /Users/sajjon/Library/org.swift.swiftpm/collections.json has been deprecated. Please delete it and use the new /Users/sajjon/Library/org.swift.swiftpm/configuration/collections.json instead.\n
Run Code Online (Sandbox Code Playgroud)\n

但我不知道如何“使用新的......代替”?事实上我什至不知道它是如何或何时org.swift.swiftpm/collections.json创建的。

\n

该怎么办?

\n

完整打印:

\n
~/Developer/DeleteMe \xe2\x8c\x9a 13:57:37\n$ swift package init\n2022-02-25 13:57:42.211 xcodebuild[54679:13318505] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore\n2022-02-25 13:57:42.212 xcodebuild[54679:13318505] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of …
Run Code Online (Sandbox Code Playgroud)

xcode swift swift-package-manager matlab-spm xcode13

82
推荐指数
3
解决办法
1万
查看次数

Flutter 错误:xcodebuild:警告:使用多个匹配目标中的第一个

Flutter 版本是 2.2.3,我无法在 iOS 模拟器上运行 de flutter 代码。

\n
Launching lib/main.dart on iPhone 13 Pro in debug mode...\nlib/main.dart:1\nXcode build done.                                           43.6s\nFailed to build iOS app\nError output from Xcode build:\n\xe2\x86\xb3\n    --- xcodebuild: WARNING: Using the first of multiple matching destinations:\n    { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }\n    { platform:iOS Simulator, id:320795B7-1385-4044-B442-87A9808936D9, OS:15.0, name:iPhone 13 Pro }\n    { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }\n    { platform:iOS, id:00008101-000825EC3AE1001E, name:leobidoous iPhone, error:Device is busy (Making leobidoous iPhone ready for development, Processing cache …
Run Code Online (Sandbox Code Playgroud)

flutter ios15 xcode13

60
推荐指数
3
解决办法
7万
查看次数

备注:增量编译已被禁用:不兼容整个模块优化

更新到 Xcode 13 beta,现在由于几个 pod 出现错误,我无法构建项目

较旧的 Xcode 在 iOS 15 上启动应用程序的时间太长

我用的是M1,可能是架构的原因

apple-m1 xcode13

56
推荐指数
6
解决办法
5万
查看次数

命令 CompileSwiftSources 失败,退出代码非零 XCode 13

我正在尝试在 Xcode13 上运行一个项目,在运行 pod cache clean --all、删除派生数据并运行 pod 更新后。当我清理项目并构建它时,出现以下错误:

CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'Alamofire' from project 'Pods')
    cd /Users/aimoresa/MyProject-iOS/Pods
    export DEVELOPER_DIR\=/Applications/Xcode.app/Contents/Developer
    export SDKROOT\=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.0.sdk
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -incremental -module-name Alamofire -Onone -enable-batch-mode -enforce-exclusivity\=checked @/Users/aimoresa/Library/Developer/Xcode/DerivedData/LinkProject-bwzldrnlucfenpavteypbjybxdky/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/Alamofire.SwiftFileList -DDEBUG -D COCOAPODS -suppress-warnings -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.0.sdk -target x86_64-apple-ios10.0-simulator -g -module-cache-path /Users/aimoresa/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -Xfrontend -serialize-debugging-options -enable-testing -index-store-path /Users/aimoresa/Library/Developer/Xcode/DerivedData/LinkProject-bwzldrnlucfenpavteypbjybxdky/Index/DataStore -swift-version 5 -I /Users/aimoresa/Library/Developer/Xcode/DerivedData/LinkProject-bwzldrnlucfenpavteypbjybxdky/Build/Products/Debug-iphonesimulator/Alamofire -F /Users/aimoresa/Library/Developer/Xcode/DerivedData/LinkProject-bwzldrnlucfenpavteypbjybxdky/Build/Products/Debug-iphonesimulator/Alamofire -c -j4 -output-file-map /Users/aimoresa/Library/Developer/Xcode/DerivedData/LinkProject-bwzldrnlucfenpavteypbjybxdky/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/Alamofire-OutputFileMap.json -parseable-output -serialize-diagnostics -emit-dependencies -emit-module -emit-module-path /Users/aimoresa/Library/Developer/Xcode/DerivedData/LinkProject-bwzldrnlucfenpavteypbjybxdky/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/Alamofire.swiftmodule -Xcc -I/Users/aimoresa/Library/Developer/Xcode/DerivedData/LinkProject-bwzldrnlucfenpavteypbjybxdky/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/aimoresa/Library/Developer/Xcode/DerivedData/LinkProject-bwzldrnlucfenpavteypbjybxdky/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/Alamofire-generated-files.hmap -Xcc -I/Users/aimoresa/Library/Developer/Xcode/DerivedData/LinkProject-bwzldrnlucfenpavteypbjybxdky/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/Alamofire-own-target-headers.hmap -Xcc -I/Users/aimoresa/Library/Developer/Xcode/DerivedData/LinkProject-bwzldrnlucfenpavteypbjybxdky/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/Alamofire-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/aimoresa/Library/Developer/Xcode/DerivedData/LinkProject-bwzldrnlucfenpavteypbjybxdky/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/all-product-headers.yaml -Xcc …
Run Code Online (Sandbox Code Playgroud)

xcode ios swift ios15 xcode13

52
推荐指数
3
解决办法
7万
查看次数

多个命令在 Xcode 13 中产生错误

我已经被这个错误困扰了一段时间了,所以任何帮助将不胜感激。当我尝试构建我的应用程序时,我不断收到以下构建错误:

\n

多个命令生成“/Users/my_user_name/Library/Developer/Xcode/DerivedData/Expense_Tracker_Final-aujeprcwgnjmizeaueitvhpegrzf/Build/Products/Debug-iphonesimulator/Expense Tracker Final.app”:

\n
    \n
  1. 目标“Expense Tracker Final”已创建目录命令,输出为“/Users/my_user_name/Library/Developer/Xcode/DerivedData/Expense_Tracker_Final-aujeprcwgnjmizeaueitvhpegrzf/Build/Products/Debug-iphonesimulator/Expense Tracker Final.app”
  2. \n
  3. 该命令取决于目标“Expense Tracker Final”中的命令:脚本阶段 \xe2\x80\x9c[CP] Copy Pods Resources\xe2\x80\x9d
  4. \n
\n

我已经尝试过针对其他堆栈溢出问题推荐的解决方案,例如从 [CP] Copy Pods 资源中删除某些文件,但似乎没有任何效果。有人可以帮助我吗,我真的迷路了。

\n

xcode ios swift xcode13

47
推荐指数
2
解决办法
7万
查看次数

Xcode 13 错误:输入文件 [...] 在构建期间被修改

Xcode 13 让我很难构建我的项目,该项目由具有生成代码的构建阶段的目标组成。

例如,一个构建阶段Secrets+Generated.swift只需使用将某些代码回显到该文件中的 shell 脚本即可生成该文件。

在此输入图像描述

构建阶段将该文件定义为输出文件。没有输入文件,没有输入文件列表,也没有输出文件列表,因为只创建/修改了一个文件。

构建项目时几乎总是会失败:

error: input file '[ProjectPath]/Secrets+Generated.swift' was modified during the build
error: input file '[ProjectPath]/Secrets+Generated.swift' was modified during the build
Command CompileSwiftSources failed with a nonzero exit code
Run Code Online (Sandbox Code Playgroud)

有人遇到过这个问题或者知道该怎么办吗?我尝试切换“基于依赖性分析”复选框,但这没有帮助。我在使用 Xcode 12 时没有遇到这个问题。有趣的是,尽管只有一个构建阶段生成该特定文件,但还是出现了重复的错误消息。

顺便提一句。当使用swiftgenSourceryCuckoo等代码生成工具时,我遇到了同样的问题。

编辑:这是我的构建阶段: 在此输入图像描述 三个标记的构建阶段都会生成一个这样的文件。他们都偶尔会失败。我不知道这是否有什么不同,但这些只是为一个目标(通知服务扩展)定义的,它是我的主应用程序目标的依赖项,因此当我构建应用程序时它只会触发一次。

xcode swift xcode13

41
推荐指数
1
解决办法
8955
查看次数

Xcode 并排代码比较选项在哪里?

从 Xcode 13 开始,代码比较默认不再是并排差异。

一定还有办法做到这一点。

我正在努力寻找选择!

diff xcode xcode13

35
推荐指数
2
解决办法
6194
查看次数

Cocoapods 出现问题,安装 pod 时显示错误“无法确定 URL 的存储库类型”

我使用了Cocoapods很多,但最近每当我更新 pod ( pod update) 时,它就会开始复制文件,并且经常不允许我为 App Store 创建构建。

我将 Cocoapods 更新到了最新版本,但仍然没有解决这个问题。然后我尝试删除并重新安装它。

现在又出现了另一个问题。当我尝试pod install在任何项目上运行时,pod 不会像以前那样安装,而是显示以下错误:

myUser$ pod install
Analyzing dependencies
[!] Couldn't determine repo type for URL: `https://github.com/CocoaPods/Specs.git`: Permission bits for '/Users/myUser/.netrc' should be 0600, but are 644
Run Code Online (Sandbox Code Playgroud)

以前,这种情况从未发生过,但现在,即使在 Cocoapods 发挥作用的项目上,这种情况也发生了。可能是什么问题呢?

先感谢您。

ios cocoapods xcode13

31
推荐指数
1
解决办法
2万
查看次数

如何在 Xcode 13 中使用图像文字

Xcode 13 中缺少最常用的功能

图像文字

#imageLiteral()

这些命令似乎不起作用。颜色文字也发生了类似的变化。

xcode swift xcode13

28
推荐指数
4
解决办法
4万
查看次数