标签: xcode10

Xcode 10 代码完成占位符——“T”是什么?

在 Xcode 10 代码完成中,占位符标记下方的文本#T#前面有一个额外的内容(要查看是否如此,请将插入的代码模板复制并粘贴到不同的文本编辑器中):

let alert = UIAlertController(
    title: <#T##String?#>, message: <#T##String?#>, 
    preferredStyle: <#T##UIAlertController.Style#>)
Run Code Online (Sandbox Code Playgroud)

那是什么?“T”是指类型吗?它对我对占位符的使用有何不同?

code-completion ios swift xcode10

6
推荐指数
1
解决办法
817
查看次数

Xcode 10 beta2:无法为没有参数的类型'UIView'调用初始值设定项

我已下载Xcode 10 beta2并重建我的项目,代码如下:

let someView = UIView()
Run Code Online (Sandbox Code Playgroud)

出现以下错误:

Cannot invoke initializer for type 'UIView' with no arguments

错误Snapshort

很奇怪.使用Xcode 10 beta2时是否有人遇到过这些构建错误?

xcode ios swift xcode10

6
推荐指数
1
解决办法
1071
查看次数

如何将带有 MTL 文件的 OBJ 转换为 USDZ 格式

所以我有一个 OBJ 3D 模型及其关联的 MTL 文件。MTL 文件包含所有纹理。但是,当我将文件转换为 USDZ 格式时,纹理不属于该文件。这是我使用的代码。

xcrun usdz_converter /Users/SaiKambampati/Downloads/Models/object.obj /Users/SaiKambampati/Downloads/Models/object.usdz
Run Code Online (Sandbox Code Playgroud)

已创建 USDZ 文件,但未应用属性和纹理。将 OBJ 模型转换为 USDZ 模型时,有没有办法包含 MTL 文件?

augmented-reality scenekit arkit xcode10 usdz

6
推荐指数
1
解决办法
9063
查看次数

Xcode 10多个命令为Pods依赖构建错误

Multiple commands produce '/Users/abc/Library/Developer/Xcode/DerivedData/MyProject-cworwzaxajsmfkcfvourofovbggd/Build/Products/QA-iphonesimulator/MyProject.app':

1) Target 'MyProject' has create directory command with output '/Users/abc/Library/Developer/Xcode/DerivedData/MyProject-cworwzaxajsmfkcfvourofovbggd/Build/Products/QA-iphonesimulator/MyProject.app'

2) That command depends on command in Target 'MyProject': script phase “[CP] Copy Pods Resources”
Run Code Online (Sandbox Code Playgroud)

似乎脚本Copy pods resources与正常的构建命令冲突.我已经尝试了所有可用的解决方案

  1. 从中删除冗余文件copy bundle resources.
  2. 更新cocoapods.
  3. product module名称更改Build settings为唯一名称.
  4. 从中删除了info.Plist Copy Bundle Resources

临时修复:Xcode>文件>工作区设置>构建系统>选择"旧版构建系统"

附上我的Copy Pods Resources截图 在此输入图像描述

xcode objective-c ios xcode10

6
推荐指数
1
解决办法
2956
查看次数

AXAccessQueue类在......和......中实现......将使用其中一个

Xcode10运行一个空白项目.我选择Simulator iPhoneXR.控制台打印如下

Class AXAccessQueue is implemented in both...and...One of the two will be used.
Class AXAccessQueueTimer is implemented in both...and...One of the two will be used.
[AXMediaCommon] Unable to look up screen scale
[AXMediaCommon] Unexpected physical screen
Run Code Online (Sandbox Code Playgroud)

我换了模拟器iPhone6.控制台打印

libMobileGestalt  MobileGestalt.c:890: MGIsDeviceOneOfType is not supported on this platform.
Run Code Online (Sandbox Code Playgroud)

如何产生这种现象?以及如何解决问题?

我将很感激你的回答.

ios xcode10

6
推荐指数
0
解决办法
422
查看次数

在Xcode 10中获取错误编译框架SDK

尝试在Xcode 10中编译框架SDK时出现以下错误。

unable to load standard library for target 'armv7s-apple-ios8.0-simulator'
unable to load standard library for target 'armv7-apple-ios8.0-simulator'
unable to load standard library for target 'arm64-apple-ios8.0-simulator'
Run Code Online (Sandbox Code Playgroud)

我能够用Xcode 9编译框架,没有任何问题,当我使用Xcode 10时,仅收到此错误。

我尝试了这篇文章中的所有内容,但一切正常。

谁能帮我?

mobile xcode llvm ios xcode10

6
推荐指数
0
解决办法
425
查看次数

Xcode10:操作无法完成。(DVTCoreSimulatorAdditionsErrorDomain错误0。)

我试过了:

  • 重新启动模拟器和Xcode
  • 删除Xcode并重新安装
  • 运行xcrun simctl清除所有此命令

我已经尝试但无法解决此问题

在此处输入图片说明

xcode ios swift4.1 xcode10

6
推荐指数
1
解决办法
1560
查看次数

更新到Xcode 10后,XCUITest的测试目标似乎无法正常工作

我从Xcode 9.4更新到xcode 10,然后在尝试运行我的UI测试时似乎没有任何工作.虽然构建在测试之前成功完成,但测试应用程序加载了一段时间然后测试失败.并且源代码也成功构建,我可以在模拟器上运行应用程序.

错误是:

Early unexpected exit, operation never finished bootstrapping - no restart will be attempted. (Underlying error: The test runner failed to load the test bundle. Executable cannot be loaded for some other reason, such as a problem with a library it depends on or a code signature/entitlements mismatch.))

xcuitest xcode10

6
推荐指数
1
解决办法
1127
查看次数

Xcode 10中的权限被拒绝错误阻止了Build ... Command PhaseScriptExecution失败,退出代码非零

由于出现错误,我无法构建/存档我的项目:

权限被拒绝,
命令PhaseScriptExecution失败,退出代码非零

我已尝试按照其他答案的建议纠正钥匙串登录,但是没有用。请有人帮忙吗?最有可能是菜鸟错误,但是这意味着我什至无法模拟我的应用程序。

有关该错误的更多详细信息:

PhaseScriptExecution Copy\ Pods\ Resources 

/Users/james/Library/Developer/Xcode/DerivedData/trials-fseuxkwjlleukxdxyfgdrujhdwuy/Build/Intermediates.noindex/trials.build/Debug-iphonesimulator/trials.build/Script-8DEE2FC97BFA0D6E636019C4.sh (in target: trials)
    cd /Users/james/pCloud\ Drive/3.\ NeuroRecovery\ Ltd/4.\ Products/3.\ NIHR\ Trial\ NHS/v1.0\ -\ Initial\ App/1.\ App\ Delivery/3.\ Source\ Code/1.\ iOS/trials
    /bin/sh -c /Users/james/Library/Developer/Xcode/DerivedData/trials-fseuxkwjlleukxdxyfgdrujhdwuy/Build/Intermediates.noindex/trials.build/Debug-iphonesimulator/trials.build/Script-8DEE2FC97BFA0D6E636019C4.sh

/Users/james/Library/Developer/Xcode/DerivedData/trials-fseuxkwjlleukxdxyfgdrujhdwuy/Build/Intermediates.noindex/trials.build/Debug-iphonesimulator/trials.build/Script-8DEE2FC97BFA0D6E636019C4.sh: line 2: /Users/james/pCloud Drive/3. NeuroRecovery Ltd/4. Products/3. NIHR Trial NHS/v1.0 - Initial App/1. App Delivery/3. Source Code/1. iOS/trials/Pods/Target Support Files/Pods-trials/Pods-trials-resources.sh: Permission denied
Command PhaseScriptExecution failed with a nonzero exit code
Run Code Online (Sandbox Code Playgroud)

编辑12月17日:谢谢@ geno-chen和@fantini我已经检查过并可以报告以下内容:

  1. 您是否使用sudo安装了Cocoapods:是的。

  2. 我使用ls -lh检查了文件的权限,并具有以下内容:-rw-r--r-- 1 james staff 159B 2015年3月25日Podfile -rw-r--r-- 1 james staff 1.2K 2015年3月25日Podfile.lock …

xcode xcode10

6
推荐指数
3
解决办法
3931
查看次数

自动签名无法解决“项目”目标的权利问题

我已经检查了堆栈溢出中关于同一问题已解决的所有可能问题。我知道已经提出了与我完全相同的数百万个问题,但是我尝试了这些问题的答案中的所有建议,但Xcode仍然给我带来了问题。因此,与往常一样,第一个错误是:

自动签名无法解决“项目”目标的权利问题。

第二个错误当然是:

Provisioning profile "iOS Team Provisioning Profile: com.badubadu.WeatherApp" doesn't include the application-identifier and keychain-access-groups entitlements.

What I've tried:

  • Switching the provisioning profile from Manual to Automatic and viceversa
  • Cleaning up the Provisioning Profiles inside the Library/MobileDevices and then restarting Xcode
  • Deleting the old app from the iDevice and trying to build it again
  • Turning on and off the Background Modes (I don't have push notifications and In-app purchases)
  • Restarting the computer and the phone (just in case it …

xcode provisioning-profile xcode10

6
推荐指数
1
解决办法
2603
查看次数