- Prepare a Mac supports BLE
- Download the Additional Tools for Xcode from Apple Developer
- Open the Bluetooth Explorer
- Press and hold the Oculus button and back button of controller until the controller LED blinks
- Select menu [Devices] -> [Low Energy Devices]
- Click [Start Scanning] button.
- Chose OMVR-V190 in Device and click [Connect] button.
#!/usr/bin/xcrun --sdk macosx swift | |
import Foundation | |
let fileManager = FileManager.default | |
let currentPath = fileManager.currentDirectoryPath | |
/// List of files in currentPath - recursive | |
var pathFiles: [String] = { | |
guard let enumerator = fileManager.enumerator(atPath: currentPath), |
#!/usr/bin/env ruby | |
# Your umbrella header needs a comment in it like the below so this script | |
# knows which parts to replace | |
# | |
# /* IMPORTS BEGIN */ | |
# | |
# /* IMPORTS END */ | |
MODULE = ARGV[0] || File.basename(Dir.getwd) |
In this quick walkthough you'll learn how to create a separate branch in your repo to house your screenshots and demo gifs for use in your master's readme.
In order to prevent any loss of work it is best to clone the repo in a separate location to complete this task.
Create a new branch in your repo by using git checkout --orphan assets
# The trick is to link the DeviceSupport folder from the beta to the stable version. | |
# sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :) | |
# Support iOS 15 devices (Xcode 13.0) with Xcode 12.5: | |
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport | |
# Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions | |
# (A similar approach works for older versions too, just change the version number after DeviceSupport) |
#!/usr/bin/env ruby | |
require 'set' | |
UMBRELLA_HEADER_PATH = ARGV[0] # The path to the umbrella header containing all the headers | |
SOURCE_ROOT_PATH = ARGV[1] # The path containing the source files to convert (will be recursively searched) | |
FRAMEWORK_NAME = File.basename(UMBRELLA_HEADER_PATH, ".*") # Assumes that the framework name is the same as the umbrella header filename (e.g. "MyFramework" for "MyFramework.h") | |
UMBRELLA_IMPORT_REGEX = /#import\s+<#{FRAMEWORK_NAME}\/.+\.h>/ # Matches "#import <FrameworkName/Header.h>" | |
FRAMEWORK_HEADER_REGEX = /(?<=<#{FRAMEWORK_NAME}\/).+\.h(?=>)/ # Matches "Header.h" in "<FrameworkName/Header.h>" |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<!-- array of downloads. --> | |
<key>items</key> | |
<array> | |
<dict> | |
<!-- an array of assets to download --> |
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal | |
# make sure the output directory exists | |
mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" | |
# Step 1. Build Device and Simulator versions | |
xcodebuild -target "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build | |
xcodebuild -target "${PROJECT_NAME}" -configuration ${CONFIGURATION} -sdk iphonesimulator -arch x86_64 BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build | |
# Step 2. Copy the framework structure to the universal folder |
In this article, I'm going to explore a way that we can create views that implement custom Core Animation property animations in a natural way.
As we know, layers in iOS come in two flavours: Backing layers and hosted layers. The only difference between them is that the view acts as the layer delegate for its backing layer, but not for any hosted sublayers.
In order to implement the UIView
transactional animation blocks, UIView
disables all animations by default and then re-enables them individually as required. It does this using the actionForLayer:forKey:
method.
Somewhat strangely, UIView
doesn't enable animations for every property that CALayer
does by default. A notable example is the layer.contents
property, which is animatable by default for a hosted layer, but cannot be animated using a UIView
animation block.
post_install do |installer| | |
installer.project.targets.each do |target| | |
target.build_configurations.each do |configuration| | |
target.build_settings(configuration.name)['ONLY_ACTIVE_ARCH'] = 'NO' | |
end | |
end | |
end |