Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
26 changes: 23 additions & 3 deletions LocalNotificationBase.xcodeproj/project.pbxproj
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
AA6671CE22B1292D00824252 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AA6671CC22B1292D00824252 /* Main.storyboard */; };
AA6671D022B1293000824252 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = AA6671CF22B1293000824252 /* Assets.xcassets */; };
AA6671D322B1293000824252 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AA6671D122B1293000824252 /* LaunchScreen.storyboard */; };
CB27C7E322B2C79300D97C55 /* BronzeVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB27C7E222B2C79300D97C55 /* BronzeVC.swift */; };
CB27C7E522B2C7A400D97C55 /* PrataVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB27C7E422B2C7A400D97C55 /* PrataVC.swift */; };
CB27C7E722B2C7B000D97C55 /* OuroVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB27C7E622B2C7B000D97C55 /* OuroVC.swift */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -22,6 +25,9 @@
AA6671CF22B1293000824252 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
AA6671D222B1293000824252 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
AA6671D422B1293000824252 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
CB27C7E222B2C79300D97C55 /* BronzeVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BronzeVC.swift; sourceTree = "<group>"; };
CB27C7E422B2C7A400D97C55 /* PrataVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PrataVC.swift; sourceTree = "<group>"; };
CB27C7E622B2C7B000D97C55 /* OuroVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuroVC.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -54,8 +60,8 @@
AA6671C722B1292D00824252 /* LocalNotificationBase */ = {
isa = PBXGroup;
children = (
CB27C7E822B2C7BB00D97C55 /* VC */,
AA6671C822B1292D00824252 /* AppDelegate.swift */,
AA6671CA22B1292D00824252 /* BaseViewController.swift */,
AA6671CC22B1292D00824252 /* Main.storyboard */,
AA6671CF22B1293000824252 /* Assets.xcassets */,
AA6671D122B1293000824252 /* LaunchScreen.storyboard */,
Expand All @@ -64,6 +70,17 @@
path = LocalNotificationBase;
sourceTree = "<group>";
};
CB27C7E822B2C7BB00D97C55 /* VC */ = {
isa = PBXGroup;
children = (
CB27C7E222B2C79300D97C55 /* BronzeVC.swift */,
CB27C7E622B2C7B000D97C55 /* OuroVC.swift */,
CB27C7E422B2C7A400D97C55 /* PrataVC.swift */,
AA6671CA22B1292D00824252 /* BaseViewController.swift */,
);
path = VC;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -135,8 +152,11 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
CB27C7E322B2C79300D97C55 /* BronzeVC.swift in Sources */,
CB27C7E522B2C7A400D97C55 /* PrataVC.swift in Sources */,
AA6671CB22B1292D00824252 /* BaseViewController.swift in Sources */,
AA6671C922B1292D00824252 /* AppDelegate.swift in Sources */,
CB27C7E722B2C7B000D97C55 /* OuroVC.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -283,7 +303,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = GT48V5L69E;
DEVELOPMENT_TEAM = W76FRTKWHT;
INFOPLIST_FILE = LocalNotificationBase/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -301,7 +321,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = GT48V5L69E;
DEVELOPMENT_TEAM = W76FRTKWHT;
INFOPLIST_FILE = LocalNotificationBase/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand Down
Empty file.
Empty file.
Binary file added LocalNotificationBase/.DS_Store
Binary file not shown.
Empty file modified LocalNotificationBase/AppDelegate.swift
100644 → 100755
Empty file.
Empty file.
Empty file modified LocalNotificationBase/Assets.xcassets/Contents.json
100644 → 100755
Empty file.
Empty file modified LocalNotificationBase/Base.lproj/LaunchScreen.storyboard
100644 → 100755
Empty file.
142 changes: 140 additions & 2 deletions LocalNotificationBase/Base.lproj/Main.storyboard
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="6Uu-jt-7GM">
<device id="retina6_1" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
Expand All @@ -10,7 +10,143 @@
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Base View Controller-->
<!--Prata-->
<scene sceneID="x2Q-8z-a16">
<objects>
<viewController id="j3U-yp-eCJ" customClass="Prata" customModule="LocalNotificationBase" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="RlT-qW-C0B">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<viewLayoutGuide key="safeArea" id="CVP-BL-JYo"/>
</view>
<tabBarItem key="tabBarItem" title="Prata" id="Sf4-e0-U1F"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="L1Z-6G-5x6" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-1620" y="678"/>
</scene>
<!--Ouro-->
<scene sceneID="Ew9-w5-eyE">
<objects>
<viewController id="vqH-oD-KeE" customClass="Ouro" customModule="LocalNotificationBase" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ceo-oC-MHv">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<viewLayoutGuide key="safeArea" id="VVX-8f-2Dc"/>
</view>
<tabBarItem key="tabBarItem" title="Ouro" id="e0I-BH-ChO"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="B91-SZ-UkP" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-817" y="678"/>
</scene>
<!--Bronze-->
<scene sceneID="CY4-Nv-MVc">
<objects>
<viewController id="xSI-hE-8JG" customClass="Bronze" customModule="LocalNotificationBase" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="ATL-9x-pco">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Digite o título da notificação..." textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="nJc-bt-1dD">
<rect key="frame" x="20" y="110" width="381" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="20"/>
<textInputTraits key="textInputTraits"/>
</textField>
<textField opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Digite o campo da notificação..." textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="d1d-q6-bko">
<rect key="frame" x="20" y="192" width="381" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="20"/>
<textInputTraits key="textInputTraits"/>
</textField>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="IwN-qW-azi">
<rect key="frame" x="124" y="371" width="166" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<state key="normal" title="Criar Notificação"/>
<connections>
<action selector="criarNotificacao:" destination="xSI-hE-8JG" eventType="touchUpInside" id="raT-Uw-elK"/>
</connections>
</button>
<textField opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Digite o intervalo da notificação..." textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="k1H-LI-b1m">
<rect key="frame" x="20" y="274" width="381" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="20"/>
<textInputTraits key="textInputTraits"/>
</textField>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Som" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="WDb-gP-TTY">
<rect key="frame" x="20" y="434" width="128" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Notificação" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="toV-XC-D7P">
<rect key="frame" x="20" y="484" width="171" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="pIz-JK-hXn">
<rect key="frame" x="298" y="434" width="49" height="31"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</switch>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="BJC-kc-TZg">
<rect key="frame" x="298" y="494" width="49" height="31"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</switch>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="204-Y1-o6M">
<rect key="frame" x="298" y="434" width="49" height="31"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</switch>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="CXY-TJ-BHp">
<rect key="frame" x="298" y="494" width="49" height="31"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</switch>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<viewLayoutGuide key="safeArea" id="FuB-wi-7QQ"/>
</view>
<tabBarItem key="tabBarItem" title="Bronze" id="dtU-5U-NyH"/>
<connections>
<outlet property="corpo" destination="d1d-q6-bko" id="nHY-Er-KLM"/>
<outlet property="notificacaoSwitch" destination="CXY-TJ-BHp" id="cD0-8Y-0yE"/>
<outlet property="somSwitch" destination="204-Y1-o6M" id="1MG-w4-VVs"/>
<outlet property="tempo" destination="k1H-LI-b1m" id="q5z-Da-dTK"/>
<outlet property="titulo" destination="nJc-bt-1dD" id="9gu-Qx-SsI"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="4I7-Hd-Jel" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-2271.0144927536235" y="677.67857142857144"/>
</scene>
<!--Tab Bar Controller-->
<scene sceneID="Tvu-x6-RXP">
<objects>
<tabBarController id="6Uu-jt-7GM" sceneMemberID="viewController">
<tabBar key="tabBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="MNi-bS-nbH">
<rect key="frame" x="0.0" y="0.0" width="414" height="49"/>
<autoresizingMask key="autoresizingMask"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</tabBar>
<connections>
<segue destination="BYZ-38-t0r" kind="relationship" relationship="viewControllers" id="sXy-ma-KcT"/>
<segue destination="xSI-hE-8JG" kind="relationship" relationship="viewControllers" id="aBC-cP-fzL"/>
<segue destination="j3U-yp-eCJ" kind="relationship" relationship="viewControllers" id="GUS-3s-cdW"/>
<segue destination="vqH-oD-KeE" kind="relationship" relationship="viewControllers" id="64t-ed-uXu"/>
</connections>
</tabBarController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Eku-hD-yMQ" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-1619" y="-50"/>
</scene>
<!--Default-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="BaseViewController" customModule="LocalNotificationBase" customModuleProvider="target" sceneMemberID="viewController">
Expand All @@ -31,9 +167,11 @@
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
<tabBarItem key="tabBarItem" title="Default" id="gpQ-yb-e3Y"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-652" y="-50"/>
</scene>
</scenes>
</document>
Empty file modified LocalNotificationBase/Info.plist
100644 → 100755
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ class BaseViewController: UIViewController {
if settings.authorizationStatus == .authorized {

let content = UNMutableNotificationContent()
content.title = NSString.localizedUserNotificationString(forKey: "Lembre-se", arguments: nil)
content.body = NSString.localizedUserNotificationString(forKey: "Você se lembrou", arguments: nil)
content.title = NSString.localizedUserNotificationString(forKey: "Lembrar", arguments: nil)
content.body = NSString.localizedUserNotificationString(forKey: "O app te lembrou de se lembrar", arguments: nil)
content.sound = UNNotificationSound.default

let trigger = UNTimeIntervalNotificationTrigger(timeInterval: 5, repeats: false)
let trigger = UNTimeIntervalNotificationTrigger(timeInterval: 10, repeats: false)

let request = UNNotificationRequest(identifier: "5seconds", content: content, trigger: trigger)

Expand Down
Loading