GVKun编程网logo

应用程序内语言更改不会反映 xcassets,直到我重新启动 iOS 应用程序 Swift

1

对于想了解应用程序内语言更改不会反映xcassets,直到我重新启动iOS应用程序Swift的读者,本文将是一篇不可错过的文章,并且为您提供关于API滥用:尝试在非拥有协调器上序列化存储访问-使用As

对于想了解应用程序内语言更改不会反映 xcassets,直到我重新启动 iOS 应用程序 Swift的读者,本文将是一篇不可错过的文章,并且为您提供关于API 滥用:尝试在非拥有协调器上序列化存储访问 - 使用 Assets.xcassets、AVAssetWriter - iOS 应用程序 - 使用 Swift 从 4K 图像阵列生成 4K 视频而不会丢失图像大小、DirectAdmin CloudLinux Python 选择器 Django 应用程序 - 应用程序 URL 转到根目录 /home//、Flutter 无法仅在物理 iOs 设备中构建和运行 iOS 应用程序的有价值信息。

本文目录一览:

应用程序内语言更改不会反映 xcassets,直到我重新启动 iOS 应用程序 Swift

应用程序内语言更改不会反映 xcassets,直到我重新启动 iOS 应用程序 Swift

如何解决应用程序内语言更改不会反映 xcassets,直到我重新启动 iOS 应用程序 Swift

我正在开发一个 iOS 项目(使用 swift 语言),它有两种语言:英语和阿拉伯语。在我的应用中,有一个应用内更改语言选项,用户可以在其中选择英语或阿拉伯语。

我正在通过交换捆绑包来更改语言,文本(标签、按钮...等)正在更改并且工作正常,但是在我强制关闭应用程序(从背景,然后图像会根据所选语言发生变化)。

我正在为 How to localize the images in Images.xcassets? 等资产使用本地化选项

终止应用不是一种好的用户体验,如果我以编程方式终止应用,Apple 也会拒绝我的应用。

请告诉我正确的解决方案。 如何在无需重新启动应用程序的情况下反映 xcassets 的应用程序内语言更改?

API 滥用:尝试在非拥有协调器上序列化存储访问 - 使用 Assets.xcassets

API 滥用:尝试在非拥有协调器上序列化存储访问 - 使用 Assets.xcassets

如何解决API 滥用:尝试在非拥有协调器上序列化存储访问 - 使用 Assets.xcassets

您好,如果我将 SwiftUI 实施到我目前基于故事板的应用程序中,我会收到错误消息。我制作了一个 SwiftUI 文件,我还可以在我的应用程序中显示我的 SwiftUI 视图。但是,如果我尝试在 SwiftUI 文件的 XCode 中进行预览,则会出现以下错误:

select td.*
from time_data td
where exists (select 1
              from time_data td2
              where td2.date = td.date and
                    td2.end_time > td.start_time and
                    td2.start_time < td.end_time
              );

问题是我不知道为什么会出现此错误。如果我在模拟器上运行我的应用程序,我不会看到任何这样的错误。这个错误不会发生在模拟器中,嗯?

以上代码发生在日志中的“显示所有消息编译资产目录”步骤中。因为在这一步中发生了错误,我认为它可能与我正在使用的资产(图像和矢量图形)有某种关系。因此,我删除了除“AppIcon”之外的整个资产文件,并尝试再次在 XCode 中运行预览,它确实有效!!。但是我不知道为什么我的资产与“NSObjectManager”或“PersistentContainer”、“CoreData”和其他线程问题有关,如果我搜索同样的错误。例如,其中一篇帖子是这样的:FetchedResultsController Swift 3 API Misuse: Attempt to serialize store access on non-owning coordinator

但我不使用像“持久性容器”这样的复杂东西。我只在我的 userDefaults 中使用一些键,这些键被保存在那里并被检索。我也使用 Firebase。老实说,我对线程和并发不太了解。 那么有人可以解释我为什么会发生这个错误以及为什么我会得到这样的奇怪行为吗?为什么我的简单的图片和矢量资源会导致这样的问题????

我问过我的一位同事,如果她尝试打开新创建的 SwiftUI 视图的预览,她也会得到相同的结果。

解决方法

当我第一次阅读这个问题时,我没有意识到这是一个编译器错误——我以为它是在应用程序运行时发生的。

当编译器出现这样的错误,表示崩溃时,这是编译器中的一个错误。总是。那不应该发生。从您的评论来看,您的 JSON 文件似乎触发了此错误。我不知道这个 JSON 文件是否有什么奇怪的地方,或者是 Xcode 不喜欢在资产目录中包含 JSON。不管怎样,这都是 Xcode 的错误,因为在最坏的情况下,Xcode 应该告诉你不要把 JSON 文件放在那里,而不是这样做。

很高兴听到您找到了解决方法。这不是您可以实际解决的问题,但是如果您的解决方法满足您的需要,那么这就足够了。不过,Apple 可以修复它,因此我建议您访问 https://feedbackassistant.apple.com 并提交有关此问题的错误。

AVAssetWriter - iOS 应用程序 - 使用 Swift 从 4K 图像阵列生成 4K 视频而不会丢失图像大小

AVAssetWriter - iOS 应用程序 - 使用 Swift 从 4K 图像阵列生成 4K 视频而不会丢失图像大小

如何解决AVAssetWriter - iOS 应用程序 - 使用 Swift 从 4K 图像阵列生成 4K 视频而不会丢失图像大小

我正在尝试从 4K 图像的图像阵列创建 4K 视频。每个图像大小约为 5Mb。使用 AVCaptureSession Preset hd4K3840x2160 捕获图像。

根据我的假设,对于包含 4 个图像的图像阵列,估计的 4K 视频输出将大约为 20Mb 或更多。我可以按照以下线程从图像数组创建带有 h264 编解码器的视频 -

https://stackoverflow.com/a/60149845/14999544

但是,输出视频仅转换为 2Mb,而不是预期的 20Mb。

我尝试了使用 proRes(发现它是为 MacOS 设计的)、Hevc 编解码器、更改 AVVideoCompressionPropertiesKey 的值以及更新 kCVPixelBufferPixelFormatTypeKey,但到目前为止没有成功。

问题- AVAssetWriter 需要什么设置才能保留输入图像数组的像素、大小并生成 4K 视频?

非常感谢任何帮助。

DirectAdmin CloudLinux Python 选择器 Django 应用程序 - 应用程序 URL 转到根目录 /home/<user>/<app>

DirectAdmin CloudLinux Python 选择器 Django 应用程序 - 应用程序 URL 转到根目录 /home//

如何解决DirectAdmin CloudLinux Python 选择器 Django 应用程序 - 应用程序 URL 转到根目录 /home/<user>/<app>?

我已经使用 CloudLinux 设置了一个新的 DirectAdmin 服务器。我想使用 Python Selector 选项来构建 Django 网站。

我创建了一个测试网站,但 URL 重定向到根文件夹。

django.[domain].nl/myapp/admin -> django.[domain].nl/home/[user]/myapp/admin

/home/[user]/ 额外添加。完整的 DirectAdmin 路径。

我怀疑这是 DirectAdmin 设置错误还是 Django 设置。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

Flutter 无法仅在物理 iOs 设备中构建和运行 iOS 应用程序

Flutter 无法仅在物理 iOs 设备中构建和运行 iOS 应用程序

如何解决Flutter 无法仅在物理 iOs 设备中构建和运行 iOS 应用程序

我正在尝试构建并运行一个“计数器应用程序”(创建 Flutter 项目时的默认应用程序),我可以在 android 和 iOs 模拟器中运行该项目,在物理设备上可以完美地在 android 中运行,但是当我运行vscode 中的项目出现错误。

我运行项目时的输出是:

  1. Downloading libimobiledevice...
  2. Launching lib/main.dart on iPhone in debug mode...
  3. Automatically signing iOS for device deployment using specified development team in Xcode project: FSB8SU7R5X
  4. Xcode build done. 16.0s
  5. Failed to build iOS app
  6. Error output from Xcode build:
  7. 2021-06-30 22:16:22.665 xcodebuild[43211:324927] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTiOSFrameworks/DVTiOSFrameworks-18108/DTDeviceKitBase/DTDKRemoteDeviceData.m:371
  8. Details: (null) deviceType from 281a05c1d363c04aed318582d30866afde2dd04c was NULL when -platform called.
  9. Object: <DTDKMobileDevicetoken: 0x7faac3b77c10>
  10. Method: -platform
  11. Thread: <NSThread: 0x7faac0c416c0>{number = 2,name = (null)}
  12. Please file a bug at https://Feedbackassistant.apple.com with this warning message and any useful information you can provide.
  13. 2021-06-30 22:16:22.867 xcodebuild[43211:324928] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTiOSFrameworks/DVTiOSFrameworks-18108/DTDeviceKitBase/DTDKRemoteDeviceData.m:371
  14. Details: (null) deviceType from 281a05c1d363c04aed318582d30866afde2dd04c was NULL when -platform called.
  15. Object: <DTDKMobileDevicetoken: 0x7faac3b77c10>
  16. Method: -platform
  17. Thread: <NSThread: 0x7faac3b69fe0>{number = 6,name = (null)}
  18. Please file a bug at https://Feedbackassistant.apple.com with this warning message and any useful information you can provide.
  19. 2021-06-30 22:16:22.991 xcodebuild[43211:324928] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTiOSFrameworks/DVTiOSFrameworks-18108/DTDeviceKitBase/DTDKRemoteDeviceData.m:371
  20. Details: (null) deviceType from 281a05c1d363c04aed318582d30866afde2dd04c was NULL when -platform called.
  21. Object: <DTDKMobileDevicetoken: 0x7faac3b77c10>
  22. Method: -platform
  23. Thread: <NSThread: 0x7faac3b69fe0>{number = 6,name = (null)}
  24. Please file a bug at https://Feedbackassistant.apple.com with this warning message and any useful information you can provide.
  25. ** BUILD Failed **
  26. Xcode''s output:
  27. Command PhaseScriptExecution Failed with a nonzero exit code
  28. note: Using new build system
  29. note: Building targets in parallel
  30. note: Planning build
  31. note: Analyzing workspace
  32. note: Constructing build description
  33. note: Build preparation complete
  34. note: Removed stale file ''/Users/jromero/Library/Developer/Xcode/DerivedData/Runner-flkwoylypfarbpbtarvmoxfypnce/Build/Products/Debug-iphoneos/Runner.app''
  35. Could not build the precompiled application for the device.
  36. Error launching application on iPhone.
  37. Exited (sigterm)

我尝试清理项目(Flutter clean,获取包并再次运行)但没有工作:c。

Flutter 医生输出:

  1. [✓] Flutter (Channel stable,2.2.2,on macOS 11.4 20F71 darwin-x64,locale en)
  2. Flutter version 2.2.2 at /Users/jromero/development/Flutter
  3. Framework revision d79295af24 (3 weeks ago),2021-06-11 08:56:01 -0700
  4. Engine revision 91c9fc8fe0
  5. Dart version 2.13.3
  6. [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
  7. Android SDK at /Users/jromero/Library/Android/sdk
  8. Platform android-30,build-tools 30.0.2
  9. ANDROID_HOME = /Users/jromero/Library/Android/sdk
  10. Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
  11. Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
  12. All Android licenses accepted.
  13. [✓] Xcode - develop for iOS and macOS
  14. Xcode at /Applications/Xcode.app/Contents/Developer
  15. Xcode 12.5.1,Build version 12E507
  16. CocoaPods version 1.10.1
  17. [✓] Chrome - develop for the web
  18. Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
  19. [✓] Android Studio (version 4.1)
  20. Android Studio at /Applications/Android Studio.app/Contents
  21. Flutter plugin can be installed from:
  22. ? https://plugins.jetbrains.com/plugin/9212-Flutter
  23. Dart plugin can be installed from:
  24. ? https://plugins.jetbrains.com/plugin/6351-dart
  25. Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
  26. [✓] IntelliJ IDEA Community Edition (version 2021.1.2)
  27. IntelliJ at /Applications/IntelliJ IDEA CE.app
  28. Flutter plugin version 57.0.5
  29. Dart plugin version 211.7665
  30. [✓] VS Code (version 1.57.1)
  31. VS Code at /Applications/Visual Studio Code.app/Contents
  32. Flutter extension version 3.23.0
  33. [✓] Connected device (1 available)
  34. Chrome (web) chrome web-javascript Google Chrome 91.0.4472.114
  35. No issues found!

欢迎任何帮助 c:

关于应用程序内语言更改不会反映 xcassets,直到我重新启动 iOS 应用程序 Swift的介绍现已完结,谢谢您的耐心阅读,如果想了解更多关于API 滥用:尝试在非拥有协调器上序列化存储访问 - 使用 Assets.xcassets、AVAssetWriter - iOS 应用程序 - 使用 Swift 从 4K 图像阵列生成 4K 视频而不会丢失图像大小、DirectAdmin CloudLinux Python 选择器 Django 应用程序 - 应用程序 URL 转到根目录 /home//、Flutter 无法仅在物理 iOs 设备中构建和运行 iOS 应用程序的相关知识,请在本站寻找。

本文标签: