base appstore app
This commit is contained in:
parent
13df6cbaff
commit
9f2815a61f
12 changed files with 148 additions and 41 deletions
BIN
.DS_Store
vendored
BIN
.DS_Store
vendored
Binary file not shown.
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
|
||||
.DS_Store
|
||||
.DS_Store
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
/* Begin PBXBuildFile section */
|
||||
BD7A5E342510173A003E992C /* day.gif in Resources */ = {isa = PBXBuildFile; fileRef = BD7A5E332510173A003E992C /* day.gif */; };
|
||||
BD7A5E39251034D7003E992C /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BD7A5E38251034D7003E992C /* StoreKit.framework */; };
|
||||
BD7D35D72510042D00A61B6B /* night.gif in Resources */ = {isa = PBXBuildFile; fileRef = BD7D35D52510042D00A61B6B /* night.gif */; };
|
||||
BD7D35DB2510111700A61B6B /* SwiftyGif in Frameworks */ = {isa = PBXBuildFile; productRef = BD7D35DA2510111700A61B6B /* SwiftyGif */; };
|
||||
BDA060FA2447F3E6009C72CE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDA060F92447F3E6009C72CE /* AppDelegate.swift */; };
|
||||
|
@ -40,8 +41,23 @@
|
|||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
BD58E8CE2514577E008D1E8E /* Embed App Extensions */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 13;
|
||||
files = (
|
||||
);
|
||||
name = "Embed App Extensions";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
BD58E8C325145778008D1E8E /* SwiftUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftUI.framework; path = System/Library/Frameworks/SwiftUI.framework; sourceTree = SDKROOT; };
|
||||
BD7A5E332510173A003E992C /* day.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = day.gif; sourceTree = "<group>"; };
|
||||
BD7A5E38251034D7003E992C /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; };
|
||||
BD7D35D52510042D00A61B6B /* night.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = night.gif; sourceTree = "<group>"; };
|
||||
BDA060F62447F3E6009C72CE /* Nook Music.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Nook Music.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
BDA060F92447F3E6009C72CE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
|
@ -60,6 +76,7 @@
|
|||
BDA0611F2447F3F3009C72CE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
BDA0618A244826DB009C72CE /* grandfatherrock.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = grandfatherrock.entitlements; sourceTree = "<group>"; };
|
||||
BDB53FCC250765A1004E9788 /* FinkHeavy.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = FinkHeavy.ttf; sourceTree = "<group>"; };
|
||||
BDE579F52514894600248E86 /* WidgetKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WidgetKit.framework; path = System/Library/Frameworks/WidgetKit.framework; sourceTree = SDKROOT; };
|
||||
BDE8138E2507422100371570 /* ThirdViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ThirdViewController.swift; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
|
@ -69,6 +86,7 @@
|
|||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
BD7D35DB2510111700A61B6B /* SwiftyGif in Frameworks */,
|
||||
BD7A5E39251034D7003E992C /* StoreKit.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -89,6 +107,16 @@
|
|||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
BD7A5E37251034D7003E992C /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BD7A5E38251034D7003E992C /* StoreKit.framework */,
|
||||
BD58E8C325145778008D1E8E /* SwiftUI.framework */,
|
||||
BDE579F52514894600248E86 /* WidgetKit.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
BD7D35D42510042D00A61B6B /* gifs */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
@ -105,6 +133,7 @@
|
|||
BDA061112447F3F3009C72CE /* grandfatherrockTests */,
|
||||
BDA0611C2447F3F3009C72CE /* grandfatherrockUITests */,
|
||||
BDA060F72447F3E6009C72CE /* Products */,
|
||||
BD7A5E37251034D7003E992C /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
|
@ -173,6 +202,7 @@
|
|||
BDA060F22447F3E6009C72CE /* Sources */,
|
||||
BDA060F32447F3E6009C72CE /* Frameworks */,
|
||||
BDA060F42447F3E6009C72CE /* Resources */,
|
||||
BD58E8CE2514577E008D1E8E /* Embed App Extensions */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
|
@ -228,7 +258,7 @@
|
|||
BDA060EE2447F3E5009C72CE /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 1140;
|
||||
LastSwiftUpdateCheck = 1200;
|
||||
LastUpgradeCheck = 1200;
|
||||
ORGANIZATIONNAME = "Micah Gomez";
|
||||
TargetAttributes = {
|
||||
|
@ -481,11 +511,12 @@
|
|||
BDA061232447F3F3009C72CE /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = grandfatherrock/grandfatherrock.entitlements;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 4;
|
||||
CURRENT_PROJECT_VERSION = 7;
|
||||
DEVELOPMENT_TEAM = PRBH2T6668;
|
||||
INFOPLIST_FILE = grandfatherrock/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
|
@ -506,11 +537,12 @@
|
|||
BDA061242447F3F3009C72CE /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = grandfatherrock/grandfatherrock.entitlements;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 4;
|
||||
CURRENT_PROJECT_VERSION = 7;
|
||||
DEVELOPMENT_TEAM = PRBH2T6668;
|
||||
INFOPLIST_FILE = grandfatherrock/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
|
|
Binary file not shown.
|
@ -9,6 +9,11 @@
|
|||
<key>orderHint</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<key>hswidgetExtension.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<?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>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
16
TapeDeck.xcworkspace/xcshareddata/swiftpm/Package.resolved
Normal file
16
TapeDeck.xcworkspace/xcshareddata/swiftpm/Package.resolved
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"object": {
|
||||
"pins": [
|
||||
{
|
||||
"package": "SwiftyGif",
|
||||
"repositoryURL": "https://github.com/kirualex/SwiftyGif.git",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "420d12cba8338b03993f73a72c1f6b70d5273cf2",
|
||||
"version": "5.3.0"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"version": 1
|
||||
}
|
BIN
TapeDeck.xcworkspace/xcuserdata/micahgomez.xcuserdatad/UserInterfaceState.xcuserstate
generated
Normal file
BIN
TapeDeck.xcworkspace/xcuserdata/micahgomez.xcuserdatad/UserInterfaceState.xcuserstate
generated
Normal file
Binary file not shown.
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17154" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="49e-Tb-3d3">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="49e-Tb-3d3">
|
||||
<device id="retina4_0" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17124"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
|
@ -39,7 +39,7 @@
|
|||
<constraint firstAttribute="width" secondItem="Nou-CB-qnJ" secondAttribute="height" multiplier="1:1" id="3mw-Za-8Hw"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="50"/>
|
||||
<color key="tintColor" red="0.86256664989999998" green="0.69524472950000005" blue="0.2422021627" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color key="tintColor" red="0.84344667200000001" green="0.68542540070000002" blue="0.33161017300000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<state key="normal" backgroundImage="play.circle" catalog="system"/>
|
||||
<connections>
|
||||
<action selector="play:" destination="9pv-A4-QxB" eventType="touchUpInside" id="3Tt-QE-VYp"/>
|
||||
|
@ -258,14 +258,14 @@
|
|||
<constraint firstAttribute="height" constant="50" id="Ovh-Gj-aeg"/>
|
||||
</constraints>
|
||||
<color key="tintColor" systemColor="labelColor"/>
|
||||
<state key="normal" title="Developer Website"/>
|
||||
<state key="normal" title="Privacy Policy"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
|
||||
<integer key="value" value="16"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="websiteButton:" destination="8LK-WS-C3a" eventType="touchUpInside" id="hj9-mu-r8z"/>
|
||||
<action selector="privacyButton:" destination="8LK-WS-C3a" eventType="touchUpInside" id="uzh-sH-2nz"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gD8-gD-kvG">
|
||||
|
@ -275,7 +275,7 @@
|
|||
<constraint firstAttribute="height" constant="50" id="86M-fp-v4h"/>
|
||||
</constraints>
|
||||
<color key="tintColor" systemColor="labelColor"/>
|
||||
<state key="normal" title="Support"/>
|
||||
<state key="normal" title="Email for Support"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
|
||||
<integer key="value" value="16"/>
|
||||
|
@ -336,24 +336,52 @@
|
|||
<action selector="largeTipButton:" destination="8LK-WS-C3a" eventType="touchUpInside" id="dQn-0b-voB"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" lineBreakMode="wordWrap" numberOfLines="5" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8BV-wp-YO2">
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8BV-wp-YO2">
|
||||
<rect key="frame" x="20" y="423" width="280" height="43"/>
|
||||
<string key="text">Everything in AC Tape Deck is entirely free. Tips are welcome but not expected, and are not required to use any features of the app.</string>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Icon by Isabella Gomez" textAlignment="center" lineBreakMode="wordWrap" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="slx-7G-t3k">
|
||||
<rect key="frame" x="20" y="525.5" width="280" height="14.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Bo4-PM-Ch5">
|
||||
<rect key="frame" x="16" y="75" width="288" height="50"/>
|
||||
<color key="backgroundColor" white="0.66666666669999997" alpha="0.40000000000000002" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="50" id="Jf2-Hf-rC2"/>
|
||||
</constraints>
|
||||
<color key="tintColor" systemColor="labelColor"/>
|
||||
<state key="normal" title="Developer Website"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
|
||||
<integer key="value" value="16"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="websiteButton:" destination="8LK-WS-C3a" eventType="touchUpInside" id="y2E-1G-XVT"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="Qng-vH-mPk"/>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
<constraints>
|
||||
<constraint firstItem="Qng-vH-mPk" firstAttribute="trailing" secondItem="slx-7G-t3k" secondAttribute="trailing" constant="20" id="0Lz-gI-bvP"/>
|
||||
<constraint firstItem="gD8-gD-kvG" firstAttribute="top" secondItem="SvO-8B-YAs" secondAttribute="bottom" constant="8" symbolic="YES" id="6Kl-jm-0xO"/>
|
||||
<constraint firstItem="Qng-vH-mPk" firstAttribute="bottom" secondItem="slx-7G-t3k" secondAttribute="bottom" constant="8" id="6p5-Fv-Rm0"/>
|
||||
<constraint firstItem="Qng-vH-mPk" firstAttribute="trailing" secondItem="SvO-8B-YAs" secondAttribute="trailing" constant="16" id="FNp-wP-MqG"/>
|
||||
<constraint firstItem="slx-7G-t3k" firstAttribute="leading" secondItem="Qng-vH-mPk" secondAttribute="leading" constant="20" id="Hf3-fu-YFw"/>
|
||||
<constraint firstItem="Bo4-PM-Ch5" firstAttribute="leading" secondItem="Qng-vH-mPk" secondAttribute="leading" constant="16" id="J81-9H-TDg"/>
|
||||
<constraint firstItem="8BV-wp-YO2" firstAttribute="top" secondItem="GLx-A2-QUQ" secondAttribute="bottom" constant="8" symbolic="YES" id="JIW-Fd-Rao"/>
|
||||
<constraint firstItem="Qng-vH-mPk" firstAttribute="trailing" secondItem="7aC-B4-rXp" secondAttribute="trailing" constant="16" id="MWS-Gk-aGc"/>
|
||||
<constraint firstItem="Qng-vH-mPk" firstAttribute="trailing" secondItem="gD8-gD-kvG" secondAttribute="trailing" constant="16" id="MZO-QU-Llr"/>
|
||||
<constraint firstItem="11I-Jn-Iz5" firstAttribute="leading" secondItem="Qng-vH-mPk" secondAttribute="leading" constant="16" id="T9p-4Y-zLx"/>
|
||||
<constraint firstItem="8BV-wp-YO2" firstAttribute="leading" secondItem="Qng-vH-mPk" secondAttribute="leading" constant="20" id="VP9-am-I43"/>
|
||||
<constraint firstItem="Qng-vH-mPk" firstAttribute="trailing" secondItem="Bo4-PM-Ch5" secondAttribute="trailing" constant="16" id="Ypj-jc-Fv4"/>
|
||||
<constraint firstItem="SvO-8B-YAs" firstAttribute="leading" secondItem="Qng-vH-mPk" secondAttribute="leading" constant="16" id="bn2-fl-3tf"/>
|
||||
<constraint firstItem="7aC-B4-rXp" firstAttribute="top" secondItem="11I-Jn-Iz5" secondAttribute="bottom" constant="8" symbolic="YES" id="boZ-R0-Egc"/>
|
||||
<constraint firstItem="Qng-vH-mPk" firstAttribute="trailing" secondItem="11I-Jn-Iz5" secondAttribute="trailing" constant="16" id="ca1-LO-hvh"/>
|
||||
|
@ -365,6 +393,7 @@
|
|||
<constraint firstItem="Qng-vH-mPk" firstAttribute="trailing" secondItem="8BV-wp-YO2" secondAttribute="trailing" constant="20" id="tXG-To-QNv"/>
|
||||
<constraint firstItem="GLx-A2-QUQ" firstAttribute="leading" secondItem="Qng-vH-mPk" secondAttribute="leading" constant="16" id="tZw-B5-E6V"/>
|
||||
<constraint firstItem="gD8-gD-kvG" firstAttribute="leading" secondItem="Qng-vH-mPk" secondAttribute="leading" constant="16" id="vcE-OD-6IL"/>
|
||||
<constraint firstItem="SvO-8B-YAs" firstAttribute="top" secondItem="Bo4-PM-Ch5" secondAttribute="bottom" constant="8" symbolic="YES" id="vdT-oo-ejD"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<tabBarItem key="tabBarItem" title="Home" image="play.fill" catalog="system" id="eCI-mO-7Eb"/>
|
||||
|
|
|
@ -435,6 +435,15 @@ class FirstViewController: UIViewController{
|
|||
songLabel.text = ""
|
||||
}
|
||||
|
||||
if (MPMusicPlayerController.applicationMusicPlayer.playbackState == MPMusicPlaybackState.playing) {
|
||||
GlobalVars.musicStarted = true
|
||||
controlButton.setBackgroundImage(UIImage(systemName: "pause.circle"), for: UIControl.State.normal)
|
||||
UIView.animate(withDuration: 0.4, delay: 0,usingSpringWithDamping: 0.5,initialSpringVelocity: 0,animations: {self.PlayButtonSize.constant = 130;self.view.layoutIfNeeded()}, completion: nil)
|
||||
} else {
|
||||
GlobalVars.musicStarted = false
|
||||
controlButton.setBackgroundImage(UIImage(systemName: "play.circle"), for: UIControl.State.normal)
|
||||
UIView.animate(withDuration: 0.4, delay: 0,usingSpringWithDamping: 0.5,initialSpringVelocity: 0, animations: {self.PlayButtonSize.constant = 90;self.view.layoutIfNeeded()}, completion: nil)
|
||||
}
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
|
@ -443,19 +452,7 @@ class FirstViewController: UIViewController{
|
|||
|
||||
musicPlayer.stop()
|
||||
GlobalVars.musicStarted = false
|
||||
IAPHandler.shared.fetchAvailableProducts()
|
||||
|
||||
IAPHandler.shared.purchaseStatusBlock = {[weak self] (type) in
|
||||
guard let strongSelf = self else{ return }
|
||||
if type == .purchased {
|
||||
let alertView = UIAlertController(title: "", message: type.message(), preferredStyle: .alert)
|
||||
let action = UIAlertAction(title: "OK", style: .default, handler: { (alert) in
|
||||
|
||||
})
|
||||
alertView.addAction(action)
|
||||
strongSelf.present(alertView, animated: true, completion: nil)
|
||||
}
|
||||
}
|
||||
|
||||
if(!defaults.bool(forKey: "didRun")){
|
||||
defaults.set("New Horizons", forKey: "selectedTitle")
|
||||
|
@ -704,15 +701,11 @@ class FirstViewController: UIViewController{
|
|||
if (MPMusicPlayerController.applicationMusicPlayer.playbackState == MPMusicPlaybackState.playing) {
|
||||
GlobalVars.musicStarted = true
|
||||
controlButton.setBackgroundImage(UIImage(systemName: "pause.circle"), for: UIControl.State.normal)
|
||||
UIView.animate(withDuration: 0.4, delay: 0,usingSpringWithDamping: 0.5,initialSpringVelocity: 0){
|
||||
self.PlayButtonSize.constant = 130
|
||||
}
|
||||
UIView.animate(withDuration: 0.4, delay: 0,usingSpringWithDamping: 0.5,initialSpringVelocity: 0,animations: {self.PlayButtonSize.constant = 130;self.view.layoutIfNeeded()}, completion: nil)
|
||||
} else {
|
||||
GlobalVars.musicStarted = false
|
||||
controlButton.setBackgroundImage(UIImage(systemName: "play.circle"), for: UIControl.State.normal)
|
||||
UIView.animate(withDuration: 0.4, delay: 0,usingSpringWithDamping: 0.5,initialSpringVelocity: 0){
|
||||
self.PlayButtonSize.constant = 90
|
||||
}
|
||||
UIView.animate(withDuration: 0.4, delay: 0,usingSpringWithDamping: 0.5,initialSpringVelocity: 0, animations: {self.PlayButtonSize.constant = 90;self.view.layoutIfNeeded()}, completion: nil)
|
||||
}
|
||||
|
||||
var foundSong = false
|
||||
|
@ -784,6 +777,7 @@ class FirstViewController: UIViewController{
|
|||
// Present Dialog message
|
||||
self.present(errorAlert, animated: true, completion:nil)
|
||||
//print("Song is missing for at one hour")
|
||||
|
||||
controlButton.isEnabled = false
|
||||
} else {
|
||||
controlButton.isEnabled = true
|
||||
|
@ -1078,20 +1072,15 @@ class FirstViewController: UIViewController{
|
|||
musicPlayer.play()
|
||||
GlobalVars.musicStarted = true
|
||||
controlButton.setBackgroundImage(UIImage(systemName: "pause.circle"), for: UIControl.State.normal)
|
||||
UIView.animate(withDuration: 0.4,delay:0,usingSpringWithDamping: 0.5,initialSpringVelocity: 0){
|
||||
self.PlayButtonSize.constant = 130
|
||||
self.view.layoutIfNeeded()
|
||||
}
|
||||
UIView.animate(withDuration: 0.4,delay:0,usingSpringWithDamping: 0.5,initialSpringVelocity: 0,animations: {self.PlayButtonSize.constant = 130;self.view.layoutIfNeeded()}, completion: nil)
|
||||
}
|
||||
else{
|
||||
let musicPlayer = MPMusicPlayerController.applicationMusicPlayer
|
||||
musicPlayer.pause()
|
||||
GlobalVars.musicStarted = false
|
||||
controlButton.setBackgroundImage(UIImage(systemName: "play.circle"), for: UIControl.State.normal)
|
||||
UIView.animate(withDuration: 0.4, delay: 0,usingSpringWithDamping: 0.5,initialSpringVelocity: 0){
|
||||
self.PlayButtonSize.constant = 90
|
||||
self.view.layoutIfNeeded()
|
||||
}
|
||||
UIView.animate(withDuration: 0.4, delay: 0,usingSpringWithDamping: 0.5,initialSpringVelocity: 0,animations: {self.PlayButtonSize.constant = 90;self.view.layoutIfNeeded()}, completion: nil)
|
||||
|
||||
}
|
||||
var nowPlayingString:String = "Now Playing: "
|
||||
if (MPMusicPlayerController.applicationMusicPlayer.playbackState == MPMusicPlaybackState.playing) {
|
||||
|
@ -1299,9 +1288,16 @@ enum IAPHandlerAlertType{
|
|||
|
||||
func message() -> String{
|
||||
switch self {
|
||||
case .disabled: return "Purchases are disabled in your device!"
|
||||
case .disabled: return "Purchases are disabled on your device!"
|
||||
case .restored: return "You've successfully restored your purchase!"
|
||||
case .purchased: return "You've successfully bought this purchase!"
|
||||
case .purchased: return "Your support means so much to me, thank you for enjoying AC Tape Deck!"
|
||||
}
|
||||
}
|
||||
func title() -> String{
|
||||
switch self {
|
||||
case .disabled: return ""
|
||||
case .restored: return ""
|
||||
case .purchased: return "Thank you!"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<string>To select songs for each hour</string>
|
||||
<key>UIAppFonts</key>
|
||||
<array>
|
||||
<string>FinkHeavyttf</string>
|
||||
<string>FinkHeavy.ttf</string>
|
||||
</array>
|
||||
<key>UIApplicationSceneManifest</key>
|
||||
<dict>
|
||||
|
|
|
@ -17,6 +17,12 @@ class ThirdViewController: UIViewController {
|
|||
}
|
||||
}
|
||||
|
||||
@IBAction func privacyButton(_ sender: Any) {
|
||||
if let url = URL(string: "https://micahpgomez.dev/Privacy.html") {
|
||||
UIApplication.shared.open(url)
|
||||
}
|
||||
}
|
||||
|
||||
@IBAction func supportEmail(_ sender: Any) {
|
||||
if let url = URL(string: "mailto:support@micahpgomez.dev") {
|
||||
UIApplication.shared.open(url)
|
||||
|
@ -24,7 +30,7 @@ class ThirdViewController: UIViewController {
|
|||
}
|
||||
|
||||
@IBAction func smallTipButton(_ sender: Any) {
|
||||
IAPHandler.shared.purchaseMyProduct(index: 0)
|
||||
IAPHandler.shared.purchaseMyProduct(index: 2)
|
||||
}
|
||||
|
||||
@IBAction func mediumTipButton(_ sender: Any) {
|
||||
|
@ -32,7 +38,7 @@ class ThirdViewController: UIViewController {
|
|||
}
|
||||
|
||||
@IBAction func largeTipButton(_ sender: Any) {
|
||||
IAPHandler.shared.purchaseMyProduct(index: 2)
|
||||
IAPHandler.shared.purchaseMyProduct(index: 0)
|
||||
}
|
||||
|
||||
let defaults = UserDefaults.standard
|
||||
|
@ -41,7 +47,19 @@ class ThirdViewController: UIViewController {
|
|||
super.viewDidLoad()
|
||||
// Do any additional setup after loading the view.
|
||||
//print("view loaded!")
|
||||
IAPHandler.shared.fetchAvailableProducts()
|
||||
|
||||
IAPHandler.shared.purchaseStatusBlock = {[weak self] (type) in
|
||||
guard let strongSelf = self else{ return }
|
||||
if type == .purchased {
|
||||
let alertView = UIAlertController(title: type.title(), message: type.message(), preferredStyle: .alert)
|
||||
let action = UIAlertAction(title: "OK", style: .default, handler: { (alert) in
|
||||
|
||||
})
|
||||
alertView.addAction(action)
|
||||
strongSelf.present(alertView, animated: true, completion: nil)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Reference in a new issue