Post

Replies

Boosts

Views

Activity

Identify device ID´s, which are used by Apple testers
Hi everyone, I have developed an app that communicates with a server. As soon as a device connects to the server, the device token is stored in the database. When the app is being tested, Apple's testers create a large number of entries in the database. So now to my question. Can I identify which entries are being made by devices used by Apple testers? Does anyone have an answer to my question?
0
0
280
Jun ’21
Swift-iOS: Save all Remote-Notifications in Database (App is terminated)
Hi there,  I would like to save all received notifications in a database. This works if someone clicks on the notification or the notification are received while the app is in the foreground. But the challenge is to save the notification while the app is terminated (loud push). If I tap on App Icon the function application:didFinishLaunchingWithOptions: is called with launchOptions set to nil. Does someone know a solution to this challenge? best regards
1
0
2.2k
Nov ’20
Swift-iOS: Status Bar blinks one time after launch
Hi there, in the general settings the checkbox "Hide status bar" is set. So the status bar in the LaunchScreen is hidden. The status bar in the ViewController is still visible. I'm using the following code to hide the status bar in the ViewController. override var prefersStatusBarHidden: Bool {return true} The issue is, that the status bar blinks one short time when changing the LaunchScreen to the ViewController. I hope someone can help me.
1
0
798
Oct ’20
Swift: App in portrait mode - How can I set landscape mode only for one Controller/View/Page?
Hi there, I use SafariServices to show a webpage. So the challenge is to use the landscape mode only with the SafariController. import SafariServices let config = SFSafariViewController.Configuration() config.entersReaderIfAvailable = true config.barCollapsingEnabled = false let vc = SFSafariViewController(url: url, configuration: config) present(vc, animated: true) In the project settings the "Device Orientation" is set to "Portrait". Do someone know a solution for this?
1
0
2.5k
Sep ’20
UISwitch-iOS 14-Swift: Programmatically added Switch doesn't work anymore
Hi there, I´ve added a SwitchControl to a "SettingsCell". Since I've updated to iOS 14, the Switch is shown in the Settings but I can't switch it anymore. No action is possible. import Foundation import UIKit class SettingsCell: UITableViewCell { 		 		// MARK: - Properties 		 		var sectionType: sectionType? { 				didSet{ 						guard let sectionType = sectionType else { return } 						textLabel?.text = sectionType.description 						SwitchControl.isHidden = !sectionType.constrainsSwitch 				} 		} 		 		lazy var SwitchControl: UISwitch = { 				let SwitchControl = UISwitch() 				SwitchControl.isOn = true 				SwitchControl.isEnabled = true 				SwitchControl.onTintColor = UIColor(red: 55/255, green: 120/255, blue: 250/255, alpha: 1) 				SwitchControl.translatesAutoresizingMaskIntoConstraints = false 				SwitchControl.addTarget(self, action: #selector(handleSwitchAction), for: .valueChanged) 		 				return SwitchControl 		}() 		 		// MARK: - Init 		 		override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { 				super.init(style: style, reuseIdentifier: reuseIdentifier) 				 				addSubview(SwitchControl) 				SwitchControl.centerYAnchor.constraint(equalTo: centerYAnchor).isActive = true 				SwitchControl.rightAnchor.constraint(equalTo: rightAnchor, constant: -12).isActive = true 				 		} 		 		required init?(coder aDecoder: NSCoder) { 				fatalError("init(coder:) has not been implemented") 		} 		 		// Mark - selectors 		 		@objc func handleSwitchAction(sender: UISwitch){ 				 				 				if sender.isOn { 						print("Turned on") 						UIApplication.shared.registerForRemoteNotifications() 						 						 				} 				else{ 						UIApplication.shared.unregisterForRemoteNotifications() 						print("Turned off") 				} 		} 		 } Do someone know a solution for this issue?
6
1
3.4k
Sep ’20