Post not yet marked as solved
Here's my context:
User imports a backup file via airdrop, from a laptop to the mobile.
My app opens and asks for a password to import and decrypt the file.
The user decides to cancel instead, so taps the cancel button.
How do I close the app at that point? I have done a lot of googling but so far have not found out how to do it.
Post not yet marked as solved
Hi,
I'm having trouble printing a QRCode to the proper size. I pass it, as a UIImage, to a UIActivityViewController and it prints, but at the full width of the A4 page. I've been looking into all kinds of ways to try and shrink it down, but without success. Is there an image equivalent of UISimpleTextPrintFormatter or something along those lines that makes it simple? Do I need to use a UIViewPrintFormatter? Any help greatly appreciated.
Post not yet marked as solved
Hi. I have a question about whether or not a random salt is necessary when there is no centralised database for hackers to attack. It's pretty clear that it's necessary when there is, but is it important when the users simply backup their data to a password encrypted file in a place of their choosing?
Is it possible for someone with malicious intent to extract a hardcoded salt from a compiled app?
Post not yet marked as solved
I have the option to use touchID in my app if the user chooses to. I'm wondering though about the cancel option. I'm not planning on having a fallback. If the user decides to cancel it's simply because they've decided to close the app. Can I simply close the app using exit(0), or is this considered bad practice?
Post not yet marked as solved
Hi,
I'm having trouble accessing a file on my device. The file is saved to the Files App. On the simulator it runs without a hitch, but on my iPhone it crashes because it doesn't have permission to access the file, even though it created the file. I'm guessing there's probably something that needs setting, perhaps in the info.plist? Supports opening files in place is set to yes, so I've ruled that out as the problem. Any advice much appreciated.
Post not yet marked as solved
I'm having trouble calling the openUrlContexts function from SceneDelegate. I have defined a UTI for an exported backup file, and it saves to the files app with no problems. In the simulator my app opens when the saved file is clicked, so it does make the connection there, but no function is called. Does there need to be some setup code to make this function work, or should it automatically fire up when the file is launched?
Post not yet marked as solved
Hi, I'd like to offer my users the option to save an encrypted backup of their data, from CoreData, to a place of their choosing. Just a textfile with the data in json format. How I envisage it is that they will click the backup button, a popup will ask them to input a password, then they'll save the outputted file somewhere. I don't know how to implement this. I've been playing around with CryptoKit in a playground, but tutorials seem few and far between. What is available isn't geared towards explaining how to do what I want to do. Does anyone know of a resource or tutorial that could help me learn to implement this feature? Any help much appreciated.
Hi all, I'm struggling to find a way to disable buttons in a UIAlertController of .alert style. I have a textfield, for entering the current password, a button for changing the current password and a button for deleting it. I'd like to disable both password buttons until the current password is correctly entered into the textfield, but I'm struggling to find the solution. If anyone can point me in the right direction it would be much appreciated.
Post not yet marked as solved
Hi all,In my app I have an option for users to create a PDF of their data. I'd like them to be able to save the pdf to a flashdrive or hard disk, but in encrypted form. Is it possibe with CryptoKit? Messing about in playground I've been trying to encrypt a plain string, but I get the error message that String doesn't conform to DataProtocol. How do I need to package the string in order to successfully pass it into the function?let key = SymmetricKey(size: .bits256)let contents = try String(contentsOfFile: filePath.path)let data = contentslet encryptedData = datalet sealedBox = try? ChaChaPoly.seal(encryptedData, using: key)
Upon updating to Xcode 11 one of my VC files had @available(iOS 13.0, *) add to it, which stops my app from building. It hasn't been added to any other file. Are there some likely reasons for this to be added?
Post not yet marked as solved
Hi, I'm trying to get to come to grips with tableview cells. I asked in another question, but without any response so I'll try reframing the question.Why does this first piece of code show a cell border edge that is inside the tableView cell.layer.borderWidth = 5 cell.layer.borderColor = colorWhereas this code places the border frame way out of sight beyond the edge of the tableView. I have to subtract considerably more than the right_padding to bring it into view. let right_border = CALayer() let right_padding = CGFloat(4.0) right_border.borderColor = color right_border.frame = CGRect(x: cell.frame.size.width - right_padding, y: 0, width: right_padding, height: 70) right_border.borderWidth = right_padding cell.layer.addSublayer(right_border)Is one dealing with the cell boundaries and the other not? Or is the second piece of code placing the frame outside of the cell? I don't see how it could be, but perhaps it is?
Post not yet marked as solved
Hi all, I have a question about structure. I have a backup button in my settingsVC. I have created an NSObject file with the functions that I need. They put CoreData info into an array and iterate what I want from the array into the variable 'backUpFile'. I've accessed the NSObject file from the button in the settingsVC, and it works. My question is, is this an acceptable way to go about it? Does the test object still reside in memory when the operation is done? Do I need to clear it or do some kind of clean up after getting my result?Cheers for any responses.@IBAction func backUpTapped(_ sender: Any) { let test = BackUp() test.getRecords() test.getInfo() let file = test.backUpFile print(file) }
Hi,I am trying to use .dictionaryHasDefinition(forTerm: ) to test if a definition exists, but I get this error message:"Unable to copy asset information from https://mesu.apple.com/assets/ for asset type com.apple.MobileAsset.DictionaryServices.dictionary2"I read that UIKit contains a dictionary, but perhaps it doesn't and I have to import it?
Hi all,Is it possible to segue between viewcontrollers that are contained inside different navigation controllers? Is it advisable? When I set up a segue from my button to the viewcontroller I want to segue to, one that is contained within a different navigation controller, my button stops working and no segue happens.
Hi, does anyone know if a textview constraint can be changed while the textview is in an "isEditable = false" state? I'm aiming to use the textview as if it were a label. I can alter the layout constraints when it is editable, but not when editing is switched off.