How to make an application icon for macOS using
iconset&iconutil
For faster connection speed and more flexibility.
- Start Xcode in command line by running this in commandline
/Applications/Xcode.app/Contents/MacOS/Xcode - Start downloading of the simulator
- Cancel it. YES CANCEL IT!
- You will get a message like this:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo rm -rfv /Library/Caches/com.apple.iconservices.store; sudo find /private/var/folders/ \( -name com.apple.dock.iconcache -or -name com.apple.iconservices \) -exec rm -rfv {} \; ; sleep 3;sudo touch /Applications/* ; killall Dock; killall Finder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Similar to defer in Swift | |
| #define pspdf_defer_block_name_with_prefix(prefix, suffix) prefix ## suffix | |
| #define pspdf_defer_block_name(suffix) pspdf_defer_block_name_with_prefix(pspdf_defer_, suffix) | |
| #define pspdf_defer __strong void(^pspdf_defer_block_name(__LINE__))(void) __attribute__((cleanup(pspdf_defer_cleanup_block), unused)) = ^ | |
| #pragma clang diagnostic push | |
| #pragma clang diagnostic ignored "-Wunused-function" | |
| static void pspdf_defer_cleanup_block(__strong void(^*block)(void)) { | |
| (*block)(); | |
| } | |
| #pragma clang diagnostic pop |
Notes for working with Git Submodules, taken from:
https://git-scm.com/book/en/v2/Git-Tools-Submodules
Grab submodule dependencies after a fresh clone
git submodule initgit submodule update
..or alternatively,
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| As of iOS 11/macOS High Sierra, and only including ones in Foundation and CoreFoundation | |
| Strings: | |
| _NSCFString - a CFStringRef or CFMutableStringRef. This is the most common type of string object currently. | |
| - May have 8 bit (ASCII) or 16 bit (UTF-16) backing store | |
| _NSCFConstantString - a compile time constant CFStringRef, like you'd get with @"foo" | |
| - May also be generated by dynamic string creation if matches a string in a pre-baked table of common strings called the StringROM | |
| NSBigMutableString - an NSString backed by a CFStorage (https://github.com/opensource-apple/CF/blob/master/CFStorage.h) for faster handling of very large strings | |
| NSCheapMutableString - a very limited NSMutableString that allows for zero-copy initialization. Used in NSFileManager for temporarily wrapping stack buffers. |
Cycript is a tool I find very helpful. It's an effective REPL for Objective-C. When I updated to macOS Mojave, I found that cycript no longer worked because it was linked against an old version of Ruby. After attempting to compile from source, I tried another solution. install_name_tool is an open source tool for modifying the names of linked shared libraries in a Mach-O.
$ install_name_tool -change /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/libruby.2.0.0.dylib /System/Library/Frameworks/Ruby.framework/Versions/Current/usr/lib/libruby.dylib Cycript.lib/cycript-apl
$ install_name_tool -change /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/libruby.2.0.0.dylib /System/Library/Frameworks/Ruby.framework/Versions/Current/usr/lib/libruby.dylib Cycript.lib/libcycript.dylib
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # Set the macOS installer path as a variable | |
| MACOS_INSTALLER="/Applications/$(ls /Applications | grep "Install macOS")" | |
| MOUNT_POINT="$MACOS_INSTALLER/Contents/SharedSupport" | |
| echo "macOS installer is \"$MACOS_INSTALLER\"" | |
| # Set the target disk as a variable | |
| TARGET=$(diskutil info "$(bless --info --getBoot)" | awk -F':' '/Volume Name/ { print $2 }' | sed -e 's/^[[:space:]]*//') | |
| echo "Target disk is \"$TARGET\"" |
- [Working without a nib, Part 1][1]
- [Working without a nib, Part 2: Also Also Wik][2]
- [Working without a nib, Part 5: No, 3!][3]
- [Working without a nib, Part 4: setAppleMenu][4]
- [Working without a nib, Part 5: Open Recent menu][5]
- [Working without a nib, Part 6: Working without a xib][6]
- [Working without a nib, Part 7: The empire strikes back][7]
- [Working without a nib, Part 8: The nib awakens][8]
- [Working without a nib, Part 9: Shipping without a nib][9]
- [Working without a nib, Part 10: Mac Main Menu][10]