Kaynağa Gözat

Merge branch 'BaseProject' into Sync

Iñigo Valentin 9 yıl önce
ebeveyn
işleme
5c1c10b4c3

+ 0 - 12
app/AppDelegate.swift

@@ -62,20 +62,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
 		
 		
 		let when = DispatchTime.now() + 120 // 2 minutes to perform the sync.
 		let when = DispatchTime.now() + 120 // 2 minutes to perform the sync.
 		DispatchQueue.main.asyncAfter(deadline: when) {
 		DispatchQueue.main.asyncAfter(deadline: when) {
-			NSLog(":BACKGROUND:LOG: Calling completion handler.")
 			completionHandler(UIBackgroundFetchResult.newData)
 			completionHandler(UIBackgroundFetchResult.newData)
 		}
 		}
-		
-		/*if let tabBarController = window?.rootViewController as? UITabBarController, let viewControllers = tabBarController.viewControllers {
-			for viewController in viewControllers {
-				if let fetchViewController = viewController as? FetchViewController {
-					fetchViewController.fetch {
-						fetchViewController.updateUI()
-						completionHandler(.newData)
-					}
-				}
-			}
-		}*/
 	}
 	}
 
 
 
 

+ 3 - 3
app/Base.lproj/Main.storyboard

@@ -16,7 +16,7 @@
         <scene sceneID="e3W-6Z-Jyk">
         <scene sceneID="e3W-6Z-Jyk">
             <objects>
             <objects>
                 <navigationController title="Gasteizko Margolariak" id="cgF-cq-ysf" sceneMemberID="viewController">
                 <navigationController title="Gasteizko Margolariak" id="cgF-cq-ysf" sceneMemberID="viewController">
-                    <navigationBar key="navigationBar" contentMode="scaleToFill" id="lgI-h9-O0s">
+                    <navigationBar key="navigationBar" contentMode="scaleToFill" misplaced="YES" id="lgI-h9-O0s">
                         <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
                         <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
                         <autoresizingMask key="autoresizingMask"/>
                         <autoresizingMask key="autoresizingMask"/>
                         <color key="backgroundColor" red="0.4079896717" green="1" blue="0.34807942549999998" alpha="1" colorSpace="calibratedRGB"/>
                         <color key="backgroundColor" red="0.4079896717" green="1" blue="0.34807942549999998" alpha="1" colorSpace="calibratedRGB"/>
@@ -85,12 +85,12 @@
                                                         <constraint firstAttribute="width" constant="100" id="eKL-ga-53F"/>
                                                         <constraint firstAttribute="width" constant="100" id="eKL-ga-53F"/>
                                                     </constraints>
                                                     </constraints>
                                                     <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="17"/>
-                                                    <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+                                                    <color key="textColor" red="0.78431372549019607" green="0.78431372549019607" blue="0.78431372549019607" alpha="1" colorSpace="calibratedRGB"/>
                                                     <nil key="highlightedColor"/>
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 </label>
                                                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZNu-9N-o6K">
                                                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZNu-9N-o6K">
                                                     <rect key="frame" x="4" y="38" width="92" height="4"/>
                                                     <rect key="frame" x="4" y="38" width="92" height="4"/>
-                                                    <color key="backgroundColor" red="0.80000000000000004" green="0.80000000000000004" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+                                                    <color key="backgroundColor" red="0.3529411764705882" green="0.70588235294117641" blue="1" alpha="1" colorSpace="calibratedRGB"/>
                                                     <constraints>
                                                     <constraints>
                                                         <constraint firstAttribute="height" constant="4" id="Si5-HX-bjR"/>
                                                         <constraint firstAttribute="height" constant="4" id="Si5-HX-bjR"/>
                                                     </constraints>
                                                     </constraints>

+ 0 - 1
app/FetchLocation.swift

@@ -46,7 +46,6 @@ class FetchLocation{
 			}
 			}
 			let status = (response as! HTTPURLResponse).statusCode
 			let status = (response as! HTTPURLResponse).statusCode
 			
 			
-			NSLog(":LOCATION:LOG: Response code \(status)")
 			if status == 200{
 			if status == 200{
 			
 			
 				guard let data = data else {
 				guard let data = data else {

+ 0 - 1
app/FutureActivityViewController.swift

@@ -142,7 +142,6 @@ class FutureActivityViewController: UIViewController, UIGestureRecognizerDelegat
 				do {
 				do {
 					let itiSearchResults = try context.fetch(itiFetchRequest)
 					let itiSearchResults = try context.fetch(itiFetchRequest)
 					if itiSearchResults.count == 0{
 					if itiSearchResults.count == 0{
-						NSLog(":FUTUREACTIVITY:DEBUG: No itinerary for activity \(id)")
 						self.itineraryContainer.isHidden = true
 						self.itineraryContainer.isHidden = true
 					}
 					}
 					else{
 					else{

+ 0 - 3
app/GalleryView.swift

@@ -53,8 +53,6 @@ class GalleryView: UIView {
 		
 		
 		super.init(coder: aDecoder)
 		super.init(coder: aDecoder)
 		
 		
-		NSLog(":GALLERY:LOG: Init gallery section.")
-		
 		//Load the contents of the HomeView.xib file.
 		//Load the contents of the HomeView.xib file.
 		Bundle.main.loadNibNamed("GalleryView", owner: self, options: nil)
 		Bundle.main.loadNibNamed("GalleryView", owner: self, options: nil)
 		self.addSubview(container)
 		self.addSubview(container)
@@ -155,7 +153,6 @@ class GalleryView: UIView {
 		self.scrollView.contentSize.height = 2500 //CGFloat(h);
 		self.scrollView.contentSize.height = 2500 //CGFloat(h);
 		
 		
 		self.setUpRowsTapRecognizers()
 		self.setUpRowsTapRecognizers()
-		NSLog(":GALLERY:LOG: Finished loading gallery section.")
 	}
 	}
 	
 	
 	
 	

+ 1 - 1
app/HomeView.swift

@@ -221,7 +221,7 @@ class HomeView: UIView {
 							self.lablancaImage.isHidden = true;
 							self.lablancaImage.isHidden = true;
 						}
 						}
 						else{
 						else{
-							let path = "img/blog/thumb/\(filename)"
+							let path = "img/fiestas/thumb/\(filename)"
 							self.lablancaImage.setImage(localPath: path, remotePath: "https://margolariak.com/\(path)")
 							self.lablancaImage.setImage(localPath: path, remotePath: "https://margolariak.com/\(path)")
 						}
 						}
 					}
 					}

+ 11 - 2
app/LablancaView.swift

@@ -57,8 +57,6 @@ class LablancaView: UIView {
 		
 		
 		super.init(coder: aDecoder)
 		super.init(coder: aDecoder)
 		
 		
-		NSLog(":LABLANCA:LOG: Init lablanca section.")
-
 		Bundle.main.loadNibNamed("LablancaView", owner: self, options: nil)
 		Bundle.main.loadNibNamed("LablancaView", owner: self, options: nil)
 		self.addSubview(container)
 		self.addSubview(container)
 		self.container.frame = self.bounds
 		self.container.frame = self.bounds
@@ -108,6 +106,17 @@ class LablancaView: UIView {
 			
 			
 				// Set description
 				// Set description
 				self.fText.text = (r.value(forKey: "text_\(lang)") as! String?)?.decode().stripHtml()
 				self.fText.text = (r.value(forKey: "text_\(lang)") as! String?)?.decode().stripHtml()
+				
+				// Set image
+				let filename: String = r.value(forKey: "img") as! String
+				if (filename == ""){
+					// Hide the imageview
+					self.fImage.isHidden = true;
+				}
+				else{
+					let path = "img/fiestas/thumb/\(filename)"
+					self.fImage.setImage(localPath: path, remotePath: "https://margolariak.com/\(path)")
+				}
 			}
 			}
 
 
 		}
 		}

+ 0 - 1
app/LocationView.swift

@@ -92,7 +92,6 @@ class LocationView: UIView {
 	Get new location
 	Get new location
 	*/
 	*/
 	func getNewLocation(){
 	func getNewLocation(){
-		NSLog(":LOCATION:LOG: Recalculating location.")
 		let defaults = UserDefaults.standard
 		let defaults = UserDefaults.standard
 		if (defaults.value(forKey: "GMLocLat") != nil && defaults.value(forKey: "GMLocLon") != nil){
 		if (defaults.value(forKey: "GMLocLat") != nil && defaults.value(forKey: "GMLocLon") != nil){
 			let lat = defaults.value(forKey: "GMLocLat") as! Double
 			let lat = defaults.value(forKey: "GMLocLat") as! Double

+ 3 - 3
app/LocationView.xib

@@ -36,7 +36,7 @@
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3aZ-8G-e8X" userLabel="Entry">
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3aZ-8G-e8X" userLabel="Entry">
                             <rect key="frame" x="10" y="43" width="335" height="594"/>
                             <rect key="frame" x="10" y="43" width="335" height="594"/>
                             <subviews>
                             <subviews>
-                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="La cuadrilla está por ahí!" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jwp-Sd-GF5" userLabel="Title">
+                                <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="La cuadrilla está por ahí!" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jwp-Sd-GF5" userLabel="Title">
                                     <rect key="frame" x="10" y="10" width="315" height="22"/>
                                     <rect key="frame" x="10" y="10" width="315" height="22"/>
                                     <constraints>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="22" id="JQk-vd-DLN"/>
                                         <constraint firstAttribute="height" constant="22" id="JQk-vd-DLN"/>
@@ -45,7 +45,7 @@
                                     <color key="textColor" red="0.1529411765" green="0.33333333329999998" blue="0.45098039220000002" alpha="1" colorSpace="calibratedRGB"/>
                                     <color key="textColor" red="0.1529411765" green="0.33333333329999998" blue="0.45098039220000002" alpha="1" colorSpace="calibratedRGB"/>
                                     <nil key="highlightedColor"/>
                                     <nil key="highlightedColor"/>
                                 </label>
                                 </label>
-                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lB5-i1-GOe" userLabel="Message">
+                                <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lB5-i1-GOe" userLabel="Message">
                                     <rect key="frame" x="11.5" y="42" width="311" height="21"/>
                                     <rect key="frame" x="11.5" y="42" width="311" height="21"/>
                                     <constraints>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="21" id="ann-h3-NzS"/>
                                         <constraint firstAttribute="height" constant="21" id="ann-h3-NzS"/>
@@ -60,7 +60,7 @@
                                     <nil key="textColor"/>
                                     <nil key="textColor"/>
                                     <nil key="highlightedColor"/>
                                     <nil key="highlightedColor"/>
                                 </label>
                                 </label>
-                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="guk-vu-ykd" customClass="GMSMapView">
+                                <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="guk-vu-ykd" customClass="GMSMapView">
                                     <rect key="frame" x="10" y="73" width="315" height="492"/>
                                     <rect key="frame" x="10" y="73" width="315" height="492"/>
                                     <color key="backgroundColor" red="1" green="0.20334201390000001" blue="0.32001410590000001" alpha="1" colorSpace="calibratedRGB"/>
                                     <color key="backgroundColor" red="1" green="0.20334201390000001" blue="0.32001410590000001" alpha="1" colorSpace="calibratedRGB"/>
                                     <userDefinedRuntimeAttributes>
                                     <userDefinedRuntimeAttributes>

+ 1 - 1
app/Notifications.swift

@@ -71,8 +71,8 @@ class Notifications{
 			}
 			}
 			
 			
 			let strData: String = String(data:data, encoding: String.Encoding.utf8)!
 			let strData: String = String(data:data, encoding: String.Encoding.utf8)!
-			NSLog(":NOTIFICATION:LOG: Data received: \(strData)")
 			if strData.length > 0{
 			if strData.length > 0{
+				NSLog(":NOTIFICATION:LOG: Notifications received.")
 				let dataNotification: [String] = self.getData(data: strData)
 				let dataNotification: [String] = self.getData(data: strData)
 				self.saveNotifications(entries: dataNotification)
 				self.saveNotifications(entries: dataNotification)
 			}
 			}

+ 0 - 42
app/Sync.swift

@@ -221,7 +221,6 @@ class Sync{
 	func getTable(data: String, table: String) -> [String]{
 	func getTable(data: String, table: String) -> [String]{
 		//Does the table exists?
 		//Does the table exists?
 		if data.indexOf(target: "\"\(table)\":[") == nil{
 		if data.indexOf(target: "\"\(table)\":[") == nil{
-			NSLog(":SYNC:LOG: Empty table: \(table).")
 			return [String]()
 			return [String]()
 		}
 		}
 		let iS : Int? = data.indexOf(target: "\"\(table)\":[")
 		let iS : Int? = data.indexOf(target: "\"\(table)\":[")
@@ -237,8 +236,6 @@ class Sync{
 		entries[0] = entries[0].subStr(start: 1, end: entries[0].length - 1)
 		entries[0] = entries[0].subStr(start: 1, end: entries[0].length - 1)
 		entries[entries.count - 1] = entries[entries.count - 1].subStr(start: 0, end: entries[entries.count - 1].length - 2)
 		entries[entries.count - 1] = entries[entries.count - 1].subStr(start: 0, end: entries[entries.count - 1].length - 2)
 		
 		
-		NSLog(":SYNC:LOG: Table \(table) has \(entries.count) rows.")
-		
 		//Return the array
 		//Return the array
 		return entries
 		return entries
 	}
 	}
@@ -250,8 +247,6 @@ class Sync{
 	*/
 	*/
 	func saveTablePlace(entries : [String]){
 	func saveTablePlace(entries : [String]){
 		
 		
-		NSLog(":SYNC:LOG: Saving table Place.")
-		
 		//Set up context
 		//Set up context
 		let appDelegate = UIApplication.shared.delegate as! AppDelegate
 		let appDelegate = UIApplication.shared.delegate as! AppDelegate
 		let context = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
 		let context = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
@@ -344,8 +339,6 @@ class Sync{
 	*/
 	*/
 	func saveTablePeople(entries : [String]){
 	func saveTablePeople(entries : [String]){
 		
 		
-		NSLog(":SYNC:LOG: Saving table People.")
-		
 		//Set up context
 		//Set up context
 		let appDelegate = UIApplication.shared.delegate as! AppDelegate
 		let appDelegate = UIApplication.shared.delegate as! AppDelegate
 		let context = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
 		let context = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
@@ -414,8 +407,6 @@ class Sync{
 	*/
 	*/
 	func saveTablePost(entries : [String]){
 	func saveTablePost(entries : [String]){
 		
 		
-		NSLog(":SYNC:LOG: Saving table Post.")
-		
 		let dateFormatter = DateFormatter()
 		let dateFormatter = DateFormatter()
 		dateFormatter.timeZone = TimeZone.ReferenceType.local
 		dateFormatter.timeZone = TimeZone.ReferenceType.local
 		
 		
@@ -519,8 +510,6 @@ class Sync{
 	*/
 	*/
 	func saveTablePostComment(entries : [String]){
 	func saveTablePostComment(entries : [String]){
 		
 		
-		NSLog(":SYNC:LOG: Saving table Post_comment.")
-		
 		let dateFormatter = DateFormatter()
 		let dateFormatter = DateFormatter()
 		dateFormatter.timeZone = TimeZone.ReferenceType.local
 		dateFormatter.timeZone = TimeZone.ReferenceType.local
 		
 		
@@ -598,8 +587,6 @@ class Sync{
 	*/
 	*/
 	func saveTablePostImage(entries : [String]){
 	func saveTablePostImage(entries : [String]){
 		
 		
-		NSLog(":SYNC:LOG: Saving table Post_image.")
-		
 		//Set up context
 		//Set up context
 		let appDelegate = UIApplication.shared.delegate as! AppDelegate
 		let appDelegate = UIApplication.shared.delegate as! AppDelegate
 		let context = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
 		let context = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
@@ -662,8 +649,6 @@ class Sync{
 	*/
 	*/
 	func saveTablePostTag(entries : [String]){
 	func saveTablePostTag(entries : [String]){
 		
 		
-		NSLog(":SYNC:LOG: Saving table Post_tag.")
-		
 		//Set up context
 		//Set up context
 		let appDelegate = UIApplication.shared.delegate as! AppDelegate
 		let appDelegate = UIApplication.shared.delegate as! AppDelegate
 		let context = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
 		let context = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
@@ -716,8 +701,6 @@ class Sync{
 	*/
 	*/
 	func saveTableActivity(entries : [String]){
 	func saveTableActivity(entries : [String]){
 		
 		
-		NSLog(":SYNC:LOG: Saving table Activity.")
-		
 		let dateFormatter = DateFormatter()
 		let dateFormatter = DateFormatter()
 		dateFormatter.timeZone = TimeZone.ReferenceType.local
 		dateFormatter.timeZone = TimeZone.ReferenceType.local
 		
 		
@@ -874,8 +857,6 @@ class Sync{
 	*/
 	*/
 	func saveTableActivityComment(entries : [String]){
 	func saveTableActivityComment(entries : [String]){
 		
 		
-		NSLog(":SYNC:LOG: Saving table Activity_comment.")
-		
 		let dateFormatter = DateFormatter()
 		let dateFormatter = DateFormatter()
 		dateFormatter.timeZone = TimeZone.ReferenceType.local
 		dateFormatter.timeZone = TimeZone.ReferenceType.local
 		
 		
@@ -953,8 +934,6 @@ class Sync{
 	*/
 	*/
 	func saveTableActivityImage(entries : [String]){
 	func saveTableActivityImage(entries : [String]){
 		
 		
-		NSLog(":SYNC:LOG: Saving table Activity_image.")
-		
 		//Set up context
 		//Set up context
 		let appDelegate = UIApplication.shared.delegate as! AppDelegate
 		let appDelegate = UIApplication.shared.delegate as! AppDelegate
 		let context = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
 		let context = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
@@ -1017,8 +996,6 @@ class Sync{
 	*/
 	*/
 	func saveTableActivityTag(entries : [String]){
 	func saveTableActivityTag(entries : [String]){
 		
 		
-		NSLog(":SYNC:LOG: Saving table Activity_tag.")
-		
 		//Set up context
 		//Set up context
 		let appDelegate = UIApplication.shared.delegate as! AppDelegate
 		let appDelegate = UIApplication.shared.delegate as! AppDelegate
 		let context = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
 		let context = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
@@ -1072,8 +1049,6 @@ class Sync{
 	//CHECK: New (and probably better format than the others.)
 	//CHECK: New (and probably better format than the others.)
 	func saveTableActivityItinerary(entries : [String]){
 	func saveTableActivityItinerary(entries : [String]){
 		
 		
-		NSLog(":SYNC:LOG: Saving table Activity_itinerary.")
-		
 		let dateFormatter = DateFormatter()
 		let dateFormatter = DateFormatter()
 		dateFormatter.timeZone = TimeZone.ReferenceType.local
 		dateFormatter.timeZone = TimeZone.ReferenceType.local
 		
 		
@@ -1184,8 +1159,6 @@ class Sync{
 	*/
 	*/
 	func saveTableAlbum(entries : [String]){
 	func saveTableAlbum(entries : [String]){
 		
 		
-		NSLog(":SYNC:LOG: Saving table Album.")
-		
 		//Set up context
 		//Set up context
 		let appDelegate = UIApplication.shared.delegate as! AppDelegate
 		let appDelegate = UIApplication.shared.delegate as! AppDelegate
 		let context = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
 		let context = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
@@ -1280,8 +1253,6 @@ class Sync{
 	*/
 	*/
 	func saveTablePhoto(entries : [String]){
 	func saveTablePhoto(entries : [String]){
 		
 		
-		NSLog(":SYNC:LOG: Saving table Photo.")
-		
 		let dateFormatter = DateFormatter()
 		let dateFormatter = DateFormatter()
 		dateFormatter.timeZone = TimeZone.ReferenceType.local
 		dateFormatter.timeZone = TimeZone.ReferenceType.local
 		
 		
@@ -1397,8 +1368,6 @@ class Sync{
 	*/
 	*/
 	func saveTablePhotoAlbum(entries : [String]){
 	func saveTablePhotoAlbum(entries : [String]){
 		
 		
-		NSLog(":SYNC:LOG: Saving table Photo_album.")
-		
 		let dateFormatter = DateFormatter()
 		let dateFormatter = DateFormatter()
 		dateFormatter.timeZone = TimeZone.ReferenceType.local
 		dateFormatter.timeZone = TimeZone.ReferenceType.local
 		
 		
@@ -1455,8 +1424,6 @@ class Sync{
 	*/
 	*/
 	func saveTableFestival(entries : [String]){
 	func saveTableFestival(entries : [String]){
 		
 		
-		NSLog(":SYNC:LOG: Saving table Festival.")
-		
 		//Set up context
 		//Set up context
 		let appDelegate = UIApplication.shared.delegate as! AppDelegate
 		let appDelegate = UIApplication.shared.delegate as! AppDelegate
 		let context = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
 		let context = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
@@ -1545,8 +1512,6 @@ class Sync{
 	*/
 	*/
 	func saveTableFestivalDay(entries : [String]){
 	func saveTableFestivalDay(entries : [String]){
 		
 		
-		NSLog(":SYNC:LOG: Saving table FestivalDay.")
-		
 		let dateFormatter = DateFormatter()
 		let dateFormatter = DateFormatter()
 		dateFormatter.timeZone = TimeZone.ReferenceType.local
 		dateFormatter.timeZone = TimeZone.ReferenceType.local
 		
 		
@@ -1624,8 +1589,6 @@ class Sync{
 	*/
 	*/
 	func saveTableFestivalOffer(entries : [String]){
 	func saveTableFestivalOffer(entries : [String]){
 		
 		
-		NSLog(":SYNC:LOG: Saving table FestivalOffer.")
-		
 		//Set up context
 		//Set up context
 		let appDelegate = UIApplication.shared.delegate as! AppDelegate
 		let appDelegate = UIApplication.shared.delegate as! AppDelegate
 		let context = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
 		let context = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
@@ -1725,8 +1688,6 @@ class Sync{
 	*/
 	*/
 	func saveTableFestivalEvent(entries : [String]){
 	func saveTableFestivalEvent(entries : [String]){
 		
 		
-		NSLog(":SYNC:LOG: Saving table FestivalEvent.")
-		
 		let dateFormatter = DateFormatter()
 		let dateFormatter = DateFormatter()
 		dateFormatter.timeZone = TimeZone.ReferenceType.local
 		dateFormatter.timeZone = TimeZone.ReferenceType.local
 		
 		
@@ -1866,8 +1827,6 @@ class Sync{
 	*/
 	*/
 	func saveTableSponsor(entries : [String]){
 	func saveTableSponsor(entries : [String]){
 		
 		
-		NSLog(":SYNC:LOG: Saving table Sponsor.")
-		
 		//Set up context
 		//Set up context
 		let appDelegate = UIApplication.shared.delegate as! AppDelegate
 		let appDelegate = UIApplication.shared.delegate as! AppDelegate
 		let context = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
 		let context = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
@@ -1997,7 +1956,6 @@ class Sync{
 	*/
 	*/
 	func saveSettings(entries : [String]){
 	func saveSettings(entries : [String]){
 		
 		
-		NSLog(":SYNC:LOG: Saving settings.")
 		let defaults = UserDefaults.standard
 		let defaults = UserDefaults.standard
 		
 		
 		// Loop new entries
 		// Loop new entries

+ 1 - 26
app/ViewController.swift

@@ -154,13 +154,9 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
 	*/
 	*/
 	func initialSync(showScreen: Bool){
 	func initialSync(showScreen: Bool){
 		if showScreen == true{
 		if showScreen == true{
-			//performSegue(withIdentifier: "SegueSync", sender: nil)
 			Sync(synchronous: true)
 			Sync(synchronous: true)
 		}
 		}
 		else{
 		else{
-			// TODO CHECK this
-			NSLog(":CONTROLLER:DEBUG: Re-populating disabled: Throws error.")
-			//self.populate()
 			syncSegue?.destination.dismiss(animated: true, completion: nil)
 			syncSegue?.destination.dismiss(animated: true, completion: nil)
 		}
 		}
 	}
 	}
@@ -202,7 +198,6 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
 	}
 	}
 	
 	
 	override func viewWillAppear(_ animated: Bool) {
 	override func viewWillAppear(_ animated: Bool) {
-		self.populate()
 		super.viewWillAppear(animated)
 		super.viewWillAppear(animated)
 	}
 	}
 	
 	
@@ -244,27 +239,7 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
 	func fetchLocation(){
 	func fetchLocation(){
 		FetchLocation()
 		FetchLocation()
 	}
 	}
-
-	/**
-	Actually populates all sections.
-	As of now, not working.
-	*/
-	func populate(){
-		// TODO Set this up.
-		if (self.containerViewHome != nil){
-			//(self.containerViewHome as HomeView).populate()
-			//let ng = self.containerViewHome.dbgTxt
-			//NSLog("AAAAA \(ng)")
-		}
-		else{
-			NSLog("CONTROLLER:ERROR: containerViewHome couldn't be populated: It is nil.")
-		}
-		//self.containerLocation.populate()
-		//self.containerLablanca.populate()
-		//self.containerViewActivities.populate()
-		//self.containerViewBlog.populate()
-		//self.containerGallery.populate()
-	}
+	
 	
 	
 	/**
 	/**
 	Executed when the view is actually shown.
 	Executed when the view is actually shown.