mirror of
https://github.com/UrbanApps/Armchair.git
synced 2026-01-11 21:10:23 +01:00
Mac Example Project working
This commit is contained in:
@@ -8,9 +8,7 @@
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
E6D8B8F119C756A4001AD043 /* Armchair.swift in Sources */ = {isa = PBXBuildFile; fileRef = F897FF4019AA800700AB5182 /* Armchair.swift */; };
|
||||
E6D8B8F419C756A4001AD043 /* Armchair.h in Headers */ = {isa = PBXBuildFile; fileRef = F8111E3819A95C8B0040E7D1 /* Armchair.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E6D8B92D19C880A9001AD043 /* ArmchairTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6D8B92C19C880A9001AD043 /* ArmchairTests.swift */; };
|
||||
F8111E3919A95C8B0040E7D1 /* Armchair.h in Headers */ = {isa = PBXBuildFile; fileRef = F8111E3819A95C8B0040E7D1 /* Armchair.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
F897FF4119AA800700AB5182 /* Armchair.swift in Sources */ = {isa = PBXBuildFile; fileRef = F897FF4019AA800700AB5182 /* Armchair.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
@@ -108,25 +106,6 @@
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
E6D8B8F319C756A4001AD043 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
E6D8B8F419C756A4001AD043 /* Armchair.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
F8111E3019A95C8B0040E7D1 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
F8111E3919A95C8B0040E7D1 /* Armchair.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
E6D8B8EF19C756A4001AD043 /* ArmchairMac */ = {
|
||||
isa = PBXNativeTarget;
|
||||
@@ -134,7 +113,6 @@
|
||||
buildPhases = (
|
||||
E6D8B8F019C756A4001AD043 /* Sources */,
|
||||
E6D8B8F219C756A4001AD043 /* Frameworks */,
|
||||
E6D8B8F319C756A4001AD043 /* Headers */,
|
||||
E6D8B8F519C756A4001AD043 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
@@ -170,7 +148,6 @@
|
||||
buildPhases = (
|
||||
F8111E2E19A95C8B0040E7D1 /* Sources */,
|
||||
F8111E2F19A95C8B0040E7D1 /* Frameworks */,
|
||||
F8111E3019A95C8B0040E7D1 /* Headers */,
|
||||
F8111E3119A95C8B0040E7D1 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
//
|
||||
// AppDelegate.h
|
||||
// Mac Example
|
||||
//
|
||||
// Created by Matt Coneybeare on 9/15/14.
|
||||
// Copyright (c) 2014 Armchair. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface AppDelegate : NSObject <NSApplicationDelegate>
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
//
|
||||
// AppDelegate.m
|
||||
// Mac Example
|
||||
//
|
||||
// Created by Matt Coneybeare on 9/15/14.
|
||||
// Copyright (c) 2014 Armchair. All rights reserved.
|
||||
//
|
||||
|
||||
#import "AppDelegate.h"
|
||||
|
||||
@import Armchair;
|
||||
|
||||
//#import "Armchair-Bridging-Header.h"
|
||||
|
||||
@interface AppDelegate ()
|
||||
|
||||
@property (weak) IBOutlet NSWindow *window;
|
||||
|
||||
@end
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
|
||||
// Insert code here to initialize your application
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(NSNotification *)aNotification {
|
||||
// Insert code here to tear down your application
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -20,13 +20,39 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
import UIKit
|
||||
#if os(iOS)
|
||||
|
||||
import UIKit
|
||||
|
||||
@UIApplicationMain
|
||||
class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
var window: UIWindow?
|
||||
|
||||
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
let iPhoto = "497786065" // iPhoto iOS
|
||||
|
||||
#elseif os(OSX)
|
||||
|
||||
import Cocoa
|
||||
|
||||
@NSApplicationMain
|
||||
class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
@IBOutlet weak var window: NSWindow!
|
||||
|
||||
}
|
||||
|
||||
let iPhoto = "408981381" // iPhoto Mac
|
||||
|
||||
#else
|
||||
#endif
|
||||
|
||||
import Armchair
|
||||
|
||||
@UIApplicationMain
|
||||
class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
|
||||
// MARK: - UIApplicationDelegate
|
||||
extension AppDelegate {
|
||||
|
||||
override class func initialize() {
|
||||
AppDelegate.setupArmchair()
|
||||
@@ -36,23 +62,15 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
// Normally, all the setup would be here.
|
||||
// But, because we are presenting a few different setups in the example,
|
||||
// The config will be in the view controllers
|
||||
// Armchair.appID("364709193") // iBooks
|
||||
// Armchair.appID("408981381") // iPhoto
|
||||
//
|
||||
// It is always best to load Armchair as early as possible
|
||||
// because it needs to receive application life-cycle notifications
|
||||
//
|
||||
// NOTE: The appID call always has to go before any other Armchair calls
|
||||
Armchair.appID("364709193")
|
||||
Armchair.appID(iPhoto)
|
||||
Armchair.debugEnabled(true)
|
||||
}
|
||||
|
||||
var window: UIWindow?
|
||||
|
||||
// MARK: - UIApplicationDelegate
|
||||
|
||||
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6245" systemVersion="13E28" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="d2j-86-NpT">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6246" systemVersion="14A238x" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="d2j-86-NpT">
|
||||
<dependencies>
|
||||
<deployment defaultVersion="1792" identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6238"/>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6239"/>
|
||||
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
@@ -89,9 +89,24 @@
|
||||
</mask>
|
||||
</variation>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="aGK-R4-nip">
|
||||
<rect key="frame" x="260" y="576" width="80" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="16" id="4bP-kT-OTg"/>
|
||||
<constraint firstAttribute="width" constant="80" id="68m-Sb-pvw"/>
|
||||
</constraints>
|
||||
<state key="normal" image="logo.png" backgroundImage="logo.png">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="openUrbanApps:" destination="d2j-86-NpT" eventType="touchUpInside" id="gm5-65-hdf"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="aGK-R4-nip" firstAttribute="centerX" secondItem="p7K-BU-wrj" secondAttribute="centerX" id="0zC-Sb-exW"/>
|
||||
<constraint firstItem="pjK-Zp-UbQ" firstAttribute="leading" secondItem="mCe-MJ-dGn" secondAttribute="leadingMargin" constant="-16" id="1PY-yN-plZ"/>
|
||||
<constraint firstItem="MVO-Fx-XzJ" firstAttribute="top" secondItem="aGK-R4-nip" secondAttribute="bottom" constant="8" symbolic="YES" id="7FD-1f-35C"/>
|
||||
<constraint firstAttribute="centerX" secondItem="p7K-BU-wrj" secondAttribute="centerX" id="94T-zn-nPn"/>
|
||||
<constraint firstAttribute="centerY" secondItem="pjK-Zp-UbQ" secondAttribute="centerY" id="9s8-qH-i1P"/>
|
||||
<constraint firstItem="pjK-Zp-UbQ" firstAttribute="height" secondItem="mCe-MJ-dGn" secondAttribute="height" id="JIc-fT-UjL"/>
|
||||
@@ -131,6 +146,7 @@
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="armchair.jpg" width="800" height="736"/>
|
||||
<image name="logo.png" width="1480" height="306"/>
|
||||
</resources>
|
||||
<color key="tintColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</document>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6246" systemVersion="14A343f" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6246" systemVersion="14A238x" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="6246"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
@@ -12,7 +11,12 @@
|
||||
</customObject>
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<customObject id="Voe-Tx-rLC" customClass="AppDelegate"/>
|
||||
<customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModule="Mac_Example" customModuleProvider="target">
|
||||
<connections>
|
||||
<outlet property="window" destination="QvC-M9-y7g" id="gIp-Ho-8D9"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<viewController id="g9K-Nf-HDk" customClass="ViewController" customModule="Mac_Example" customModuleProvider="target"/>
|
||||
<customObject id="YLy-65-1bz" customClass="NSFontManager"/>
|
||||
<menu title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
|
||||
<items>
|
||||
@@ -663,41 +667,43 @@
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
<window title="Armchair" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" restorable="NO" oneShot="NO" releasedWhenClosed="NO" showsToolbarButton="NO" animationBehavior="default" id="bto-3a-wfe">
|
||||
<windowStyleMask key="styleMask" titled="YES" closable="YES"/>
|
||||
<rect key="contentRect" x="109" y="131" width="400" height="368"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="1280" height="777"/>
|
||||
<view key="contentView" id="hVr-LJ-oKw">
|
||||
<window title="Mac Example" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" showsToolbarButton="NO" animationBehavior="default" id="QvC-M9-y7g">
|
||||
<windowStyleMask key="styleMask" titled="YES"/>
|
||||
<rect key="contentRect" x="335" y="390" width="400" height="368"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="1280" height="800"/>
|
||||
<view key="contentView" id="EiT-Mj-1SZ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="400" height="368"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="jjf-Wt-2R4">
|
||||
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="JWk-MV-osx">
|
||||
<rect key="frame" x="0.0" y="0.0" width="400" height="368"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="400" id="0GU-Je-9ZD"/>
|
||||
<constraint firstAttribute="height" constant="368" id="jUA-a6-YPy"/>
|
||||
<constraint firstAttribute="height" constant="368" id="7CF-lb-e7D"/>
|
||||
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="368" id="YP8-WO-IWe"/>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="400" id="Z1K-eP-EFI"/>
|
||||
<constraint firstAttribute="width" constant="400" id="srN-Ty-yYG"/>
|
||||
</constraints>
|
||||
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="chair" id="Xcr-SR-MiY"/>
|
||||
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="armchair" id="cpa-BH-nca"/>
|
||||
</imageView>
|
||||
<box autoresizesSubviews="NO" borderType="line" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="cty-mq-dut">
|
||||
<box autoresizesSubviews="NO" borderType="line" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="0Gb-KD-yfU">
|
||||
<rect key="frame" x="17" y="237" width="366" height="113"/>
|
||||
<view key="contentView">
|
||||
<rect key="frame" x="1" y="1" width="364" height="111"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="veO-Nb-UBi">
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="YED-uj-VLq">
|
||||
<rect key="frame" x="16" y="42" width="332" height="81"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="328" id="Gqt-pY-oBj"/>
|
||||
<constraint firstAttribute="width" constant="328" id="DsT-g1-qyE"/>
|
||||
</constraints>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="ARMCHAIR" id="EYp-gG-Gcc">
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="ARMCHAIR" id="44X-yy-TzG">
|
||||
<font key="font" size="58" name="AmericanTypewriter-Light"/>
|
||||
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<button wantsLayer="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Gpb-SS-46g">
|
||||
<rect key="frame" x="18" y="4" width="85" height="32"/>
|
||||
<button wantsLayer="YES" translatesAutoresizingMaskIntoConstraints="NO" id="jkm-ga-2sM">
|
||||
<rect key="frame" x="48" y="4" width="85" height="32"/>
|
||||
<contentFilters>
|
||||
<ciFilter name="CIColorControls">
|
||||
<configuration>
|
||||
@@ -708,13 +714,16 @@
|
||||
</configuration>
|
||||
</ciFilter>
|
||||
</contentFilters>
|
||||
<buttonCell key="cell" type="bevel" title="Standard" bezelStyle="rounded" alignment="left" imageScaling="proportionallyDown" inset="2" id="nUJ-00-1Eo">
|
||||
<buttonCell key="cell" type="bevel" title="Standard" bezelStyle="rounded" alignment="left" imageScaling="proportionallyDown" inset="2" id="V69-cn-Kgl">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" size="18" name="AmericanTypewriter"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="presentStandardPrompt:" target="g9K-Nf-HDk" id="9aA-tR-lH1"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button wantsLayer="YES" translatesAutoresizingMaskIntoConstraints="NO" id="skQ-RU-TXZ">
|
||||
<rect key="frame" x="130" y="4" width="105" height="32"/>
|
||||
<button wantsLayer="YES" translatesAutoresizingMaskIntoConstraints="NO" id="yGG-Wr-1xP">
|
||||
<rect key="frame" x="211" y="4" width="105" height="32"/>
|
||||
<contentFilters>
|
||||
<ciFilter name="CIColorControls">
|
||||
<configuration>
|
||||
@@ -725,57 +734,58 @@
|
||||
</configuration>
|
||||
</ciFilter>
|
||||
</contentFilters>
|
||||
<buttonCell key="cell" type="bevel" title="Customized" bezelStyle="rounded" alignment="center" imageScaling="proportionallyDown" inset="2" id="9vi-TJ-xby">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" size="18" name="AmericanTypewriter"/>
|
||||
</buttonCell>
|
||||
</button>
|
||||
<button wantsLayer="YES" translatesAutoresizingMaskIntoConstraints="NO" id="8nJ-OJ-QBJ">
|
||||
<rect key="frame" x="263" y="4" width="83" height="32"/>
|
||||
<contentFilters>
|
||||
<ciFilter name="CIColorControls">
|
||||
<configuration>
|
||||
<real key="inputBrightness" value="1"/>
|
||||
<real key="inputContrast" value="1"/>
|
||||
<null key="inputImage"/>
|
||||
<real key="inputSaturation" value="1"/>
|
||||
</configuration>
|
||||
</ciFilter>
|
||||
</contentFilters>
|
||||
<buttonCell key="cell" type="bevel" title="Store-Kit" bezelStyle="rounded" alignment="right" imageScaling="proportionallyDown" inset="2" id="BZN-cN-XCt">
|
||||
<buttonCell key="cell" type="bevel" title="Customized" bezelStyle="rounded" alignment="center" imageScaling="proportionallyDown" inset="2" id="cV4-59-VPY">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" size="18" name="AmericanTypewriter"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="presentCustomizedPrompt:" target="g9K-Nf-HDk" id="4g2-ob-RcM"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
</view>
|
||||
<constraints>
|
||||
<constraint firstItem="skQ-RU-TXZ" firstAttribute="bottom" secondItem="8nJ-OJ-QBJ" secondAttribute="bottom" id="AHl-4p-zz3"/>
|
||||
<constraint firstItem="Gpb-SS-46g" firstAttribute="bottom" secondItem="skQ-RU-TXZ" secondAttribute="bottom" id="Cdc-Ln-HuE"/>
|
||||
<constraint firstItem="veO-Nb-UBi" firstAttribute="leading" secondItem="Gpb-SS-46g" secondAttribute="leading" id="Fl3-VR-Itj"/>
|
||||
<constraint firstItem="veO-Nb-UBi" firstAttribute="top" secondItem="cty-mq-dut" secondAttribute="top" constant="-13" id="TeM-YD-1RY"/>
|
||||
<constraint firstItem="skQ-RU-TXZ" firstAttribute="top" secondItem="veO-Nb-UBi" secondAttribute="bottom" constant="6" id="Z0N-U1-tGq"/>
|
||||
<constraint firstAttribute="centerX" secondItem="veO-Nb-UBi" secondAttribute="centerX" id="fMk-ei-Xc5"/>
|
||||
<constraint firstItem="veO-Nb-UBi" firstAttribute="centerX" secondItem="skQ-RU-TXZ" secondAttribute="centerX" constant="-0.5" id="rFH-To-Owl"/>
|
||||
<constraint firstItem="veO-Nb-UBi" firstAttribute="trailing" secondItem="8nJ-OJ-QBJ" secondAttribute="trailing" id="v2I-4p-5tW"/>
|
||||
<constraint firstAttribute="centerX" secondItem="YED-uj-VLq" secondAttribute="centerX" id="0D2-Qc-szZ"/>
|
||||
<constraint firstItem="YED-uj-VLq" firstAttribute="top" secondItem="0Gb-KD-yfU" secondAttribute="top" constant="-13" id="0dP-ks-bhc"/>
|
||||
<constraint firstItem="yGG-Wr-1xP" firstAttribute="top" secondItem="YED-uj-VLq" secondAttribute="bottom" constant="6" id="FTY-wK-gxK"/>
|
||||
<constraint firstItem="YED-uj-VLq" firstAttribute="leading" secondItem="jkm-ga-2sM" secondAttribute="leading" constant="-30" id="V7U-7Z-CIK"/>
|
||||
<constraint firstItem="jkm-ga-2sM" firstAttribute="bottom" secondItem="yGG-Wr-1xP" secondAttribute="bottom" id="WZR-Hf-JcJ"/>
|
||||
<constraint firstAttribute="height" constant="107" id="aN9-Sz-28k"/>
|
||||
<constraint firstItem="yGG-Wr-1xP" firstAttribute="trailing" secondItem="YED-uj-VLq" secondAttribute="trailing" constant="-30" id="iUR-We-Kf1"/>
|
||||
</constraints>
|
||||
<color key="borderColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="fillColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
</box>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="OSk-p7-dUM">
|
||||
<rect key="frame" x="312" y="8" width="80" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="16" id="GCp-UZ-7Tt"/>
|
||||
<constraint firstAttribute="width" constant="80" id="GXx-vv-2Cx"/>
|
||||
</constraints>
|
||||
<buttonCell key="cell" type="bevel" bezelStyle="rounded" image="logo" imagePosition="only" alignment="center" alternateImage="logo" imageScaling="proportionallyDown" inset="2" id="vhG-ei-xnV">
|
||||
<behavior key="behavior" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="openUrbanApps:" target="g9K-Nf-HDk" id="p5P-Rh-N1T"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="cty-mq-dut" firstAttribute="top" secondItem="hVr-LJ-oKw" secondAttribute="top" constant="20" id="5TT-e2-zlu"/>
|
||||
<constraint firstAttribute="bottom" secondItem="cty-mq-dut" secondAttribute="bottom" constant="241" id="D3g-FX-vGa"/>
|
||||
<constraint firstItem="cty-mq-dut" firstAttribute="leading" secondItem="hVr-LJ-oKw" secondAttribute="leading" constant="20" id="HlB-Tt-8Ah"/>
|
||||
<constraint firstAttribute="centerX" secondItem="jjf-Wt-2R4" secondAttribute="centerX" id="L3p-DY-upx"/>
|
||||
<constraint firstAttribute="trailing" secondItem="cty-mq-dut" secondAttribute="trailing" constant="20" id="jvT-30-jX8"/>
|
||||
<constraint firstAttribute="centerY" secondItem="jjf-Wt-2R4" secondAttribute="centerY" id="mWU-xg-aUM"/>
|
||||
<constraint firstAttribute="centerY" secondItem="JWk-MV-osx" secondAttribute="centerY" id="1QU-qd-5HF"/>
|
||||
<constraint firstAttribute="centerX" secondItem="JWk-MV-osx" secondAttribute="centerX" id="4MA-hd-vMN"/>
|
||||
<constraint firstItem="0Gb-KD-yfU" firstAttribute="top" secondItem="EiT-Mj-1SZ" secondAttribute="top" constant="20" id="BgQ-mm-2V4"/>
|
||||
<constraint firstAttribute="bottom" secondItem="OSk-p7-dUM" secondAttribute="bottom" constant="8" id="Eg9-AS-cIz"/>
|
||||
<constraint firstAttribute="trailing" secondItem="0Gb-KD-yfU" secondAttribute="trailing" constant="20" id="Jd9-NU-hNd"/>
|
||||
<constraint firstAttribute="centerX" secondItem="0Gb-KD-yfU" secondAttribute="centerX" id="JvA-go-nfg"/>
|
||||
<constraint firstItem="OSk-p7-dUM" firstAttribute="centerX" secondItem="0Gb-KD-yfU" secondAttribute="centerX" constant="152" id="NDh-HU-3OR"/>
|
||||
<constraint firstItem="0Gb-KD-yfU" firstAttribute="leading" secondItem="EiT-Mj-1SZ" secondAttribute="leading" constant="20" id="SUA-nW-p1P"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<point key="canvasLocation" x="294" y="113"/>
|
||||
</window>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="chair" width="800" height="736"/>
|
||||
<image name="armchair" width="800" height="736"/>
|
||||
<image name="logo" width="1480" height="306"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
||||
@@ -20,16 +20,24 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#if os(iOS)
|
||||
import UIKit
|
||||
class ViewController: UIViewController { }
|
||||
#elseif os(OSX)
|
||||
import Cocoa
|
||||
class ViewController: NSViewController { }
|
||||
#else
|
||||
#endif
|
||||
|
||||
import Armchair
|
||||
|
||||
class ViewController: UIViewController {
|
||||
extension ViewController {
|
||||
|
||||
@IBAction func presentStandardPrompt(AnyObject) {
|
||||
resetAppReviewManager()
|
||||
|
||||
// The AppID is the only required setup
|
||||
Armchair.appID("364709193") // iBooks
|
||||
Armchair.appID(iPhoto)
|
||||
|
||||
// Debug means that it will popup on the next available change
|
||||
Armchair.debugEnabled(true)
|
||||
@@ -42,7 +50,7 @@ class ViewController: UIViewController {
|
||||
resetAppReviewManager()
|
||||
|
||||
// The AppID is the only required setup
|
||||
Armchair.appID("364709193") // iBooks
|
||||
Armchair.appID(iPhoto)
|
||||
|
||||
// Debug means that it will popup on the next available change
|
||||
Armchair.debugEnabled(true)
|
||||
@@ -95,9 +103,10 @@ class ViewController: UIViewController {
|
||||
Armchair.onDidDisplayAlert() { println("[Example App] We just displayed the rating prompt") }
|
||||
Armchair.onDidOptToRate() { println("[Example App] The user just opted to rate") }
|
||||
Armchair.onDidOptToRemindLater({ println("[Example App] The user just opted to remind later") })
|
||||
#if os(iOS)
|
||||
Armchair.onWillPresentModalView({ println("[Example App] About to present the modal view. Animated: \($0)") })
|
||||
Armchair.onDidDismissModalView({ println("[Example App] Just dismissed the modal view. Animated: \($0)") })
|
||||
|
||||
#endif
|
||||
// Armchair has sensible defaults for the NSUserDefault keys it uses, but you can customize that here
|
||||
Armchair.setKey("kSettingsSignificantEventTally", ArmchairKey.SignificantEventCount)
|
||||
|
||||
@@ -124,12 +133,13 @@ class ViewController: UIViewController {
|
||||
return true
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
#if os(iOS)
|
||||
@IBAction func presentStoreKitPrompt(AnyObject) {
|
||||
resetAppReviewManager()
|
||||
|
||||
// The AppID is the only required setup
|
||||
Armchair.appID("364709193") // iBooks
|
||||
Armchair.appID(iPhoto)
|
||||
|
||||
// Debug means that it will popup on the next available change
|
||||
Armchair.debugEnabled(true)
|
||||
@@ -145,8 +155,19 @@ class ViewController: UIViewController {
|
||||
// true here means it is ok to show, but it doesn't matter because we have debug on.
|
||||
Armchair.userDidSignificantEvent(true)
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
func resetAppReviewManager() {
|
||||
Armchair.resetDefaults()
|
||||
}
|
||||
|
||||
@IBAction func openUrbanApps(AnyObject) {
|
||||
let url = NSURL(string: "http://urbanapps.com")
|
||||
#if os(iOS)
|
||||
UIApplication.sharedApplication().openURL(url!)
|
||||
#elseif os(OSX)
|
||||
NSWorkspace.sharedWorkspace().openURL(url)
|
||||
#else
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
BIN
Example/logo.png
Normal file
BIN
Example/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
@@ -7,156 +7,151 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
E671B64619C8D6CB00851BFD /* Armchair.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E6631F6E19C8CA5C00F5F4EA /* Armchair.framework */; };
|
||||
E6BB678A19C8D1720031C112 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E6BB678119C8D1720031C112 /* AppDelegate.m */; };
|
||||
E6BB678C19C8D1720031C112 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = E6BB678519C8D1720031C112 /* MainMenu.xib */; };
|
||||
E6BB678F19C8D1720031C112 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = E6BB678919C8D1720031C112 /* main.m */; };
|
||||
E6E5F4C519C8E1A4008A6C1B /* armchair.jpg in Resources */ = {isa = PBXBuildFile; fileRef = E6E5F4C419C8E1A4008A6C1B /* armchair.jpg */; };
|
||||
E60FA7C019C908FE00179D70 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E60FA7BF19C908FE00179D70 /* AppDelegate.swift */; };
|
||||
E60FA7F119C90C7D00179D70 /* armchair.jpg in Resources */ = {isa = PBXBuildFile; fileRef = E60FA7E819C90C7D00179D70 /* armchair.jpg */; };
|
||||
E60FA7F419C90C7D00179D70 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = E60FA7EE19C90C7D00179D70 /* Icon.png */; };
|
||||
E60FA7F519C90C7D00179D70 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E60FA7EF19C90C7D00179D70 /* Images.xcassets */; };
|
||||
E60FA80519C90D8F00179D70 /* Armchair.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E60FA80019C90D3500179D70 /* Armchair.framework */; };
|
||||
E60FA80A19C9123800179D70 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E60FA80919C9123800179D70 /* ViewController.swift */; };
|
||||
E60FA81319C9172A00179D70 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = E60FA81119C9172A00179D70 /* MainMenu.xib */; };
|
||||
E60FA81619C91FA300179D70 /* logo.png in Resources */ = {isa = PBXBuildFile; fileRef = E60FA81519C91FA300179D70 /* logo.png */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
E6631F6B19C8CA5C00F5F4EA /* PBXContainerItemProxy */ = {
|
||||
E60FA7FD19C90D3500179D70 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = E6631F6519C8CA5C00F5F4EA /* Armchair.xcodeproj */;
|
||||
containerPortal = E60FA7F719C90D3500179D70 /* Armchair.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = E6D8B8B519C7274F001AD043;
|
||||
remoteInfo = Armchair;
|
||||
};
|
||||
E6631F6D19C8CA5C00F5F4EA /* PBXContainerItemProxy */ = {
|
||||
E60FA7FF19C90D3500179D70 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = E6631F6519C8CA5C00F5F4EA /* Armchair.xcodeproj */;
|
||||
containerPortal = E60FA7F719C90D3500179D70 /* Armchair.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = E6D8B8F919C756A4001AD043;
|
||||
remoteInfo = ArmchairMac;
|
||||
};
|
||||
E6631F6F19C8CA5C00F5F4EA /* PBXContainerItemProxy */ = {
|
||||
E60FA80119C90D3500179D70 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = E6631F6519C8CA5C00F5F4EA /* Armchair.xcodeproj */;
|
||||
containerPortal = E60FA7F719C90D3500179D70 /* Armchair.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = E6D8B92819C880A9001AD043;
|
||||
remoteInfo = ArmchairTests;
|
||||
};
|
||||
E6E5F4BC19C8DFA3008A6C1B /* PBXContainerItemProxy */ = {
|
||||
E60FA80319C90D7100179D70 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = E6631F6519C8CA5C00F5F4EA /* Armchair.xcodeproj */;
|
||||
containerPortal = E60FA7F719C90D3500179D70 /* Armchair.xcodeproj */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = E6D8B8EF19C756A4001AD043;
|
||||
remoteInfo = ArmchairMac;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
E6631F7319C8CAF200F5F4EA /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 7;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
E6631F6519C8CA5C00F5F4EA /* Armchair.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = Armchair.xcodeproj; sourceTree = "<group>"; };
|
||||
E6BB678019C8D1720031C112 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Example/AppDelegate.h; sourceTree = "<group>"; };
|
||||
E6BB678119C8D1720031C112 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Example/AppDelegate.m; sourceTree = "<group>"; };
|
||||
E6BB678619C8D1720031C112 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = MainMenu.xib; sourceTree = "<group>"; };
|
||||
E6BB678819C8D1720031C112 /* Info-Mac.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "Info-Mac.plist"; path = "Example/Info-Mac.plist"; sourceTree = "<group>"; };
|
||||
E6BB678919C8D1720031C112 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Example/main.m; sourceTree = "<group>"; };
|
||||
E6D8B8C719C75292001AD043 /* Mac Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Mac Example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
E6E5F4C419C8E1A4008A6C1B /* armchair.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; name = armchair.jpg; path = Example/armchair.jpg; sourceTree = "<group>"; };
|
||||
E60FA7BA19C908FE00179D70 /* Mac Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Mac Example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
E60FA7BF19C908FE00179D70 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = Example/AppDelegate.swift; sourceTree = "<group>"; };
|
||||
E60FA7E819C90C7D00179D70 /* armchair.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; name = armchair.jpg; path = Example/armchair.jpg; sourceTree = SOURCE_ROOT; };
|
||||
E60FA7EE19C90C7D00179D70 /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Icon.png; path = Example/Icon.png; sourceTree = SOURCE_ROOT; };
|
||||
E60FA7EF19C90C7D00179D70 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = Example/Images.xcassets; sourceTree = SOURCE_ROOT; };
|
||||
E60FA7F019C90C7D00179D70 /* Info-Mac.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "Info-Mac.plist"; path = "Example/Info-Mac.plist"; sourceTree = SOURCE_ROOT; };
|
||||
E60FA7F719C90D3500179D70 /* Armchair.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = Armchair.xcodeproj; sourceTree = "<group>"; };
|
||||
E60FA80919C9123800179D70 /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ViewController.swift; path = Example/ViewController.swift; sourceTree = "<group>"; };
|
||||
E60FA81219C9172A00179D70 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Example/Base.lproj/MainMenu.xib; sourceTree = SOURCE_ROOT; };
|
||||
E60FA81519C91FA300179D70 /* logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = logo.png; path = Example/logo.png; sourceTree = SOURCE_ROOT; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
E6D8B8C419C75292001AD043 /* Frameworks */ = {
|
||||
E60FA7B719C908FE00179D70 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
E671B64619C8D6CB00851BFD /* Armchair.framework in Frameworks */,
|
||||
E60FA80519C90D8F00179D70 /* Armchair.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
E6631F6619C8CA5C00F5F4EA /* Products */ = {
|
||||
E60FA7B119C908FE00179D70 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E6631F6C19C8CA5C00F5F4EA /* Armchair.framework */,
|
||||
E6631F6E19C8CA5C00F5F4EA /* Armchair.framework */,
|
||||
E6631F7019C8CA5C00F5F4EA /* ArmchairTests.xctest */,
|
||||
E60FA7E319C909D100179D70 /* Source */,
|
||||
E60FA7F719C90D3500179D70 /* Armchair.xcodeproj */,
|
||||
E60FA7BA19C908FE00179D70 /* Mac Example.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E6BB679019C8D1800031C112 /* Source */ = {
|
||||
E60FA7BC19C908FE00179D70 /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E6BB678019C8D1720031C112 /* AppDelegate.h */,
|
||||
E6BB678119C8D1720031C112 /* AppDelegate.m */,
|
||||
E6BB678519C8D1720031C112 /* MainMenu.xib */,
|
||||
E6BB679119C8D1AB0031C112 /* Supporting Files */,
|
||||
E60FA81119C9172A00179D70 /* MainMenu.xib */,
|
||||
E60FA7E819C90C7D00179D70 /* armchair.jpg */,
|
||||
E60FA7EE19C90C7D00179D70 /* Icon.png */,
|
||||
E60FA81519C91FA300179D70 /* logo.png */,
|
||||
E60FA7EF19C90C7D00179D70 /* Images.xcassets */,
|
||||
E60FA7F019C90C7D00179D70 /* Info-Mac.plist */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
path = "Mac Example";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E60FA7E319C909D100179D70 /* Source */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E60FA7BF19C908FE00179D70 /* AppDelegate.swift */,
|
||||
E60FA80919C9123800179D70 /* ViewController.swift */,
|
||||
E60FA7BC19C908FE00179D70 /* Supporting Files */,
|
||||
);
|
||||
name = Source;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E6BB679119C8D1AB0031C112 /* Supporting Files */ = {
|
||||
E60FA7F819C90D3500179D70 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E6E5F4C419C8E1A4008A6C1B /* armchair.jpg */,
|
||||
E6BB678819C8D1720031C112 /* Info-Mac.plist */,
|
||||
E6BB678919C8D1720031C112 /* main.m */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E6D8B8BE19C75292001AD043 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E6BB679019C8D1800031C112 /* Source */,
|
||||
E6631F6519C8CA5C00F5F4EA /* Armchair.xcodeproj */,
|
||||
E6D8B8C719C75292001AD043 /* Mac Example.app */,
|
||||
E60FA7FE19C90D3500179D70 /* Armchair.framework */,
|
||||
E60FA80019C90D3500179D70 /* Armchair.framework */,
|
||||
E60FA80219C90D3500179D70 /* ArmchairTests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
E6D8B8C619C75292001AD043 /* Mac Example */ = {
|
||||
E60FA7B919C908FE00179D70 /* Mac Example */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = E6D8B8E419C75292001AD043 /* Build configuration list for PBXNativeTarget "Mac Example" */;
|
||||
buildConfigurationList = E60FA7D419C908FE00179D70 /* Build configuration list for PBXNativeTarget "Mac Example" */;
|
||||
buildPhases = (
|
||||
E6D8B8C319C75292001AD043 /* Sources */,
|
||||
E6D8B8C419C75292001AD043 /* Frameworks */,
|
||||
E6D8B8C519C75292001AD043 /* Resources */,
|
||||
E6631F7319C8CAF200F5F4EA /* CopyFiles */,
|
||||
E60FA7B619C908FE00179D70 /* Sources */,
|
||||
E60FA7B719C908FE00179D70 /* Frameworks */,
|
||||
E60FA7B819C908FE00179D70 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
E6E5F4BD19C8DFA3008A6C1B /* PBXTargetDependency */,
|
||||
E60FA80419C90D7100179D70 /* PBXTargetDependency */,
|
||||
);
|
||||
name = "Mac Example";
|
||||
productName = "Mac Example";
|
||||
productReference = E6D8B8C719C75292001AD043 /* Mac Example.app */;
|
||||
productReference = E60FA7BA19C908FE00179D70 /* Mac Example.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
E6D8B8BF19C75292001AD043 /* Project object */ = {
|
||||
E60FA7B219C908FE00179D70 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0600;
|
||||
LastUpgradeCheck = 0610;
|
||||
ORGANIZATIONNAME = Armchair;
|
||||
TargetAttributes = {
|
||||
E6D8B8C619C75292001AD043 = {
|
||||
CreatedOnToolsVersion = 6.0;
|
||||
E60FA7B919C908FE00179D70 = {
|
||||
CreatedOnToolsVersion = 6.1;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = E6D8B8C219C75292001AD043 /* Build configuration list for PBXProject "Mac Example" */;
|
||||
buildConfigurationList = E60FA7B519C908FE00179D70 /* Build configuration list for PBXProject "Mac Example" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
@@ -164,92 +159,94 @@
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = E6D8B8BE19C75292001AD043;
|
||||
productRefGroup = E6D8B8BE19C75292001AD043;
|
||||
mainGroup = E60FA7B119C908FE00179D70;
|
||||
productRefGroup = E60FA7B119C908FE00179D70;
|
||||
projectDirPath = "";
|
||||
projectReferences = (
|
||||
{
|
||||
ProductGroup = E6631F6619C8CA5C00F5F4EA /* Products */;
|
||||
ProjectRef = E6631F6519C8CA5C00F5F4EA /* Armchair.xcodeproj */;
|
||||
ProductGroup = E60FA7F819C90D3500179D70 /* Products */;
|
||||
ProjectRef = E60FA7F719C90D3500179D70 /* Armchair.xcodeproj */;
|
||||
},
|
||||
);
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
E6D8B8C619C75292001AD043 /* Mac Example */,
|
||||
E60FA7B919C908FE00179D70 /* Mac Example */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXReferenceProxy section */
|
||||
E6631F6C19C8CA5C00F5F4EA /* Armchair.framework */ = {
|
||||
E60FA7FE19C90D3500179D70 /* Armchair.framework */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = wrapper.framework;
|
||||
path = Armchair.framework;
|
||||
remoteRef = E6631F6B19C8CA5C00F5F4EA /* PBXContainerItemProxy */;
|
||||
remoteRef = E60FA7FD19C90D3500179D70 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
E6631F6E19C8CA5C00F5F4EA /* Armchair.framework */ = {
|
||||
E60FA80019C90D3500179D70 /* Armchair.framework */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = wrapper.framework;
|
||||
path = Armchair.framework;
|
||||
remoteRef = E6631F6D19C8CA5C00F5F4EA /* PBXContainerItemProxy */;
|
||||
remoteRef = E60FA7FF19C90D3500179D70 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
E6631F7019C8CA5C00F5F4EA /* ArmchairTests.xctest */ = {
|
||||
E60FA80219C90D3500179D70 /* ArmchairTests.xctest */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = wrapper.cfbundle;
|
||||
path = ArmchairTests.xctest;
|
||||
remoteRef = E6631F6F19C8CA5C00F5F4EA /* PBXContainerItemProxy */;
|
||||
remoteRef = E60FA80119C90D3500179D70 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
/* End PBXReferenceProxy section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
E6D8B8C519C75292001AD043 /* Resources */ = {
|
||||
E60FA7B819C908FE00179D70 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
E6E5F4C519C8E1A4008A6C1B /* armchair.jpg in Resources */,
|
||||
E6BB678C19C8D1720031C112 /* MainMenu.xib in Resources */,
|
||||
E60FA7F419C90C7D00179D70 /* Icon.png in Resources */,
|
||||
E60FA81619C91FA300179D70 /* logo.png in Resources */,
|
||||
E60FA81319C9172A00179D70 /* MainMenu.xib in Resources */,
|
||||
E60FA7F519C90C7D00179D70 /* Images.xcassets in Resources */,
|
||||
E60FA7F119C90C7D00179D70 /* armchair.jpg in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
E6D8B8C319C75292001AD043 /* Sources */ = {
|
||||
E60FA7B619C908FE00179D70 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
E6BB678F19C8D1720031C112 /* main.m in Sources */,
|
||||
E6BB678A19C8D1720031C112 /* AppDelegate.m in Sources */,
|
||||
E60FA80A19C9123800179D70 /* ViewController.swift in Sources */,
|
||||
E60FA7C019C908FE00179D70 /* AppDelegate.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
E6E5F4BD19C8DFA3008A6C1B /* PBXTargetDependency */ = {
|
||||
E60FA80419C90D7100179D70 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
name = ArmchairMac;
|
||||
targetProxy = E6E5F4BC19C8DFA3008A6C1B /* PBXContainerItemProxy */;
|
||||
targetProxy = E60FA80319C90D7100179D70 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
E6BB678519C8D1720031C112 /* MainMenu.xib */ = {
|
||||
E60FA81119C9172A00179D70 /* MainMenu.xib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
E6BB678619C8D1720031C112 /* Base */,
|
||||
E60FA81219C9172A00179D70 /* Base */,
|
||||
);
|
||||
name = MainMenu.xib;
|
||||
path = Example/Base.lproj;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
E6D8B8E219C75292001AD043 /* Debug */ = {
|
||||
E60FA7D219C908FE00179D70 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
@@ -283,14 +280,15 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
E6D8B8E319C75292001AD043 /* Release */ = {
|
||||
E60FA7D319C908FE00179D70 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
@@ -319,40 +317,30 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
E6D8B8E519C75292001AD043 /* Debug */ = {
|
||||
E60FA7D519C908FE00179D70 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
EMBEDDED_CONTENT_CONTAINS_SWIFT = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/build/Debug",
|
||||
);
|
||||
INFOPLIST_FILE = "$(SRCROOT)/Example/Info-Mac.plist";
|
||||
INFOPLIST_FILE = "Example/Info-Mac.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
E6D8B8E619C75292001AD043 /* Release */ = {
|
||||
E60FA7D619C908FE00179D70 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
EMBEDDED_CONTENT_CONTAINS_SWIFT = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/build/Debug",
|
||||
);
|
||||
INFOPLIST_FILE = "$(SRCROOT)/Example/Info-Mac.plist";
|
||||
INFOPLIST_FILE = "Example/Info-Mac.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Release;
|
||||
@@ -360,25 +348,25 @@
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
E6D8B8C219C75292001AD043 /* Build configuration list for PBXProject "Mac Example" */ = {
|
||||
E60FA7B519C908FE00179D70 /* Build configuration list for PBXProject "Mac Example" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
E6D8B8E219C75292001AD043 /* Debug */,
|
||||
E6D8B8E319C75292001AD043 /* Release */,
|
||||
E60FA7D219C908FE00179D70 /* Debug */,
|
||||
E60FA7D319C908FE00179D70 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
E6D8B8E419C75292001AD043 /* Build configuration list for PBXNativeTarget "Mac Example" */ = {
|
||||
E60FA7D419C908FE00179D70 /* Build configuration list for PBXNativeTarget "Mac Example" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
E6D8B8E519C75292001AD043 /* Debug */,
|
||||
E6D8B8E619C75292001AD043 /* Release */,
|
||||
E60FA7D519C908FE00179D70 /* Debug */,
|
||||
E60FA7D619C908FE00179D70 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = E6D8B8BF19C75292001AD043 /* Project object */;
|
||||
rootObject = E60FA7B219C908FE00179D70 /* Project object */;
|
||||
}
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
|
||||
<false/>
|
||||
<key>IDESourceControlProjectIdentifier</key>
|
||||
<string>FB71943B-E489-41AE-8AD8-62BD5AFECCF8</string>
|
||||
<key>IDESourceControlProjectName</key>
|
||||
<string>Mac Example</string>
|
||||
<key>IDESourceControlProjectOriginsDictionary</key>
|
||||
<dict>
|
||||
<key>6094D9F4198D56F78EB1B455EC894F8A44DC0039</key>
|
||||
<string>github.com:UrbanApps/Armchair.git</string>
|
||||
</dict>
|
||||
<key>IDESourceControlProjectPath</key>
|
||||
<string>Mac Example/Mac Example.xcodeproj</string>
|
||||
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
|
||||
<dict>
|
||||
<key>6094D9F4198D56F78EB1B455EC894F8A44DC0039</key>
|
||||
<string>../../..</string>
|
||||
</dict>
|
||||
<key>IDESourceControlProjectURL</key>
|
||||
<string>github.com:UrbanApps/Armchair.git</string>
|
||||
<key>IDESourceControlProjectVersion</key>
|
||||
<integer>111</integer>
|
||||
<key>IDESourceControlProjectWCCIdentifier</key>
|
||||
<string>6094D9F4198D56F78EB1B455EC894F8A44DC0039</string>
|
||||
<key>IDESourceControlProjectWCConfigurations</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
|
||||
<string>public.vcs.git</string>
|
||||
<key>IDESourceControlWCCIdentifierKey</key>
|
||||
<string>6094D9F4198D56F78EB1B455EC894F8A44DC0039</string>
|
||||
<key>IDESourceControlWCCName</key>
|
||||
<string>Armchair</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -1,110 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0610"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "E6D8B8C619C75292001AD043"
|
||||
BuildableName = "Mac Example.app"
|
||||
BlueprintName = "Mac Example"
|
||||
ReferencedContainer = "container:Mac Example.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "NO"
|
||||
buildForArchiving = "NO"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "E6D8B8D919C75292001AD043"
|
||||
BuildableName = "Mac ExampleTests.xctest"
|
||||
BlueprintName = "Mac ExampleTests"
|
||||
ReferencedContainer = "container:Mac Example.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
buildConfiguration = "Debug">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "E6D8B8D919C75292001AD043"
|
||||
BuildableName = "Mac ExampleTests.xctest"
|
||||
BlueprintName = "Mac ExampleTests"
|
||||
ReferencedContainer = "container:Mac Example.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "E6D8B8C619C75292001AD043"
|
||||
BuildableName = "Mac Example.app"
|
||||
BlueprintName = "Mac Example"
|
||||
ReferencedContainer = "container:Mac Example.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Debug"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "E6D8B8C619C75292001AD043"
|
||||
BuildableName = "Mac Example.app"
|
||||
BlueprintName = "Mac Example"
|
||||
ReferencedContainer = "container:Mac Example.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Release"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "E6D8B8C619C75292001AD043"
|
||||
BuildableName = "Mac Example.app"
|
||||
BlueprintName = "Mac Example"
|
||||
ReferencedContainer = "container:Mac Example.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -1,27 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>SchemeUserState</key>
|
||||
<dict>
|
||||
<key>Mac Example.xcscheme</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>SuppressBuildableAutocreation</key>
|
||||
<dict>
|
||||
<key>E6D8B8C619C75292001AD043</key>
|
||||
<dict>
|
||||
<key>primary</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>E6D8B8D919C75292001AD043</key>
|
||||
<dict>
|
||||
<key>primary</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -621,12 +621,7 @@ public enum ArmchairKey: String, Printable {
|
||||
|
||||
public var description : String {
|
||||
get {
|
||||
#if os(iOS)
|
||||
return self.toRaw()
|
||||
#elseif os(OSX)
|
||||
return self.rawValue
|
||||
#else
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -778,7 +773,13 @@ public class Manager : ArmchairManager {
|
||||
private var tracksNewVersions: Bool = true
|
||||
private var shouldPromptIfRated: Bool = true
|
||||
private var useMainAppBundleForLocalizations: Bool = false
|
||||
private var debugEnabled: Bool = false
|
||||
private var debugEnabled: Bool = false {
|
||||
didSet {
|
||||
if self.debugEnabled {
|
||||
debugLog("Debug enabled for app: \(appID)")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If you aren't going to set an affiliate code yourself, please leave this as is.
|
||||
// It is my affiliate code. It is better that somebody's code is used rather than nobody's.
|
||||
@@ -1169,12 +1170,17 @@ public class Manager : ArmchairManager {
|
||||
alert.messageText = reviewTitle
|
||||
alert.informativeText = reviewMessage
|
||||
alert.addButtonWithTitle(rateButtonTitle)
|
||||
alert.addButtonWithTitle(remindButtonTitle)
|
||||
if showsRemindButton() {
|
||||
alert.addButtonWithTitle(remindButtonTitle)
|
||||
}
|
||||
alert.addButtonWithTitle(cancelButtonTitle)
|
||||
ratingAlert = alert
|
||||
|
||||
if let window = NSApplication.sharedApplication().keyWindow {
|
||||
alert.beginSheetModalForWindow(window, modalDelegate: self, didEndSelector: "alertDidEnd:returnCode:", contextInfo: nil)
|
||||
alert.beginSheetModalForWindow(window) {
|
||||
(response: NSModalResponse) in
|
||||
self.handleNSAlertReturnCode(response)
|
||||
}
|
||||
} else {
|
||||
var returnCode = alert.runModal()
|
||||
handleNSAlertReturnCode(returnCode)
|
||||
@@ -1235,24 +1241,24 @@ public class Manager : ArmchairManager {
|
||||
|
||||
private func handleNSAlertReturnCode(returnCode: NSInteger) {
|
||||
switch (returnCode) {
|
||||
case NSAlertAlternateReturn:
|
||||
// they don't want to rate it
|
||||
dontRate()
|
||||
case NSAlertDefaultReturn:
|
||||
case NSAlertFirstButtonReturn:
|
||||
// they want to rate it
|
||||
_rateApp()
|
||||
case NSAlertOtherReturn:
|
||||
// remind them later
|
||||
remindMeLater()
|
||||
case NSAlertSecondButtonReturn:
|
||||
// remind them later or cancel
|
||||
if showsRemindButton() {
|
||||
remindMeLater()
|
||||
} else {
|
||||
dontRate()
|
||||
}
|
||||
case NSAlertThirdButtonReturn:
|
||||
// they don't want to rate it
|
||||
dontRate()
|
||||
default:
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
private func alertDidEnd(alert: NSAlert, returnCode: NSInteger) {
|
||||
handleNSAlertReturnCode(returnCode)
|
||||
}
|
||||
|
||||
#else
|
||||
#endif
|
||||
|
||||
@@ -1324,7 +1330,7 @@ public class Manager : ArmchairManager {
|
||||
//Use the standard openUrl method
|
||||
} else {
|
||||
let url = NSURL(string: reviewURLString())
|
||||
UIApplication.sharedApplication().openURL(url)
|
||||
UIApplication.sharedApplication().openURL(url!)
|
||||
}
|
||||
|
||||
if UIDevice.currentDevice().model.rangeOfString("Simulator") != nil {
|
||||
@@ -1335,7 +1341,11 @@ public class Manager : ArmchairManager {
|
||||
debugLog(" - Or try copy/pasting \(fakeURL) into a browser on your computer.")
|
||||
}
|
||||
#elseif os(OSX)
|
||||
NSWorkspace.sharedWorkspace().openURL(NSURL(string: reviewURLString()))
|
||||
var url = NSURL(string: reviewURLString())
|
||||
var opened = NSWorkspace.sharedWorkspace().openURL(url)
|
||||
if !opened {
|
||||
debugLog("Failed to open \(url)")
|
||||
}
|
||||
#else
|
||||
#endif
|
||||
}
|
||||
@@ -1617,7 +1627,10 @@ public class Manager : ArmchairManager {
|
||||
alert.dismissWithClickedButtonIndex(alert.cancelButtonIndex, animated: false)
|
||||
}
|
||||
#elseif os(OSX)
|
||||
NSApp.endSheet(NSApplication.sharedApplication().keyWindow)
|
||||
if let window = NSApplication.sharedApplication().keyWindow {
|
||||
NSApp.endSheet(window)
|
||||
}
|
||||
|
||||
#else
|
||||
#endif
|
||||
ratingAlert = nil
|
||||
|
||||
BIN
assets/armchair.png
Normal file
BIN
assets/armchair.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 562 KiB |
@@ -7,6 +7,7 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
E60FA81819C9219600179D70 /* logo.png in Resources */ = {isa = PBXBuildFile; fileRef = E60FA81719C9219600179D70 /* logo.png */; };
|
||||
E6D8B8EC19C75559001AD043 /* Armchair.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E6D8B8BB19C7382B001AD043 /* Armchair.framework */; };
|
||||
E6E5F4C319C8E18E008A6C1B /* armchair.jpg in Resources */ = {isa = PBXBuildFile; fileRef = E6E5F4C219C8E18E008A6C1B /* armchair.jpg */; };
|
||||
E6E5F4CD19C8E388008A6C1B /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = E6E5F4CC19C8E388008A6C1B /* Icon.png */; };
|
||||
@@ -61,6 +62,7 @@
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
E60FA81719C9219600179D70 /* logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logo.png; sourceTree = "<group>"; };
|
||||
E6C49DC519C23C91006A4544 /* iOS Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "iOS Example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
E6E5F4C219C8E18E008A6C1B /* armchair.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = armchair.jpg; sourceTree = "<group>"; };
|
||||
E6E5F4CC19C8E388008A6C1B /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = "<group>"; };
|
||||
@@ -121,6 +123,7 @@
|
||||
E6E5F4CE19C8E3C6008A6C1B /* Images.xcassets */,
|
||||
E6E5F4CC19C8E388008A6C1B /* Icon.png */,
|
||||
E6E5F4C219C8E18E008A6C1B /* armchair.jpg */,
|
||||
E60FA81719C9219600179D70 /* logo.png */,
|
||||
F8111E0919A951050040E7D1 /* Info-iOS.plist */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
@@ -216,6 +219,7 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
E6E5F4C319C8E18E008A6C1B /* armchair.jpg in Resources */,
|
||||
E60FA81819C9219600179D70 /* logo.png in Resources */,
|
||||
E6E5F4CF19C8E3C6008A6C1B /* Images.xcassets in Resources */,
|
||||
F8111E1219A951050040E7D1 /* Main.storyboard in Resources */,
|
||||
E6E5F4CD19C8E388008A6C1B /* Icon.png in Resources */,
|
||||
@@ -341,6 +345,7 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
|
||||
INFOPLIST_FILE = "$(SRCROOT)/Example/Info-iOS.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
|
||||
@@ -356,6 +361,7 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;
|
||||
INFOPLIST_FILE = "$(SRCROOT)/Example/Info-iOS.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
|
||||
Reference in New Issue
Block a user