Browse Source

New class push notification

Marino Faggiana 8 years ago
parent
commit
d9b5be398e

+ 16 - 0
Nextcloud.xcodeproj/project.pbxproj

@@ -545,6 +545,8 @@
 		F7C00D471E2D0D0F0032160B /* CCCellOffline.m in Sources */ = {isa = PBXBuildFile; fileRef = F7C00D431E2D0D0F0032160B /* CCCellOffline.m */; };
 		F7C00D481E2D0D0F0032160B /* CCCellOffline.xib in Resources */ = {isa = PBXBuildFile; fileRef = F7C00D441E2D0D0F0032160B /* CCCellOffline.xib */; };
 		F7C00D491E2D0D0F0032160B /* CCOffline.m in Sources */ = {isa = PBXBuildFile; fileRef = F7C00D461E2D0D0F0032160B /* CCOffline.m */; };
+		F7C5258F1E3B441200FFE02C /* Notification.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F7C5258E1E3B441200FFE02C /* Notification.storyboard */; };
+		F7C5259E1E3B45FA00FFE02C /* NotificationPushKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7C5259D1E3B45FA00FFE02C /* NotificationPushKey.swift */; };
 		F7C994321E3A92C500C2466C /* CCConstant.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7C994311E3A92C400C2466C /* CCConstant.swift */; };
 		F7C994331E3A92C500C2466C /* CCConstant.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7C994311E3A92C400C2466C /* CCConstant.swift */; };
 		F7C994341E3A92C500C2466C /* CCConstant.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7C994311E3A92C400C2466C /* CCConstant.swift */; };
@@ -1458,6 +1460,8 @@
 		F7C1D8BD1D47781C00B89DEA /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/InfoPlist.strings; sourceTree = "<group>"; };
 		F7C1D8BE1D47781D00B89DEA /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/Intro.strings; sourceTree = "<group>"; };
 		F7C1D8BF1D47781D00B89DEA /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/Error.strings; sourceTree = "<group>"; };
+		F7C5258E1E3B441200FFE02C /* Notification.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Notification.storyboard; path = Notification/Notification.storyboard; sourceTree = "<group>"; };
+		F7C5259D1E3B45FA00FFE02C /* NotificationPushKey.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = NotificationPushKey.swift; path = Notification/NotificationPushKey.swift; sourceTree = "<group>"; };
 		F7C8C1721B482A920048180E /* CCMetadata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = CCMetadata.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
 		F7C8C1731B482A920048180E /* CCMetadata.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = CCMetadata.m; sourceTree = "<group>"; };
 		F7C8C1901B482CEA0048180E /* CCGlobal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCGlobal.h; sourceTree = "<group>"; };
@@ -2998,6 +3002,15 @@
 			path = "Share Ext";
 			sourceTree = "<group>";
 		};
+		F7C5259A1E3B441D00FFE02C /* Notification */ = {
+			isa = PBXGroup;
+			children = (
+				F7C5259D1E3B45FA00FFE02C /* NotificationPushKey.swift */,
+				F7C5258E1E3B441200FFE02C /* Notification.storyboard */,
+			);
+			name = Notification;
+			sourceTree = "<group>";
+		};
 		F7CE287E1D1ACFA70025783C /* UINavigationController+CCProgress */ = {
 			isa = PBXGroup;
 			children = (
@@ -3174,6 +3187,7 @@
 				F7D6A0881D82DBFA0045AD1A /* MenuAccount+ControlCenter */,
 				F7F9E3451BC26B19004B9223 /* Move */,
 				F74D3DB81BAC1941000BAE4B /* Networking */,
+				F7C5259A1E3B441D00FFE02C /* Notification */,
 				F7C00D411E2D0D0F0032160B /* Offline */,
 				F7FCFFD51D70798C000E6E29 /* PeekPop */,
 				F719FDAE1CF06645004895D0 /* PhotosCameraUpload */,
@@ -3638,6 +3652,7 @@
 				F77B0F411D118A16002130FE /* ZSStextcolor@2x.png in Resources */,
 				F77B0F421D118A16002130FE /* ImageSelectedOn.png in Resources */,
 				F77B0F431D118A16002130FE /* Raleway-ExtraBold.ttf in Resources */,
+				F7C5258F1E3B441200FFE02C /* Notification.storyboard in Resources */,
 				F77B0F441D118A16002130FE /* Reader-Button-N@2x.png in Resources */,
 				F77B0F461D118A16002130FE /* Reader-Button-H@2x.png in Resources */,
 				F77B0F471D118A16002130FE /* ZSSbgcolor@2x.png in Resources */,
@@ -4012,6 +4027,7 @@
 				F73CCE131DC13776007E38D8 /* XLFormRightImageButton.m in Sources */,
 				F7DAE66E1E2E109F004EFA30 /* CCOfflineFolder.m in Sources */,
 				F77B0E5D1D118A16002130FE /* UIImage+Blurring.m in Sources */,
+				F7C5259E1E3B45FA00FFE02C /* NotificationPushKey.swift in Sources */,
 				F7BE6E2F1D2D5C3B00106933 /* CCQuickActions.m in Sources */,
 				F77B0E5E1D118A16002130FE /* unzip.c in Sources */,
 				F7659A291DC0B726004860C4 /* EAIntroView.m in Sources */,

+ 1 - 1
iOSClient/CCConstant.swift

@@ -23,7 +23,7 @@
 
 import UIKit
 
-class Constant: NSObject {
+class CCConstant: NSObject {
     
     struct GlobalConstants {
         

+ 7 - 0
iOSClient/Notification/Notification.storyboard

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11134" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+    <dependencies>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11106"/>
+    </dependencies>
+    <scenes/>
+</document>

+ 31 - 0
iOSClient/Notification/NotificationPushKey.swift

@@ -0,0 +1,31 @@
+//
+//  CCNotificationPushKey.swift
+//  Crypto Cloud Technology Nextcloud
+//
+//  Created by Marino Faggiana on 27/01/17.
+//  Copyright (c) 2017 TWS. All rights reserved.
+//
+//  Author Marino Faggiana <m.faggiana@twsweb.it>
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+
+import Foundation
+
+class CCNotificationPushKey: NSObject {
+    
+    // Insert here the rsa2048 device PublicKey
+    
+    static let PUBLIC_KEY = ""
+}