标签: macos-sierra

Swift 3中的managedObjectContext

我想通过这个示例代码来处理,其中使用Swift和CoreData来创建表.但是,使用Swift 3我无法使用它.最重要的是,我无法正确更换线路

// set up the NSManagedObjectContext
  let appDelegate = NSApplication.sharedApplication().delegate as! AppDelegate
  managedContext = appDelegate.managedObjectContext
Run Code Online (Sandbox Code Playgroud)

即使我发现了这个相关的问题(然而iOS不是OS X).如何替换产生错误消息的那段代码Value of type 'AppDelegate' has no member 'managedContext'

core-data swift3 macos-sierra

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

虚拟主机不能安装macOS Sierra

我最近将我的工作机器更新为macOS Sierra,现在我的虚拟主机配置都没有工作.我需要重新配置所有这些是一个巨大的痛苦.

我在想 - 这种情况发生是否正常?当我更新操作系统时,有没有办法防止将来发生这种情况?

此外,我的虚拟主机配置似乎无法正常工作.请看下面.

我编辑/etc/apache2/extra/httpd-vhosts.conf过包括:

<VirtualHost *:80>
ServerAdmin lbanach@splashworldwide.com
DocumentRoot "/Users/splashnw/Sites/tm-charts"
ServerName tm-charts.dev
ErrorLog "/private/var/log/apache2/tm-charts.dev-error_log"
CustomLog "/private/var/log/apache2/tm-charts.dev-access_log" common
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)

而且,我的/etc/hosts文件有:

127.0.0.1 tm-charts.dev
Run Code Online (Sandbox Code Playgroud)

当我在浏览器中导航到tm-charts.dev时,只会出现一条消息:"它有效!" 不是我在安装macOS Sierra之前在该URL上看到的项目.

你能告诉我这里出了什么问题吗?谢谢!

apache macos virtualhost macos-sierra

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

更新到macOS后,获取有关"动态访问器失败"的未知错误

在升级到macOS Sierra(10.12)和Xcode 8.0(8A218a)后,我开始在我的macOS/Cocoa应用程序(用Objective-C编写)中收到许多错误消息,这些消息遵循以下格式:

[error] warning: dynamic accessors failed to find @property implementation for 'uniqueId' for entity ABCDInfo while resolving selector 'uniqueId' on class 'ABCDInfo'.  Did you remember to declare it @dynamic or @synthesized in the @implementation ?

[error] warning: dynamic accessors failed to find @property implementation for 'uniqueId' for entity ABCDContact while resolving selector 'uniqueId' on class 'ABCDContact'.  Did you remember to declare it @dynamic or @synthesized in the @implementation ?

[error] warning: dynamic accessors failed to find @property implementation …
Run Code Online (Sandbox Code Playgroud)

macos xcode cocoa objective-c macos-sierra

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

是否可以访问macOS Touch Bar的控制条?

控制地带是静态和全球部分MacOS的触摸条它总是在每一个方面和应用程序可见.虽然Apple提供了有关如何使用API 在macOS应用程序中提供上下文应用程序区域的完整文档,但我找不到有关如何向Control Strip添加内容的任何通知.

我可以想到很多很好的工具和动作,如果它总是只是一个指尖,那将是很好的,所以我想知道我们(开发人员)是否能够推进控制条呢?有没有任何文件,或有没有人自己弄明白如何使用控制带项目?

macos macos-sierra nstouchbar macbookpro-touch-bar

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

git挂起macOS Sierra终端没有恢复

在macOS Sierra 10.12.1上运行git版本2.10.2(来自Homebrew).当我执行git pull它完全挂起我的终端.如果我强制退出终端并重新启动,则终端将无法启动.我尝试了以下(从其他答案):

  1. 从使用DSA密钥切换到RSA密钥(由于最新OpenSSH中的RSA弃用)
  2. 更新到最新的Homebrew和更新的git
  3. 试过一个不同的终端(iTerm)
  4. 确保xcode是最新的并重新安装命令行工具(xcode-select --install)

事实上它完全挂起终端并且无法恢复使得它很难诊断,并且在此之后它似乎与许多其他应用程序混乱,需要完全重启.任何帮助感激不尽!

git terminal macos-sierra

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

Windows SSTP VPN - 从Mac连接

您可能知道Windows Server VPN通常可以在SSTP上运​​行.从Windows 10连接非常简单,但如果您必须从个人Mac远程工作?Mac OS不支持开箱即用的SSTP VPM.

在此输入图像描述

vpn macos-sierra

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

无法可靠地确定服务器的MacBook完全限定域名

第一次获得新的MBP 2016.尝试设置PHP,MySQL和Apache.使用命令启动Apache

sudo apachectl restart
Run Code Online (Sandbox Code Playgroud)

然后安装PHP

brew install php71 --with-httpd24
Run Code Online (Sandbox Code Playgroud)

也做了以下更改......

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#

DirectoryIndex index.html index.php
SetHandler application/x-httpd-php

ServerName dev-server
Run Code Online (Sandbox Code Playgroud)

此外,在主机文件中更新相同 /etc/hosts/

但是,每当我试图通过使用命令停止/重新启动我的apache sudo apachectl restart或者sudo apachectl stop我正在跟踪错误.

AH00557: httpd: apr_sockaddr_info_get() failed for Sureshs-MacBook-Pro.local
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
httpd not running, trying to …
Run Code Online (Sandbox Code Playgroud)

php apache homebrew macos-sierra

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

在Mac上为python 3.6安装opencv3

我想在macOS Sierra上安装opencv3 for python 3.6.我试图通过自制软件使用此链接 http://www.pyimagesearch.com/2016/12/19/install-opencv-3-on-macos-with-homebrew-the-easy-way/但我是得到这个错误

Error: opencv3: Does not support building both Python 2 and 3 wrappers
Run Code Online (Sandbox Code Playgroud)

怎么解决这个?

python macos opencv macos-sierra

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

如何使用命令行提取xip存档?

我搜索了如何使用命令行提取XIP存档而没有运气,所以我将离开我自己的解决方案,作为一个bash功能,在这里.

我在这里找到了灵感.

macos xcode osx-elcapitan macos-sierra xcode8

11
推荐指数
5
解决办法
8175
查看次数

为什么macOS系统打印速度比Chrome或lpr更快?

我注意到将完全相同的pdf文件打印到完全相同的打印机并不总是花费相同的时间:

  • 从macOS预览的默认打印对话框打印速度非常快.
  • 从Chrome浏览器的内置打印对话框打印速度较慢.打印机在启动打印作业后暂停一会儿.
  • 从命令行lpr打印与从Chrome的内置打印对话框打印具有相同的效果.
  • 但是,使用Chrome切换到系统打印对话框会让事情再次变得快速.

我的目标是从命令行进行打印,lpr从系统对话框开始顺利进行.实际上有什么区别?

lpr -o landscape /path/to/my/file.pdf是我目前的命令.生成的输出是预期的,太慢了.

printing macos google-chrome lpr macos-sierra

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