标签: xcode8

'DispatchQueue'类型的值没有成员'异步' - Swift 3

我刚刚将我的xcode8更新为Swift 3并收到此错误:

Value of type 'DispatchQueue' has no member 'asynchronously'
Run Code Online (Sandbox Code Playgroud)

在这条线上:

   DispatchQueue.main.asynchronously(execute:
Run Code Online (Sandbox Code Playgroud)

这是整个代码段:

  DispatchQueue.main.asynchronously(execute: {

                        //Display alert message with confirmation
                        let myAlert = UIAlertController(title: "Alert", message:messageToDisplay, preferredStyle: UIAlertControllerStyle.Alert);




                        let okAction = UIAlertAction(title:"OK", style:UIAlertActionStyle.Default){

                            action in self.dismissViewControllerAnimated(true, completion:nil);

                        }

                        myAlert.addAction(okAction)
                        self.presentViewController(myAlert, animated:true, completion:nil);
                    });
                }
            }
            catch let error as NSError {
                print(error.localizedDescription)
            }

        }

        task.resume()

}
}
Run Code Online (Sandbox Code Playgroud)

最近更新到Swift 3给了我很多错误,它们会自动修复,但是这个不会自行解决,我不知道该怎么办.

swift swift3 xcode8

7
推荐指数
1
解决办法
3659
查看次数

在XCode 8中,如何使用正则表达式搜索替换来更改字符的大小写?

我继承了一个Objective C项目,其中包含一些名为"getMerchantSettings"的方法.当然,在Objective C(与Java不同)中,在getter的方法名称中使用"get"这个词并不常见,因为它使它们与自动合成的属性getter等不兼容.

我可以全局搜索我的项目,使用正则表达式模式找到所有这些有问题的方法名称get([A-Z]).在SublimeText中我可以替换所有这些,\L$1它会改变像"getMerchantSettings"这样的所有内容,只是说"merchantSettings";\L替换它时,将"M"字符变为小写"m".

但是在XCode版本的正则表达式中,\ L和\ l都不起作用.什么是在XCode 8中使用的正则表达式替换模式,以使其更改任何替换它的情况?不希望不必为这样的事情使用单独的文本编辑器.谢谢!

regex xcode xcode8

7
推荐指数
1
解决办法
970
查看次数

iOS今天的扩展导致程序以退出代码结束:0

我正在使用Xcode 8.0,Swift 3.

我今天正在制作显示文字和图片的扩展程序,但经常导致此消息,今天扩展程序不起作用.很少工作.

程序以退出代码结束:0

我在领域保存数据,今天使用数据扩展(字符串,图像)

它是否会导致内存限制?所以,我怎么能贬低关于今天扩展的记忆?

我的扩展代码:

class Information: Object {

    dynamic var Name = ""
    dynamic var Image : NSData?

    override class func primaryKey() -> String {
        return "Name"
    }
}

class TodayViewController: UIViewController, NCWidgetProviding {

    var realm : Realm?
    var results : Results<Information>?
    var index = 0

    @IBOutlet var NameLabel: UILabel!
    @IBOutlet var ImageView: UIImageView!

    @IBAction func leftAction(_ sender: UIButton) {
        guard index == 0 else {
            index -= 1
            loadData(index: index)
            return
        }
    }

    @IBAction func …
Run Code Online (Sandbox Code Playgroud)

ios today-extension swift3 xcode8 ios10-today-widget

7
推荐指数
1
解决办法
1652
查看次数

如何删除 Xcode 8.1 管理的包标识符?

我想将我的 Xcode 项目移动到不同的团队/开发人员帐户并使用相同的应用程序/捆绑包 ID。我尝试在新帐户的 Apple 开发人员中心中创建应用程序 ID,但收到一条错误消息,指出应用程序 ID 不可用,这是意料之中的。

我的 Xcode 项目已Automatically manage signing勾选。我在项目当前关联的帐户的开发人员中心内的应用程序 ID 列表中看不到项目的捆绑包标识符。Xcode 管理的应用程序 ID 存储在哪里?如何删除?

在引入自动管理签名之前,我确实已经成功做到了这一点,只需从原始 iOS 开发者帐户中删除 App ID 并在新帐户上手动重新注册即可。

编辑:需要明确的是 - 该应用程序尚未提交到应用程序商店,它仍处于开发阶段。

xcode code-signing app-id xcode8

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

带有xcode 8的mac的OpenGL Profiler

我以前一直在使用OpenGL profiler for mac来调试我的图形工作,它就像xcode 7.2的魅力一样.

然后,当它出现时,我将xcode升级到版本8,并且分析器已经消失了.我重新加载它,但是因为我无法记录任何跟踪或在任何断点处停止,因此也无法再检查任何资源.

在为xcode 7.2开发之后,目前还没有分析器.有没有办法使用最后一个OpenGL探测器与xcode 8.x?

提前致谢.

opengl profiler xcode8

7
推荐指数
1
解决办法
1331
查看次数

启动模拟器时 xcodebuild 超时

我正在尝试使用 TeamCity 为我的 iOS 应用程序设置自动化测试。目前,我的代理正在构建,但是一旦构建了最后一个目标并运行 codesign,它就会挂起并显示以下内容:

[19:29:34][CodeSign] CodeSign /var/root/Library/Developer/Xcode/DerivedData/MyProductiOS-fgkoogiimhlbckdlbckzmqfyaoff/Build/Products/Debug-iphonesimulator/MyProductiOSUITests-Runner.app/PlugIns/MyProductiOSUITests.xctest
[19:29:34][CodeSign]     cd /Users/ericmiller/.tcagent/work/f9abef315a0137d4
[19:29:34][CodeSign]     export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
[19:29:34][CodeSign]     export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/ericmiller/.pyenv/shims:/Users/ericmiller/.rbenv/shims:/Users/ericmiller/.pyenv/shims:/Users/ericmiller/Scripts:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/opt/local/bin"
[19:29:34][CodeSign] Signing Identity:     "-"
[19:29:34][CodeSign]     /usr/bin/codesign --force --sign - --timestamp=none /var/root/Library/Developer/Xcode/DerivedData/MyProductiOS-fgkoogiimhlbckdlbckzmqfyaoff/Build/Products/Debug-iphonesimulator/MyProductiOSUITests-Runner.app/PlugIns/MyProductiOSUITests.xctest
[19:29:34][CodeSign] /var/root/Library/Developer/Xcode/DerivedData/MyProductiOS-fgkoogiimhlbckdlbckzmqfyaoff/Build/Products/Debug-iphonesimulator/MyProductiOSUITests-Runner.app/PlugIns/MyProductiOSUITests.xctest: replacing existing signature
[19:31:32][CodeSign] 2017-01-22 19:31:32.279 xcodebuild[28262:86807]  iOSSimulator: Timed out waiting 120 seconds for simulator to boot, current state is 1.
[19:31:32][CodeSign] 2017-01-22 19:31:32.290 xcodebuild[28262:86805]  iOSSimulator: Timed out waiting 120 seconds for simulator to boot, current state is 1.
[19:31:32][CodeSign] 2017-01-22 19:31:32.291 xcodebuild[28262:86797] Error Domain=IDETestOperationsObserverErrorDomain Code=3 "Timed out waiting …
Run Code Online (Sandbox Code Playgroud)

teamcity xcodebuild codesign ios-simulator xcode8

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

由于信号命令失败:分段错误:存档时为11

我试图归档我的应用程序并得到此错误:由于信号命令失败:分段错误:11

当我构建它时,一切都很顺利,也在真实设备上.归档时会发生这种情况.任何想法如何解决?

这是错误的一部分:

0  swift                    0x000000010f79f3ad PrintStackTraceSignalHandler(void*) + 45
1  swift                    0x000000010f79eb56 SignalHandler(int) + 790
2  libsystem_platform.dylib 0x00007fffc82d5bba _sigtramp + 26
3  libsystem_platform.dylib 0x0000000000000040 _sigtramp + 936551584
4  swift                    0x000000010cae0de3 swift::CastOptimizer::optimizeUnconditionalCheckedCastAddrInst(swift::UnconditionalCheckedCastAddrInst*) + 1699
5  swift                    0x000000010cb69d4d processFunction(swift::SILFunction&, bool, unsigned int) + 1917
6  swift                    0x000000010cb70c9f (anonymous namespace)::ConstantPropagation::run() + 47
7  swift                    0x000000010caff89e swift::SILPassManager::runOneIteration() + 5166
8  swift                    0x000000010cb051f6 swift::runSILOptimizationPasses(swift::SILModule&) + 3462
9  swift                    0x000000010c7ac0e2 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*) + 20114
10 swift                    0x000000010c7a52b3 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, …
Run Code Online (Sandbox Code Playgroud)

xcode ios swift3 xcode8

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

当我添加构建以测试如何解决此问题时,在新组testflight中缺少上传日期状态的合规性

当我选择要添加到组testflight中的构建时,我收到此错误.请告诉我是否有

在此输入图像描述

但在我的构建活动中它显示在上传日期...我真的很混淆它请告诉我这里是否有任何错误... 在此输入图像描述

itunesconnect ios testflight xcode8

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

Xcode 8.3 (iOS 10.3) 无法启动模拟可执行文件

我的工作区有多个目标,其中之一是单元测试。

当我在 iOS 10.3 模拟器上从 Xcode 运行我的单元测试时,它们都通过了。但是,当我从命令行进行测试时,即xcodebuild <testtarget>测试间歇性失败。

以下是我在终端上看到的错误消息

xcodebuild[55631:340885] Error Domain=IDEFoundationErrorDomain Code=1 "Cannot launch simulated executable: no file found at /<Path>/Build/Intermediates/CodeCoverage/Products/Debug-iphonesimulator/<ProductName>"

这仅发生在 Xcode 8.3 而非早期版本中。我也设置xcode-select为 8.3.2

有人遇到过同样的问题吗?

frank swift3 xcode8 ios10.3

7
推荐指数
0
解决办法
619
查看次数

设备无法运行arm64的可执行文件. - Xcode 8 Beta

如果您正在使用Xcode beta,并且在将项目构建为"设备无法运行arm64的可执行文件"时出现错误.然后按照此解决方案:

- 选择项目并转到目标构建设置

  • 在搜索框中输入"构建变体"键

  • 刚刚从"armv7"变为"正常"或反转它.

xcode ios xcode8

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