Hi, I have a problem that I havenāt managed to solve. I have managed to export a datafile, and when I click on it it opens up the app, but the application function in AppDelegate.swift doesnāt run. I placed a print command in it to check, and it isnāt printing, so the function isnāt firing up. Any ideas as to where the problem might lie? I am integrating it all into another app, so it isnāt the tutorial project.
Hey! Can you try adding scene(_:openURLContexts:) to you UISceneDelegate, if youāre using iOS 13? I donāt have the ability to test this, but I have seen that since it came out, you might need to handle things there. You may want to see if you need to add anything else based on UIScene documentation.
Thanks. I did track down that I needed to use openURLContexts: , but Iām having trouble getting it to run. It isnāt called when opening the file. Iāll take a look at the UIScene documentation and see if I can work it out.
I have things running nicely in my simulator. Clicking a file saved to the Files App opens my app and imports the data, but for some reason it wonāt work on my iPhone. I can create a backup file from my app and save it into the Files App, but when I try to import it Iām told that I donāt have permission to access that file. Any ideas as to what I might be causing this?
Iāve worked out that - outside of the simulator - with āopen documents in placeā set to NO, I can import the data from the file, via the share menu from in Files, but not when it is set to YES. Iām hazarding a guess it is because of private in the url link, as the error message says that permission isnāt granted to view the file:
Failed reading from URL: file:///private/var/mobile/Containers/Shared/AppGroup/FC9D99ā¦
Yes, I still have issues with it. Iām a bit tied up right now at work, but will give a rundown of where Iām at with it later tomorrow some time. Iād like to conquer this and gain a full understanding.
@religionofpeas I did some research on this and wasnāt able to find anything useful.
When you set āopen documents in placeā to NO and it works, does this cause other undesirable side affects for your application?
I have been doing a lot of experimenting with settings this morning and, I canāt say I have fully come to grips with it (I donāt know why it wasnāt working before), but it is working now with āopen documents in placeā and āsupports file browsingā both set to yes. Tapping on a file, when it is standalone on my phone, opens the app and processes the file. So Iām pretty happy with it, and will leave it as is for the time being. I do have one issue though. Iād like my app to be set to not run in the background (this is the only way Iāve found to get TouchID to be called every time the app is closed and reopened), but when that is set to true the āopenURLContextsā method does not get called. Do you know of a way to manually call it when the app is starting from scratch?
Iāve cracked my TouchID issue. Iām calling authenticateWithBiometric from sceneWillEnterForeground in the SceneDelegate, and it calls TouchID every time the app is closed and then reopened, and seems to be working smoothly. so itās now safe to leave runs in background set to yes. Iām now just left with how to manually call openURLContexts if the app is actually fully closed. There must be an easy way to do it.