小编Jay*_*bey的帖子

无法在当前状态下启动设备:正在创建

我在Xcode 6 for iOS 8模拟器中运行应用程序时遇到错误.该错误指出"无法在当前状态下启动设备:正在创建".我试图重置模拟器的内容.此外,我在安装Xcode 6后重新启动了mac.可能有什么问题?

截图

runtime-error ios-simulator xcode6

6
推荐指数
2
解决办法
4866
查看次数

iOS 模拟器:设备状态无效

我刚刚从 App Store 下载了 Xcode 6.4 并开始创建一个 hello world 应用程序来学习 swift,但收到错误消息“无效的设备状态”。

截图1

我用谷歌搜索了很多并尝试了以下方法:

  1. 重新启动 Mac 并输入 xcode 并启动项目(如堆栈溢出线程中所述)
  2. 我使用另一个布局创建了一个新的 iOS 应用程序,但如果我运行该项目,则会再次显示相同的错误。
  3. 我删除了所有项目并再次重新安装了 Xcode。启动了一个新项目并运行它,但仍然出现相同的错误。

我运行的是 Yosemite 10.10.1,Xcode 版本是 6.4。

谁能帮我 ?

xcode ios ios-simulator

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

Swift:如何将自定义UICollectionViewCell设置为圆?

我的自定义UICollectionViewCell包含UILabelUIImage.我想以圆形格式设置单元格.

注意: - sizeForItemAtIndexPath由于AutoLayout而无法更改.

以下是我用过的代码:

func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout,sizeForItemAtIndexPath indexPath:NSIndexPath ) -> CGSize {

          return CGSize(width: (self.objKeypadCollectionView.frame.size.width/3)-10, height: (self.objKeypadCollectionView.frame.size.height/4)-10)
    }

func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {

        let objKeypadCollectionViewCell = collectionView.dequeueReusableCellWithReuseIdentifier("idKeypadCollectionViewCell", forIndexPath: indexPath) as! KeypadCollectionViewCell

        if (self.numberArray[indexPath.item])=="asda" {
            objKeypadCollectionViewCell.lblNumber.text = ""
            objKeypadCollectionViewCell.imgPrint.hidden = false
        }
        else if (self.numberArray[indexPath.item])=="Derterel" {
            objKeypadCollectionViewCell.lblNumber.text = self.numberArray[indexPath.item]
            objKeypadCollectionViewCell.imgPrint.hidden = true
        }
        else {
            objKeypadCollectionViewCell.imgPrint.hidden = true
            objKeypadCollectionViewCell.lblNumber.text = self.numberArray[indexPath.item]
            objKeypadCollectionViewCell.layer.borderColor = UIColor.lightGrayColor().CGColor
            objKeypadCollectionViewCell.layer.borderWidth = …
Run Code Online (Sandbox Code Playgroud)

xcode ios uicollectionview uicollectionviewcell swift

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

Xcode 8:PAC Fetch失败,错误[NSURLErrorDomain:-1003]登录控制台窗口

在项目工作时,我在控制台窗口上得到一些奇怪的日志.这些提到下面:

  • nw_parameters_set_source_application Failed to convert from PID (0) to UUID. This could lead to wrong data usage accounting.
  • PAC Fetch failed with error [NSURLErrorDomain:-1003]
  • nw_proxy_resolver_create_parsed_array PAC evaluation error

截图1

我已检查过以下链接,但没有发现任何有用的信息.

  1. 链接1
  2. 链接2

注意: 我正在使用Xcode 8.3.2和iPhone 6 Plus设备(iOS 10.3)以及Project中的Swift 3语言.看来这没有问题.

尽管我的代码没有变化,但这些日志突然出现. Most important thing is that my project is working as usual.那么为什么我会遇到这个问题呢?

除了这个会不会有一个问题,当应用程序是在AppStore上载?

console xcode ios swift swift3

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

iOS 11:发生 SSL 错误,无法连接到服务器

当 I\xe2\x80\x99m 尝试与Server (which is IIS)I\xe2\x80\x99m 连接时,控制台窗口出现以下错误:

\n\n

API 错误:发生 SSL 错误,无法与服务器建立安全连接。\n因此无法登录。

\n\n

我正在使用 Xcode 9.2、iOS 11。

\n\n

以下是我尝试过但没有起作用的解决方案:

\n\n
    \n
  1. App Transport Security Settings-> Allow Arbitrary Loads->YES

  2. \n
  3. Add exception domainETC。

  4. \n
  5. 与服务器团队一起对 IIS 进行故障排除,发现它不安全,即没有 HTTPS 或 SSL

  6. \n
\n\n

这是我的 plist ATS 配置

\n\n

截屏

\n\n

PS 这个项目是由第三方供应商于 2014 年用 Objective-C 编写的。这个问题是 Objective-C 语言造成的吗?(我不这么认为)

\n\n

有修复吗?

\n

ssl xcode objective-c ios app-transport-security

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

IOS 8模拟器无法启动

当我尝试在模拟器iOS 8.0上使用Xcode 6 Beta 4运行我的应用程序时,我总是收到此错误:

无法启动iOS模拟器

实际上我在这个网站上发现了一些类似的问题,我尝试了所有的答案,但仍然无法解决.我对Xcode 6的Beta 2版本也有同样的错误,所以我决定等一下.但现在这已不再正常了.有没有人找到这种情况发生的原因并找到解决方案?

在此输入图像描述

runtime-error ios-simulator xcode6

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

SQLite iOS警告:常量101与BOOL类型表达式的比较始终为false

我已经下载了SQLite学习的示例代码.我正在使用Xcode 6.1.1和iPhone 6 plus模拟器.在模拟器上运行应用程序后,我DB Error : unknown error从查询执行中获取.下面是我收到警告的代码的一部分Comparison of constant 101 with expression of type 'BOOL' (aka 'bool') is always false.

// Execute the query.
BOOL executeQueryResults = sqlite3_step(compiledStatement);
 if (executeQueryResults == SQLITE_DONE) {
     // Keep the affected rows.
      self.affectedRows = sqlite3_changes(sqlite3Database);

       // Keep the last inserted row ID.
       self.lastInsertedRowID = sqlite3_last_insert_rowid(sqlite3Database);
  }
  else {
      // If could not execute the query show the error message on the debugger.
       NSLog(@"DB Error: %s", sqlite3_errmsg(sqlite3Database));
  }
Run Code Online (Sandbox Code Playgroud)

可能有什么办法解决这个问题?

警告的屏幕截图

sqlite comparison warnings objective-c ios

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

Xcode 8:打开bundle-id的请求失败.SpringBoard无法为请求提供服务

我正在尝试在iPhone 7 Plus模拟器上运行应用程序(使用Xcode 8.0),但是通过提示警报而失败 “The request to open bundle-id failed. SpringBoard was unable to service the request.”

截图1

经常得到这个(三个版本中两次).我找到的唯一解决办法是Quit Xcode and Simulator and rebuild app (not worthy).

任何其他修复?

xcode ios-simulator springboard ios10 xcode8

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

[project] 的 Xcode 功能警告可能无法正常运行,因为其权利使用占位符团队 ID

我是 Xcode 的新手。刚开始单视图项目,遇到如下错误。

项目名称:Pitch Perfect xcode 版本:10.2.1 osx 版本:10.14.5

:-1: Capabilities for Pitch Perfect may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a development team in the build settings editor. (in target 'Pitch Perfect')
Run Code Online (Sandbox Code Playgroud)

在构建选项中更改安装组/所有者

签到区截图 在此处输入图片说明

添加了截图

xcode entitlements ios swift

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

模块没有使用库进化支持编译;使用它意味着无法保证二进制兼容性

最近我遇到了 SDK 的编译时警告。这是否意味着它不是使用目标设置“为分发构建库”构建的?。

截屏

xcode module ios swift5 xcode12

4
推荐指数
2
解决办法
5236
查看次数