标签: xcode7

lldb 'step into' 无法跳转到 Xcode7 上的函数调用?

我使用Xcode7来调试App。

看起来step into行为就像step over,无法跳转到子过程的执行?每次只是跳转到源代码中的下一行。

如果我在 UIKit 方法中进行调试(我没有源代码),它会跳转到下一条指令。

ios lldb xcode7

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

iOS Swift 2.0 - AvAudioPlayer没有播放任何声音

最近我在使用Xcode(7.0)的beta版时遇到了一个问题.我无法听到通过此代码播放的声音:(它是来自Main.storyboard的ViewController,有一个连接的按钮buttonTouchUpInside())

import UIKit
import AVFoundation

class ViewController: UIViewController {

override func viewDidLoad() {
    super.viewDidLoad()
}

override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()
    // Dispose of any resources that can be recreated.
}

func setupAudioPlayerWithFile(file:NSString, type:NSString) -> AVAudioPlayer  {
    let path = NSBundle.mainBundle().pathForResource(file as String, ofType: type as String)
    let url = NSURL.fileURLWithPath(path!)
    var audioPlayer:AVAudioPlayer?

    do {
        try audioPlayer = AVAudioPlayer(contentsOfURL: url)
    } catch {
        print("NO AUDIO PLAYER")
    }

    return audioPlayer!
}

@IBAction func buttonTouchUpInside(sender: AnyObject) {
    let backMusic = setupAudioPlayerWithFile("sound", …
Run Code Online (Sandbox Code Playgroud)

ios swift xcode7

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

在iOS 8.3上使用CoreSpotlight(9.0+)启动应用程序时,Xcode崩溃了

我正在努力将CoreSpotlight框架功能与应用程序集成,并尝试在iOS 8.3设备上运行它.每次我有:

dyld: Library not loaded: /System/Library/Frameworks/CoreSpotlight.framework/CoreSpotlight
Referenced from: /private/var/mobile/Containers/Bundle/Application/F9714BAD-1386-42A7-9B5F-5C06607AF6CE/Quotes.app/Quotes
Reason: image not found
Run Code Online (Sandbox Code Playgroud)
  • 我标记CoreSpotlightOptional.
  • 每个目标(App + Tests)都将Link Frameworks Automatically自动设置为NO,并且主项目也将此标志设置为相同.

我没有看到问题出在哪里以及为什么这仍然不起作用.

先感谢您!

xcode ios swift xcode7 corespotlight

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

Xcode7,iOS9使用未解析的标识符'EKSpanThisEvent'

我遇到了这个代码的问题

import UIKit
import EventKit

let eventStore = EKEventStore()
    eventStore.requestAccessToEntityType(EKEntityType.Event, completion: { (success, accessError) -> Void in
        if accessError != nil {
            print("Calendar Access Error: \(accessError)")
            return
        }
        let event = EKEvent(eventStore: eventStore)

        event.title = self.detailItem!.title
        event.allDay = true
        event.startDate = self.detailItem!.date
        event.endDate = self.detailItem!.date
        event.calendar = eventStore.defaultCalendarForNewEvents
        var saveToCalendarError: NSError?
        let success: Bool
        do {
            //Swift2: use of unresolved identifier 'EKSpanThisEvent'
            try eventStore.saveEvent(event, span: EKSpanThisEvent)
            success = true
        } catch var error as NSError {
            saveToCalendarError = error
            success …
Run Code Online (Sandbox Code Playgroud)

ios9 xcode7 swift2 xcode7-beta5

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

Xcode 7:强制Cocoapods在Swift1.2中编译

Xcode 7可用,但我还不想迁移到Swift 2.0.

我有CococaPods的问题.它们似乎是用Swift 2.0或一些新的Xcode功能编译的,因此不起作用:)因为我使用几乎几乎被遗弃且几乎不能维护的pod--我需要一些时间从它们迁移,或者它们迁移到它们Swift 2.0.如何强制Xcode 7以旧方式编译它们?:)

ps我尝试将首选项>位置>命令行工具更改为Xcode 6.4(6E35b),但这似乎不起作用.

cocoapods swift xcode7 swift2

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

指针运算期间的C++总线错误

我正在努力学习C++,尤其是.指针及其算术.我正在使用XCode编译和运行我的程序.

下面我有两组代码,试图创建一个整数的3D数组.第一个代码编译并运行没有错误,但第二个代码编译没有错误,但在运行时生成EXC_BAD_ACCESS.

Bus Error: 10当我尝试使用g ++编译并从终端运行时,第二个代码生成.

任何人都可以告诉我为什么第二组代码没有成功运行虽然对我来说它看起来非常相似?

代码1:编译+运行成功

int main(){
    int i, j, k;
    int*** dim = new int**[3];
    for (i=0; i<3; i++) {
        dim[i] = new int* [3];
        for(j = 0; j < 3; j++) {
            *(*(dim+i)+j) = new int[3];
        }
    }
    return 0;
}
Run Code Online (Sandbox Code Playgroud)

代码2:成功编译但EXC_BAD_ACCESS/Bus Error: 10在运行时生成

int main(){
    int i, j, k;
    int*** dim = new int**[3];
    for (i=0; i<3; i++) {
        dim[i] = new int* [3];
    }
    for (i=0; i<3; i++) {
        for(j=0; …
Run Code Online (Sandbox Code Playgroud)

c++ arrays pointers g++ xcode7

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

在app中获得低功耗状态

当iPhone改变其电源模式时,我需要获得低功耗模式状态,天气低功耗模式在我的应用程序中打开或关闭警报.

请通过解决方案帮助我.

谢谢

iphone objective-c uialertview xcode7 ios9.1

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

无法在我的模拟器上运行app:macOS Sierra

我无法使用Xcode 7.3.1 iPhone 5s模拟器在模拟器上启动我的应用程序.我在Xcode中收到错误消息是"DTAssetProviderService无法启动DTXConnection"在此输入图像描述

beta debugging macos ios xcode7

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

声明仅在文件范围内有效(扩展名)

我试图让我的应用程序只是在纵向模式iam使用navigationcontroller我得到这个错误iam usring Xcode7Swift 2目标系统IOS 9.3
声明只在文件范围有效

        extension UINavigationController {
            public override func supportedInterfaceOrientations() -> Int {
                return visibleViewController.supportedInterfaceOrientations()
            }
            public override func shouldAutorotate() -> Bool {
                return visibleViewController.shouldAutorotate()
            }
        }

        extension UITabBarController {
            public override func supportedInterfaceOrientations() -> Int {
                if let selected = selectedViewController {
                    return selected.supportedInterfaceOrientations()
                }
                return super.supportedInterfaceOrientations()
            }
            public override func shouldAutorotate() -> Bool {
                if let selected = selectedViewController {
                    return selected.shouldAutorotate()
                }
                return super.shouldAutorotate()
            }
        }
Run Code Online (Sandbox Code Playgroud)

日Thnx

swift ios9 xcode7 swift2

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

迦太基错误“凭证错误”

说明:https : //github.com/watson-developer-cloud/ios-sdk

错误:

*** Skipped downloading ios-sdk.framework binary due to the error:
"Bad credentials"

The following build commands failed:
    CompileSwift normal arm64
    CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
(2 failures)
Run Code Online (Sandbox Code Playgroud)

在此处输入图片说明

carthage xcode7

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