问题标签 [macos-high-sierra]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
safari - 如何在 iOS 11 Mobile Safari 或 MacOS High Sierra Safari 中检测隐私浏览?
在新的 iOS 11 Safari 和 MacOS High Sierra Safari 上,查看是否window.localStorage.setItem('test', 1);
(请参阅https://stackoverflow.com/a/17741714/1330341)引发错误的技巧不再有效,因为它不再引发错误,并且还正确设置了 localStorage 项目。有没有人想出任何其他方法来检查新版本 Safari 中的隐私浏览模式?
xcode9 - High Sierra 更新导致 NSTableView 翻转和打乱
我正在将一个多年来一直运行良好的现有项目更新到 High Sierra。视图正确加载并看起来像往常一样:
然后,在我打开一个弹出窗口并再次关闭它之后,视图会移动东西,翻转东西,通常看起来很疯狂:
请注意,信息标题下降到底部,左侧文本项倒序,日期和下拉文本翻转。发生这种情况时,鼠标交互似乎也很混乱。
我不知道从哪里开始解决这个问题,有人有什么想法吗?
这是使用 xcode 9 beta 5 和 High Sierra Beta 6。
更新:这也在 xcode 9 GM 和 High Sierra GM Seed 中
更新
我已经确定当我在该视图所在的 NSTableView 上调用 reloadData 时会发生这种情况。所以现在的问题似乎是如何刷新表数据而不会出现问题。
python - 在 macOS High Sierra 上安装 mysql-python
我正在尝试mysql-python
使用命令在 Python 2.7.10 中安装该库pip install mysql-python
。这会导致以下错误:
我已经在 StackOverflow 上搜索过这个问题,并且已经尝试了各种修复。
xcode-select --install
提供以下信息:
此处的答案建议尝试此代码:
我已经运行了这个并且错误消息没有改变。运行brew list
显示mysql
,mysql-connector-c
并openssl
已安装。
请注意,我使用的是 macOS High Sierra 测试版,这可能是其他各种修复程序不起作用的原因。
websocket - 由于页面重新加载时出现暂停错误,WebSocket 已关闭
我有一个调用函数来重新加载页面的按钮:
Safari 11 5 次中有 1 次在控制台中抛出此错误:
我在幕后运行 Webpack 2 开发服务器。
在 Chrome 中似乎没有发生。这是 High Sierra Beta,所以可能是一个错误。
建议或想法?
linux - 环境变量未保存在 Max OS Sierra 中
我最近将我的操作系统升级到 Max OS Sierra,我试图在环境变量(PATH 变量)中保存一个特定路径。我打开终端并执行以下步骤:
回声 $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
导出 PATH=~/Desktop/:$PATH
回声 $PATH
/Users/pratik/Desktop/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
我已关闭终端并打开新终端并执行以下命令:
- 回声 $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
所以我之前添加的路径没有被保存。我在这里想念什么?
macos - macOS (10.13 High Sierra) 不再将屏幕保护程序设置存储在 com.apple.screensaver
到目前为止,我的项目一直依赖以下命令来调整屏幕保护程序设置:
从 macOS High Sierra (10.13) 开始,这些设置似乎不再存储在 com.apple.screensaver
我想避免使用 Apple Script 来实现这样的事情,有什么建议吗?
macos - AppleScript 创建特定 Messages.app 对话的“链接”?
目标
我想要一个 AppleScript 让我获取所选 Messages.app 对话/聊天的 ID 或类似内容,然后再有一个 AppleScript 可以打开与此 ID 对应的正确消息对话/聊天。
- 获取当前选定 Messages.app 聊天的 ID/引用
- 根据 ID/参考打开特定的 Messages.app 聊天
到目前为止我尝试过的
使用 Mail.app 我可以执行以下操作:
tell application "Mail"
set selectedMessages to selection
set theMessage to item 1 of selectedMessages
set messageid to message id of theMessage
-- Make URL (must use URL-encoded values for "<" and ">")
set urlText to "message://" & "%3c" & messageid & "%3e"
return urlText
end tell
但是对于 Messages.app,有selection
反对意见。
试图获取的内容,the clipboard
看看是否有任何 ID 或可以使用的有价值的东西,但看起来剪贴板访问不像通过可可编程那样强大(在那里你可以获得很多元数据和替代剪贴板内容)。
双击一个对话,以便它打开它自己的窗口。尝试获取此窗口的ID,稍后再打开。没用。
macos - 内核扩展未从 High Sierra OSX 中的 /Library/StagedExtension 中删除
卸载内核扩展后,kext 仍保留在 /Library/StagedExtension 中。这是 Apple 在最新的 High Sierra OSX 10.13 Beta 6 中的错误吗?可能是什么原因和解决方法
objective-c - iOS 11 - Core Data - UIColor no longers works as transformable attribute
I store colours in my binary Core Data store using a transformable attribute, specifying the class of the attribute as UIColor like so:
In the iOS 11 Beta this has stopped working with an error like this :
I managed to replicate the specific problem in an XCode project on GitHub (Must be run with the XCode Beta twice to get the error).
In the demo project the store type is controlled by NSPersistentStoreDescription and setting it to NSBinaryStoreType, which I do in the AppDelegate in the exanple project, and I add objects in application didFinishLaunchingWithOptions, otherwise it's the standard template from an iOS11 app with core data. Plus a small datamodel and classes.
If you run the project twice, the first time it creates the datastore and everything is fine. The second time, the datastore tries to open and crashes the app. This problem only seems to be related to binary datastores from what I can tell, if I use an SQL backed datastore it works. However, my app is in the wild and uses binary.
I've reported it to Apple as a bug and sought help on the developer forums, but Apple has not acknowledged the bug and no help was coming.
I'm getting a bit worried as the iOS11 release date draws nearer and I have no solution, my app just won't work in iOS11.
I've tried changing the property to NSData and seeing if it was possible to just unarchive the data, but it seems it's still stored internally as a UIColor somehow and the database just won't open.
Can anyone see a workaround? I have the app in the wild, and possibly pushing out an update to convert the datastores before iOS11 could work for some, but that isn't going to guarantee all users get the fix and they could lose their data.
EDIT 1: Radar number : 33895450
EDIT 2: It just occured to me that this applies to any transformable attribute in core data, the values supported in the error message are just the default property types.
EDIT 3: Just out of curiosity I filled out all the fields for the transformable attribute (it was never required before). I added "NSKeyedUnarchiveFromData" to value transformer name of the core data entity, it should be the default, but you never know. No effect. It must be using the value transformer anyway to know that it's a UIColor. I filled in the custom class field to be UIColor, no effect.
Edit 5 : I noticed earlier that UIColor now supports NSSecureCoding, should security somehow be the issue somehow overlooked in the other store typed.
Edit : Now that iOS is released, i’ve used one of my TSIs to further escalate this. Do i get them back if i have to use one to get them to fix their software?
Edit : Apple got back to me on my TSI, they said it’s under investigation, there is no workaround, and to wait on the bug. They refunded my TSI because they couldn’t help.
Edit 8: Same problem on macOS High Sierra, with NSColor instead of UIColor.
Apple still have not given me any feedback on my actual bug report.