Okay. It can be accessed by creating an action, but that seems kind of clumsy. I'm going with that, but if anyone knows how to access the stringValue via a delegate method please let me know. I'd love to know if it's possible.
Post
Replies
Boosts
Views
Activity
I can't say that I have properly read them yet, but I'll make certain that I do.
There is a way around my issue, and that is to put instructions in my help guide to make sure that the app is running before importing a backup. Problem solved, but it feels to me like a bit of a copout.
Thanks, Claude31
I was wondering the same thing about exit(0). Quite a few people say that would be rejected, but then I see others who have had no issue with it. I have an app on my phone where I think the developer has exit(0) in the cancel button. It certainly looks like it when I press the cancel button.
Actually, it just occurred to me that is the actual issue. If the app isn't sitting in the background, and is starting from scratch, OpenURLContexts does not run, so importing a backup file will not work even if the user hasn't canceled. I need a way to make it run.
Sorry, I didn't see your reply. Yes, exit(0) closes the app okay, but it means that things don't work properly the next time the user tries to import the backup file. The app will open, but OpenURLContexts doesn't run.
Every time I download from apple servers it takes forever. Xcode literally always takes me hours to download and install. It's never a joy, especially this time when Xcode 12.1 isn't running very well. It's slowing down my computer, crashing Spotlight, and not starting up my app properly. It ran like a dream prior to updating.
Same here, as of an hour ago. I wish I hadn't updated.
BTW, the error basically said that the app "doesn't have permission to view the file". Is there a way to grant it permission? Having the app open up by tapping on the file is a very nice feature.
Hi eskimo, I've discovered my error. I set "open document in place" to NO, and it now imports and processes without a problem.
I was using the guard statement below, and when it wasn't working I tried the do statement, which didn't work either. I haven't tried the guard statement yet to see if it works since changing the setting, but I suspect that it will.
I don't know why it wasn't working. I guess it has something to do with the url having private in its path. I've got some learning to do there.
"Failed reading from URL: file:///private/var/mobile/Containers/Shared/AppGroup/FC9D99"
var data = Data()
do {
data = try Data(contentsOf: url)
}catch let error as NSError{
print("Failed reading from URL: \(url), Error: " + error.localizedDescription)
}
//guard let data = try? Data(contentsOf: url) else { return "blah" }
Thank you. That one did slip by me. I’ve been doing a lot of experimenting in practice projects and the method is being called now without having to manually call it. I’m not sure what the initial problem was, but I suspect a setting in the info.plist. If the app is set to not run in the background the app Will start from an exported file, but openURL does not get called.
I'm still struggling with this. I've read the UIScene documentation but still cannot see where I am going wrong. As I said, my file opens the app, it just doesn't call the openURLContexts function. As I understand it, iOS should automatically pass information about the file that opened the app to the ScenesDelegate, which would include the url to the file. Or do I have that wrong?
The line of code that I mentioned above, that I placed in the willConnectTo method only calls the openURLContexts method when the app is initially launched, not when it is launched from a saved file. Any help will be much appreciated.
I've discovered that the code below is need in willConnectTo session, so that's one step forward :-)self.scene(scene, openURLContexts: connectionOptions.urlContexts)
Now to hunt down some info on how to do it.Thanks for all your help.
Cheers. It's a poor choice, but I have no idea what would be the right choice. If it was an image then it's jpeg, or png, or something obvious, but with lots of googling and time I still haven't tracked down what an encrypted data file ought to be.