Skip to content
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

not working on ios #152

Open
Pritykyada opened this issue Jul 26, 2024 · 1 comment
Open

not working on ios #152

Pritykyada opened this issue Jul 26, 2024 · 1 comment

Comments

@Pritykyada
Copy link

not get audio list on ios device

@Qaisar-Mateen
Copy link

on_audio_query: 2.9.0
IOS: 16.2

I am also facing similar problem in IOS. I am using audioQuery.querySong(); to fetch songs stored in Uri.External of my device,
I have tested the code on Android and it's working perfectly. But in IOS it is not returning any song. I have already checked that i have all the necessary permissions

Below is my code snippet

  myFunction() async {
    PermissionStatus perm;

    if (Platform.isIOS) {
      perm = await Permission.mediaLibrary.request();
    } else {
      perm = await Permission.storage.request();
    }
    
    if (perm.isGranted) {
        _songs = await audioQuery.querySongs(
        ignoreCase: true,
        orderType: OrderType.DESC_OR_GREATER,
        sortType: SongSortType.DATE_ADDED,
        uriType: UriType.EXTERNAL,
      );
    }
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants