mirror of
https://github.com/UrbanApps/Armchair.git
synced 2026-01-11 22:30:50 +01:00
Added cocoapods support
This commit is contained in:
32
Armchair.podspec
Normal file
32
Armchair.podspec
Normal file
@@ -0,0 +1,32 @@
|
||||
Pod::Spec.new do |s|
|
||||
|
||||
s.name = "Armchair"
|
||||
s.version = "0.1.0"
|
||||
s.summary = "A simple yet powerful App Review Manager for iOS and OSX in Swift"
|
||||
s.description = <<-DESC
|
||||
A simple yet powerful App Review Manager for iOS and OSX in Swift.
|
||||
* 100% Swift
|
||||
* Both iOS and OS X Support
|
||||
* Fully Configurable at Runtime
|
||||
* Default Localizations for Dozens of Languages
|
||||
* Prevent Rating Prompts on Different Devices
|
||||
* Uses UIApplication/NSApplication Lifecycle Notifications
|
||||
* Easy to Setup
|
||||
* iTunes Affiliate Codes
|
||||
* Ready For Primetime
|
||||
DESC
|
||||
s.homepage = "https://github.com/UrbanApps/Armchair"
|
||||
s.screenshots = "https://raw.githubusercontent.com/UrbanApps/Armchair/assets/armchair-iOS.png", "https://raw.githubusercontent.com/UrbanApps/Armchair/assets/armchair-OSX.png"
|
||||
s.social_media_url = 'https://twitter.com/coneybeare'
|
||||
s.authors = { 'Matt Coneybeare' => 'coneybeare@urbanapps.com' }
|
||||
s.source = { :git => 'https://github.com/UrbanApps/Armchair.git', :tag => s.version }
|
||||
|
||||
s.license = { :type => "MIT", :file => "LICENSE" }
|
||||
|
||||
s.source_files = "Source/*.{h,swift}"
|
||||
s.resources = "Localization/*.lproj"
|
||||
s.ios.deployment_target = '8.0'
|
||||
s.osx.deployment_target = '10.10'
|
||||
s.requires_arc = true
|
||||
|
||||
end
|
||||
@@ -355,7 +355,8 @@
|
||||
F8111E2A19A95C8B0040E7D1 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0610;
|
||||
LastSwiftUpdateCheck = 0700;
|
||||
LastUpgradeCheck = 0700;
|
||||
ORGANIZATIONNAME = Armchair;
|
||||
TargetAttributes = {
|
||||
E6A0AF6419C9CFF400C3A7DC = {
|
||||
@@ -554,6 +555,7 @@
|
||||
INSTALL_PATH = "";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||
ONLY_ACTIVE_ARCH = NO;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.armchair.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = Armchair;
|
||||
SKIP_INSTALL = YES;
|
||||
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
|
||||
@@ -570,6 +572,7 @@
|
||||
INSTALL_PATH = "";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||
ONLY_ACTIVE_ARCH = NO;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.armchair.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = Armchair;
|
||||
SKIP_INSTALL = YES;
|
||||
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
|
||||
@@ -592,6 +595,7 @@
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 7.1;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.armchair.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_MODULE_NAME = "$(PRODUCT_NAME:c99extidentifier)";
|
||||
PRODUCT_NAME = Armchair;
|
||||
SDKROOT = macosx;
|
||||
@@ -616,6 +620,7 @@
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 7.1;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.armchair.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_MODULE_NAME = "$(PRODUCT_NAME:c99extidentifier)";
|
||||
PRODUCT_NAME = Armchair;
|
||||
SDKROOT = macosx;
|
||||
@@ -638,6 +643,7 @@
|
||||
INFOPLIST_FILE = Tests/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.armchair.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Debug;
|
||||
@@ -652,6 +658,7 @@
|
||||
INFOPLIST_FILE = Tests/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.armchair.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Release;
|
||||
@@ -668,6 +675,7 @@
|
||||
INSTALL_PATH = "";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||
ONLY_ACTIVE_ARCH = NO;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.armchair.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = Armchair;
|
||||
SDKROOT = macosx;
|
||||
SKIP_INSTALL = YES;
|
||||
@@ -685,6 +693,7 @@
|
||||
INSTALL_PATH = "";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||
ONLY_ACTIVE_ARCH = NO;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.armchair.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = Armchair;
|
||||
SDKROOT = macosx;
|
||||
SKIP_INSTALL = YES;
|
||||
@@ -714,6 +723,7 @@
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
@@ -793,6 +803,7 @@
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.armchair.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "";
|
||||
@@ -812,6 +823,7 @@
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.armchair.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "";
|
||||
|
||||
99
Armchair.xcodeproj/xcshareddata/xcschemes/Armchair.xcscheme
Normal file
99
Armchair.xcodeproj/xcshareddata/xcschemes/Armchair.xcscheme
Normal file
@@ -0,0 +1,99 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0710"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "F8111E3219A95C8B0040E7D1"
|
||||
BuildableName = "Armchair.framework"
|
||||
BlueprintName = "Armchair"
|
||||
ReferencedContainer = "container:Armchair.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "E6D8B92719C880A9001AD043"
|
||||
BuildableName = "ArmchairTests.xctest"
|
||||
BlueprintName = "ArmchairTests"
|
||||
ReferencedContainer = "container:Armchair.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "F8111E3219A95C8B0040E7D1"
|
||||
BuildableName = "Armchair.framework"
|
||||
BlueprintName = "Armchair"
|
||||
ReferencedContainer = "container:Armchair.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "F8111E3219A95C8B0040E7D1"
|
||||
BuildableName = "Armchair.framework"
|
||||
BlueprintName = "Armchair"
|
||||
ReferencedContainer = "container:Armchair.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "F8111E3219A95C8B0040E7D1"
|
||||
BuildableName = "Armchair.framework"
|
||||
BlueprintName = "Armchair"
|
||||
ReferencedContainer = "container:Armchair.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0710"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "E6D8B8EF19C756A4001AD043"
|
||||
BuildableName = "Armchair.framework"
|
||||
BlueprintName = "ArmchairMac"
|
||||
ReferencedContainer = "container:Armchair.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "E6D8B8EF19C756A4001AD043"
|
||||
BuildableName = "Armchair.framework"
|
||||
BlueprintName = "ArmchairMac"
|
||||
ReferencedContainer = "container:Armchair.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "E6D8B8EF19C756A4001AD043"
|
||||
BuildableName = "Armchair.framework"
|
||||
BlueprintName = "ArmchairMac"
|
||||
ReferencedContainer = "container:Armchair.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -1,7 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6250" systemVersion="14A389" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="6250"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="8191"/>
|
||||
<capability name="box content view" minToolsVersion="7.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
|
||||
@@ -675,7 +676,7 @@
|
||||
<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="2560" height="1417"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="1280" height="777"/>
|
||||
<view key="contentView" id="EiT-Mj-1SZ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="400" height="368"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
@@ -692,7 +693,7 @@
|
||||
</imageView>
|
||||
<box autoresizesSubviews="NO" borderType="line" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="0Gb-KD-yfU">
|
||||
<rect key="frame" x="17" y="250" width="366" height="100"/>
|
||||
<view key="contentView">
|
||||
<view key="contentView" id="bbk-jP-boF">
|
||||
<rect key="frame" x="1" y="1" width="364" height="98"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
@@ -750,13 +751,13 @@
|
||||
</subviews>
|
||||
</view>
|
||||
<constraints>
|
||||
<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="-11" id="FTY-wK-gxK"/>
|
||||
<constraint firstItem="YED-uj-VLq" firstAttribute="leading" secondItem="jkm-ga-2sM" secondAttribute="leading" constant="-45" id="V7U-7Z-CIK"/>
|
||||
<constraint firstItem="jkm-ga-2sM" firstAttribute="bottom" secondItem="yGG-Wr-1xP" secondAttribute="bottom" id="WZR-Hf-JcJ"/>
|
||||
<constraint firstAttribute="centerX" secondItem="YED-uj-VLq" secondAttribute="centerX" id="D1u-uE-BYQ"/>
|
||||
<constraint firstItem="yGG-Wr-1xP" firstAttribute="top" secondItem="YED-uj-VLq" secondAttribute="bottom" constant="-11" id="HED-pQ-Syb"/>
|
||||
<constraint firstItem="YED-uj-VLq" firstAttribute="leading" secondItem="jkm-ga-2sM" secondAttribute="leading" constant="-45" id="Krx-CK-vgG"/>
|
||||
<constraint firstItem="YED-uj-VLq" firstAttribute="top" secondItem="0Gb-KD-yfU" secondAttribute="top" constant="-13" id="Yxh-EJ-Gft"/>
|
||||
<constraint firstAttribute="height" constant="94" id="aN9-Sz-28k"/>
|
||||
<constraint firstItem="yGG-Wr-1xP" firstAttribute="trailing" secondItem="YED-uj-VLq" secondAttribute="trailing" constant="-30" id="iUR-We-Kf1"/>
|
||||
<constraint firstItem="yGG-Wr-1xP" firstAttribute="trailing" secondItem="YED-uj-VLq" secondAttribute="trailing" constant="-30" id="kVF-vs-OfD"/>
|
||||
<constraint firstItem="jkm-ga-2sM" firstAttribute="bottom" secondItem="yGG-Wr-1xP" secondAttribute="bottom" id="sDl-pK-HF9"/>
|
||||
</constraints>
|
||||
<color key="borderColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="fillColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
|
||||
@@ -5,11 +5,21 @@
|
||||
"size" : "29x29",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "40x40",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "40x40",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
|
||||
@@ -3,43 +3,30 @@
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "ipad",
|
||||
"minimum-system-version" : "7.0",
|
||||
"extent" : "full-screen",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "landscape",
|
||||
"idiom" : "ipad",
|
||||
"minimum-system-version" : "7.0",
|
||||
"extent" : "full-screen",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "landscape",
|
||||
"idiom" : "ipad",
|
||||
"minimum-system-version" : "7.0",
|
||||
"extent" : "full-screen",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "iphone",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "iphone",
|
||||
"minimum-system-version" : "7.0",
|
||||
"subtype" : "retina4",
|
||||
"scale" : "2x"
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "ipad",
|
||||
"minimum-system-version" : "7.0",
|
||||
"extent" : "full-screen",
|
||||
"scale" : "1x"
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "landscape",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.armchair.$(PRODUCT_NAME:rfc1034identifier)</string>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleLocalizations</key>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<key>CFBundleIcons~ipad</key>
|
||||
<dict/>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.armchair.$(PRODUCT_NAME:rfc1034identifier)</string>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleLocalizations</key>
|
||||
|
||||
@@ -55,7 +55,7 @@ extension ViewController {
|
||||
|
||||
// Only set it if we are using Armchair localizations
|
||||
if !Armchair.useMainAppBundleForLocalizations() {
|
||||
var currentLocalization: NSString = NSBundle.mainBundle().preferredLocalizations[0] as! NSString
|
||||
let currentLocalization: NSString = NSBundle.mainBundle().preferredLocalizations[0] as NSString
|
||||
// Only set it if we are using a different language than this apps development language
|
||||
if let developmentLocalization = NSBundle.mainBundle().developmentLocalization {
|
||||
if currentLocalization != developmentLocalization {
|
||||
@@ -74,7 +74,7 @@ extension ViewController {
|
||||
#endif
|
||||
}
|
||||
|
||||
@IBAction func presentStandardPrompt(AnyObject) {
|
||||
@IBAction func presentStandardPrompt(_: AnyObject) {
|
||||
resetAppReviewManager()
|
||||
|
||||
// The AppID is the only required setup
|
||||
@@ -92,7 +92,7 @@ extension ViewController {
|
||||
Armchair.userDidSignificantEvent(true)
|
||||
}
|
||||
|
||||
@IBAction func presentCustomizedPrompt(AnyObject) {
|
||||
@IBAction func presentCustomizedPrompt(_: AnyObject) {
|
||||
resetAppReviewManager()
|
||||
|
||||
// The AppID is the only required setup
|
||||
@@ -150,23 +150,23 @@ extension ViewController {
|
||||
Armchair.affiliateCampaignCode("Armchair-ExampleApp")
|
||||
|
||||
// Armchair is block based, so setup some blocks on events
|
||||
Armchair.onDidDeclineToRate() { println("[Example App] The user just declined to rate") }
|
||||
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") })
|
||||
Armchair.onDidDeclineToRate() { print("[Example App] The user just declined to rate") }
|
||||
Armchair.onDidDisplayAlert() { print("[Example App] We just displayed the rating prompt") }
|
||||
Armchair.onDidOptToRate() { print("[Example App] The user just opted to rate") }
|
||||
Armchair.onDidOptToRemindLater({ print("[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)") })
|
||||
Armchair.onWillPresentModalView({ print("[Example App] About to present the modal view. Animated: \($0)") })
|
||||
Armchair.onDidDismissModalView({ print("[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)
|
||||
Armchair.setKey("kSettingsSignificantEventTally", armchairKeyType: ArmchairKey.SignificantEventCount)
|
||||
|
||||
// You can also call it with a block to circumvent any of Armchair should rate logic.
|
||||
Armchair.userDidSignificantEvent({
|
||||
(trackingInfo: ArmchairTrackingInfo) -> (Bool) in
|
||||
// the trackingInfo.info dictionary has all the keys/value Armchair uses to determine whether or not to show a prompt
|
||||
|
||||
println("[Example App] \(trackingInfo)")
|
||||
print("[Example App] \(trackingInfo)")
|
||||
|
||||
return true
|
||||
})
|
||||
@@ -186,7 +186,7 @@ extension ViewController {
|
||||
}
|
||||
|
||||
#if os(iOS)
|
||||
@IBAction func presentStoreKitPrompt(AnyObject) {
|
||||
@IBAction func presentStoreKitPrompt(_: AnyObject) {
|
||||
resetAppReviewManager()
|
||||
|
||||
// The AppID is the only required setup
|
||||
@@ -212,7 +212,7 @@ extension ViewController {
|
||||
Armchair.resetDefaults()
|
||||
}
|
||||
|
||||
@IBAction func openUrbanApps(AnyObject) {
|
||||
@IBAction func openUrbanApps(_: AnyObject) {
|
||||
if let url = NSURL(string: "http://urbanapps.com") {
|
||||
#if os(iOS)
|
||||
UIApplication.sharedApplication().openURL(url)
|
||||
|
||||
@@ -168,7 +168,8 @@
|
||||
E60FA7B219C908FE00179D70 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0610;
|
||||
LastSwiftUpdateCheck = 0700;
|
||||
LastUpgradeCheck = 0700;
|
||||
ORGANIZATIONNAME = Armchair;
|
||||
TargetAttributes = {
|
||||
E60FA7B919C908FE00179D70 = {
|
||||
@@ -311,6 +312,7 @@
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
@@ -375,6 +377,7 @@
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
INFOPLIST_FILE = "Example/Info-Mac.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.armchair.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Debug;
|
||||
@@ -386,6 +389,7 @@
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
INFOPLIST_FILE = "Example/Info-Mac.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.armchair.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Release;
|
||||
|
||||
40
README.md
40
README.md
@@ -66,22 +66,40 @@ Tweak the variables so that you don't annoy your customers, and you will enjoy t
|
||||
|
||||
## Requirements
|
||||
|
||||
- Xcode 6.1
|
||||
- iOS 7.0+, Mac OS X 10.10+
|
||||
- Xcode 6.1+
|
||||
- iOS 8.0+, Mac OS X 10.10+
|
||||
|
||||
## Installation
|
||||
|
||||
_The infrastructure and best practices for distributing Swift libraries is currently in flux during this beta period of the language and Xcode. In the meantime, you can simply grab the code, drag the `Armchair.xcodeproj` file into your Xcode project, and add the framework product as a dependency for your application's target. (This is how the example projects are structured)_
|
||||
> **Embedded frameworks require a minimum deployment target of iOS 8 or OS X Mavericks (10.9).**
|
||||
>
|
||||
> Armchair is no longer supported on iOS 7 due to the lack of support for frameworks. Without frameworks, running Travis-CI against iOS 7 would require a second duplicated test target. The separate test suite would need to import all the Swift files and the tests would need to be duplicated and re-written. This split would be too difficult to maintain to ensure the highest possible quality of the Armchair ecosystem.
|
||||
|
||||
1. Add Armchair as a submodule by opening the Terminal, cd-ing into your top-level project directory, and entering the command git submodule add https://github.com/UrbanApps/Armchair.git
|
||||
2. Open the Armchair folder, and drag Armchair.xcodeproj into the file navigator of your app project.
|
||||
3. In Xcode, navigate to the target configuration window by clicking on the blue project icon, and selecting the application target under the "Targets" heading in the sidebar.
|
||||
4. Ensure that the deployment target of Armchair.framework matches that of the application target.
|
||||
5. In the tab bar at the top of that window, open the "Build Phases" panel.
|
||||
6. Expand the "Target Dependencies" group, and add Armchair.framework.
|
||||
7. Click on the + button at the top left of the panel and select "New Copy Files Phase". Rename this new phase to "Copy Frameworks", set the "Destination" to "Frameworks", and add Armchair.framework.
|
||||
### CocoaPods
|
||||
|
||||
For more detailed installation instructions, including a video, see [Basic Installation](https://github.com/UrbanApps/Armchair/wiki/Basic-Installation)
|
||||
[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command:
|
||||
|
||||
```bash
|
||||
$ gem install cocoapods
|
||||
```
|
||||
|
||||
> CocoaPods 0.39.0+ is required to build Armchair.
|
||||
|
||||
To integrate Armchair into your Xcode project using CocoaPods, specify it in your `Podfile`:
|
||||
|
||||
```ruby
|
||||
source 'https://github.com/CocoaPods/Specs.git'
|
||||
platform :ios, '8.0'
|
||||
use_frameworks!
|
||||
|
||||
pod 'Armchair', '~> 0.1.0'
|
||||
```
|
||||
|
||||
Then, run the following command:
|
||||
|
||||
```bash
|
||||
$ pod install
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
@@ -295,10 +295,10 @@ public func debugEnabled(debugEnabled: Bool) {
|
||||
#if Debug
|
||||
Manager.defaultManager.debugEnabled = debugEnabled
|
||||
#else
|
||||
println("[Armchair] Debug is disabled on release builds.")
|
||||
println("[Armchair] If you really want to enable debug mode,")
|
||||
println("[Armchair] add \"-DDebug\" to your Swift Compiler - Custom Flags")
|
||||
println("[Armchair] section in the target's build settings for release")
|
||||
print("[Armchair] Debug is disabled on release builds.")
|
||||
print("[Armchair] If you really want to enable debug mode,")
|
||||
print("[Armchair] add \"-DDebug\" to your Swift Compiler - Custom Flags")
|
||||
print("[Armchair] section in the target's build settings for release")
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1534,7 +1534,7 @@ public class Manager : ArmchairManager {
|
||||
// MARK: Internet Connectivity
|
||||
|
||||
private func connectedToNetwork() -> Bool {
|
||||
var zeroAddress = sockaddr_in(sin_len: 0, sin_family: 0, sin_port: 0, sin_addr: in_addr(s_addr: 0), sin_zero: (0, 0, 0, 0, 0, 0, 0, 0))
|
||||
var zeroAddress = sockaddr_in()
|
||||
zeroAddress.sin_len = UInt8(sizeofValue(zeroAddress))
|
||||
zeroAddress.sin_family = sa_family_t(AF_INET)
|
||||
|
||||
@@ -1545,7 +1545,7 @@ public class Manager : ArmchairManager {
|
||||
}
|
||||
|
||||
var flags : SCNetworkReachabilityFlags = []
|
||||
if SCNetworkReachabilityGetFlags(defaultRouteReachability, &flags) {
|
||||
if !SCNetworkReachabilityGetFlags(defaultRouteReachability, &flags) {
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.armchair.$(PRODUCT_NAME:rfc1034identifier)</string>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.armchair.$(PRODUCT_NAME:rfc1034identifier)</string>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
|
||||
@@ -4,10 +4,12 @@
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Armchair Tests</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.armchair.$(PRODUCT_NAME:rfc1034identifier)</string>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
@@ -20,7 +22,5 @@
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Armchair Tests</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -195,7 +195,8 @@
|
||||
F8111DFD19A951050040E7D1 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0600;
|
||||
LastSwiftUpdateCheck = 0700;
|
||||
LastUpgradeCheck = 0700;
|
||||
ORGANIZATIONNAME = Armchair;
|
||||
TargetAttributes = {
|
||||
F8111E0419A951050040E7D1 = {
|
||||
@@ -352,6 +353,7 @@
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
@@ -424,6 +426,7 @@
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
OTHER_SWIFT_FLAGS = "";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.armchair.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "iOS Example";
|
||||
PROVISIONING_PROFILE = "";
|
||||
};
|
||||
@@ -440,6 +443,7 @@
|
||||
INFOPLIST_FILE = "$(SRCROOT)/Example/Info-iOS.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.armchair.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "iOS Example";
|
||||
PROVISIONING_PROFILE = "";
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user