Sometimes we need to open Setting's Preferences not of our app, but of the iPhone itself. What should we do to acomplish this?
[UPDATE: Added Wallet And Apple Pay below]
[UPDATE: Changed prefs for Bluetooth]
exec > /tmp/${PROJECT_NAME}_archive.log 2>&1 | |
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal | |
if [ "true" == ${ALREADYINVOKED:-false} ] | |
then | |
echo "RECURSION: Detected, stopping" | |
else | |
export ALREADYINVOKED="true" |
exec > /tmp/${PROJECT_NAME}_archive.log 2>&1 | |
FRAMEWORK_NAME="YOUR-FRAMEWORK-NAME" | |
cd ${SRCROOT}/Pods/${FRAMEWORK_NAME}/ | |
echo "🚀backup ${SRCROOT}/Pods/${FRAMEWORK_NAME}/${FRAMEWORK_NAME}.framework" | |
if [ -f "${FRAMEWORK_NAME}.zip" ] | |
then |
exec >> /tmp/${PROJECT_NAME}_archive.log 2>&1 | |
FRAMEWORK_NAME="YOUR-FRAMEWORK-NAME" | |
cd ${SRCROOT}/Pods/${FRAMEWORK_NAME}/ | |
echo "🚀restore ${SRCROOT}/Pods/${FRAMEWORK_NAME}" | |
rm -rf ./${FRAMEWORK_NAME}.framework | |
unzip -o ${FRAMEWORK_NAME}.zip | |
rm -rf ${FRAMEWORK_NAME}.zip |
// | |
// OCCatch.h | |
// | |
// | |
#ifndef OCCatch_h | |
#define OCCatch_h | |
// add the code below to your -Bridging-Header.h | |
// To check if a number is between a range, don't do | |
if number >=0 && number <= 100 { | |
} | |
// Use range and news operators instead : | |
if 0...100 ~= number { | |
} |
class AsyncOperation: Operation { | |
enum State: String { | |
case Ready, Executing, Finished | |
fileprivate var keyPath: String { | |
return "is" + rawValue | |
} | |
} | |
var state = State.Ready { |
import Foundation | |
/// An abstract class that makes building simple asynchronous operations easy. | |
/// Subclasses must implement `execute()` to perform any work and call | |
/// `finish()` when they are done. All `NSOperation` work will be handled | |
/// automatically. | |
open class AsynchronousOperation: Operation { | |
// MARK: - Properties |
public extension Collection { | |
/// Returns the element at the specified index if it is within bounds, otherwise nil. | |
subscript (safe index: Index) -> Element? { | |
return indices.contains(index) ? self[index] : nil | |
} | |
} |
public extension CGSize { | |
public func rescale(_ scale: CGFloat) -> CGSize { | |
return applying(CGAffineTransform(scaleX: scale, y: scale)) | |
} | |
} |