-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm not able to get the logfile in IOS #81
Comments
Can you check that iOS app has necessary permissions to write and read device storage? |
Hi Shubyaa, Thanks for the response. i tried using above code it didn't work as well. This is how the code is when the share button is clicked where it's working fine for android and in ios the file is not created in the first place. onPressed: () async {
|
What errors you got while performing the code within try catch ? can you paste that error here? |
Console: Initialising in main code: |
The error says that the Flutter is looking for the file Logs, but in your |
The logs files are created or generated automatically through the package, as mentioned in the flutter package. The same process works fine in android but not on IOS. |
And the initialising is given in initLogs is same as mentioned in the package. Kindly help me solve this issue. FYI- flutter_logs: ^2.2.1 |
I am not well aware of the exact cause, though I want you to know that the version I have used
It is because my project is quite older, so took the compatible version, you can give a try if possible ; ) |
Actually i'm using the same version too. Can you send me the FlutterLogs.initLogs code on main file and the code you use to get the logs? Does it work on ios for you? |
I initialise as:
await FlutterLogs.initLogs(
logLevelsEnabled: [
LogLevel.INFO,
LogLevel.WARNING,
LogLevel.ERROR,
LogLevel.SEVERE
],
timeStampFormat: TimeStampFormat.TIME_FORMAT_READABLE,
directoryStructure: DirectoryStructure.SINGLE_FILE_FOR_DAY,
logFileExtension: LogFileExtension.TXT,
logsWriteDirectoryName: "MyLogs",
logsExportDirectoryName: "MyLogs/Exported",
debugFileOperations: true,
isDebuggable: true,
);
I check it like this:
if (Platform.isIOS) {
externalDirectory = await getApplicationDocumentsDirectory();
I get an output stating "file doesn't exist" i want to know where is it getting stored and how can we see it. It works fine on android.
The text was updated successfully, but these errors were encountered: