macos-sierra

Error copying files with FileManager (CFURLCopyResourcePropertyForKey failed because it was passed an URL which has no scheme)

假如想象 提交于 2019-12-23 07:21:58
问题 I'm trying to copy some (media) files from one folder to another using FileManager 's copyItem(at:path:) , but I'm getting the error: CFURLCopyResourcePropertyForKey failed because it was passed an URL which has no scheme Error Domain=NSCocoaErrorDomain Code=262 "The file couldn’t be opened because the specified URL type isn’t supported." I'm using Xcode 9 beta and Swift 4. let fileManager = FileManager.default let allowedMediaFiles = ["mp4", "avi"] func isMediaFile(_ file: URL) -> Bool {

Error copying files with FileManager (CFURLCopyResourcePropertyForKey failed because it was passed an URL which has no scheme)

我的未来我决定 提交于 2019-12-23 07:21:11
问题 I'm trying to copy some (media) files from one folder to another using FileManager 's copyItem(at:path:) , but I'm getting the error: CFURLCopyResourcePropertyForKey failed because it was passed an URL which has no scheme Error Domain=NSCocoaErrorDomain Code=262 "The file couldn’t be opened because the specified URL type isn’t supported." I'm using Xcode 9 beta and Swift 4. let fileManager = FileManager.default let allowedMediaFiles = ["mp4", "avi"] func isMediaFile(_ file: URL) -> Bool {

gdb on macOS Sierra 10.12.4

不打扰是莪最后的温柔 提交于 2019-12-23 05:07:14
问题 There are lots of help around regarding the incompatibility of Sierra and gdb, and everyone says that the best solution is waiting. The problem seems to still persist, could anyone please help me how I can solve it? I have already tried this and it does not work on my Sierra. GDB kind of doesn't work on macOS Sierra Thanks 回答1: A fix has been created, but not merged and released yet. In the meantime, I have patched the most recent release of GDB with the changes and have things working with

Error message for virtualenvwrapper installed with homebrew on Mac Sierra

狂风中的少年 提交于 2019-12-23 04:19:35
问题 I installed virtualenv and virtualenvwrapper using homebrew, but am getting the following error when I try source virtualenvwrapper.sh Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/Library/Frameworks/Python.framework

Can't install gactions CLI

巧了我就是萌 提交于 2019-12-23 03:37:15
问题 I'm trying to install the google actions CLI. The docs: https://developers.google.com/actions/tools/gactions-cli I followed the commands here as well as from the question/answer here. I downloaded the Mac x86_64. Then ran the following command on it: Run chmod +x gactions to make the binary executable. It did turn the file into an executable. When I clicked it, it opened in terminal and did something. However in a new tab in terminal it still does not understand the gactions. Also I don't use

iOS Simulator in Sierra - Studio Midi does not work

蓝咒 提交于 2019-12-23 03:28:06
问题 I am encountering very bad problem using Sierra + xcode 8 + iOS Simulator: I develop midi application, but now , when I start the iOS Simulator I get no midi-port available, I mean: Usualle using Studio Midi is possible to see the virtual iOS device, plus you can see se the session, typically named Session 1. being this is possible to re-route the MidiNetwork ( midi_driver ) to a physical port, but now, using Sierra the iOS Simulatore is not visible no longer, and I do not know ( and where to

Install Homebrew in a Mac

三世轮回 提交于 2019-12-22 08:25:36
问题 I am trying to install Homebrew in a Mac v 10.12.2 using brew install node But I got these errors: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- mach (LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /usr/local/Library/Homebrew/extend/pathname.rb:2:in `<top (required)>' from /System/Library

Could not code sign a Mac App

旧街凉风 提交于 2019-12-22 08:17:19
问题 I successfully submitted my app [ version 1.0 ] to iTunesConnect for review. And they have rejected it because I have added an extra App Sandbox feature . So I solved that thing and tried to archive my project in new build number. Also I have selected my Code Signing Identity 3rd Party Mac Developer Application , And came back to Project Settings -> General, now I could see that the Signing switched to None and Team automatically changed to None. So I have changed that to My Team Name and

How to deactivate bash_history stats print when opening a new terminal window on my mac?

有些话、适合烂在心里 提交于 2019-12-21 21:39:14
问题 I just reinstalled MacOS (OSX 10.12) and as I'm redoing my IDEs and such I get this strange bash_history stats object that prints to every new terminal window! It's driving me bonkers, and after looking through all the preferences an settings I can't seem to turn it off! Does anyone know why this is suddenly happening? Is it something to do with iCloud Profile Syncing? Here's s picture below. Thanks so much for your help! Screenshot of bash terminal history stats Last login: Wed Jul 5 03:23

How to disable scrolling in NSScrollView with enabled responsive scrolling

白昼怎懂夜的黑 提交于 2019-12-21 21:32:44
问题 I need to disable programmatically scrolling in NSSrollView with enabled responsive scrolling. I try override isCompatibleWithResponsiveScrolling , then is possible to override scrollWheel and have enabled responsive scrolling but scrollWheel works different in that implementation. Is called only once, on start of scroll but I want to break scroll that is in progress. It's possible to do this in different way that not need to override scrollWheel method? 来源: https://stackoverflow.com