When I build the app in Xcode it throws the error: .../ios/Runner/GeneratedPluginRegistrant.m:10:9: Module 'audioplayers' not foundI tried reinstalling and setting up pods again, however it didn't work. I am also including pod 'Firebase/Core' in the pod file. Maybe I need to include the Audioplayer module there as well? Thanks in advance!
Yes, scheme. This project have 3 different flutter flavors, a.k.a iOS schemes. I realized I can't even list the devices or simulators for this project. Issue was, I didn't choose the scheme instead of it was on default one, Runner.
By nothing, I mean everything. I've deleted podfile, podfile.lock, I've changed deployment targets, I've deleted pods folder, I've added post scripts to update dependencies to 9.0, I've tried flutter clean and pod install --repo-update.
I have tried many things like delete the pod file and podfile.lock, flutter clean, reinstall cocoa pods, changing scheme, but nothing worked for me until I tried to change different version numbers (Ex: 8, 9 etc.) And finally when I changed from 8 to 10 (platform :ios, '10.0') in Pod file it worked. I think some libraries are not supporting some platform versions. For my project 10th worked. If you have the same problem try to change different platform :ios versions in podfile one by one, hope this will help.
If you tried everything but error still appears, make sure that your path to project doesn't contains whitespaces. Sometimes Xcode can't deal with it. And make sure that you have the latest Xcode and MacOS version.
I also ran into this problem when launching the app with the simulators. After trying all above methods, it is still not fixed. I used the cable and run the app with my phone. And it worked like a charm. I hope this helps.
After I saw the diff between these two files, I just overwrote the shorter Podfile with the longer one (from old commit), and everything went well.Hope someone can shed some light why/how this happened, and why deintegrating/cleaning Podfile did not help.
Finally I've realised the problem was with cocoapods version.I had a problem installing cocoapods earlier so I've used brew install cocoapods (instead of sudo gem install cocoapods) and it worked, however it caused all my later problems to come up.
I have changed many build settings in my xcode project, because of some special cases for my project. After all these changes, I forgot to add $(inherited) in "Header Search Path", "Framework Search Path", "Library Search Path" and "Other Linker Flags" to the build settings of my project.
I'm currently trying to work with xcode to test my flutter application with xcode. The big issue is that all of my imports (such as app_settings, cloud_firestore, etc...) give an error for "Module ___ not found". When I try to run my dart code I get the error in the terminal:
I tried running flutter create for ios, (this might've made things worse?) Flutter clean and reinstalling pods doesn't seem to work either. I'm wondering if there's something simple that I missed with importing modules. I created the application on android using modules that should work with Android & iOS. After getting the android version working I pulled my project on my mac through github and finally reached this issue. Any pointers would be appreciated because I'm totally stuck on this.
Had the same problem, we solved it by setting the iOS Deployment target in XCode to the same value as set in the Podfile, which was 12.0. Then ran flutter clean and flutter build ios worked like a charm ?
Hmm Not sure what happened but it seems to be good now. I think pod init was initializing minimal data for the podfile. Instead, I deleted the Pods file and did flutter run and it built the podfile correctly with flutter pub get.
I had the same issue after upgrading the Xcode to 13.3 and my production build flavor wasn't working. I was using firebase as well. In my production build flavor, I didn't append anything to the configuration name (i.e. all the other configurations have the name like "Debug-staging", "Debug-development", but in the production, it's only "Debug"). I just deleted the pod file and run:
I am using flavors (schemes), and I accidentally created the scheme with upper case in the first character, while everywhere else (build config etc.) I used lower cases only. After deleting the scheme and recreating with lower case characters, it worked.
LinkedIn and 3rd parties use essential and non-essential cookies to provide, secure, analyze and improve our Services, and to show you relevant ads (including professional and job ads) on and off LinkedIn. Learn more in our Cookie Policy.
I have recently joined a virtual training for app development using Flutter under the mentorship of World Record Holder Mr. Vimal Daga sir. Under this training,we have been assigned a competitive task to create an audio/video player app using the knowledge we have gained upto this point. I decided to use my skills and try to compete in this task,and have created a stateless audio player app whose look and feel I have maximized upto the point I fathom my current knowledge can allow me to. Here's a brief description of the process of development of my audio player app:
The first step,of course,is to create a working environement,that is a flutter project. Doing so is quite easy,because you just need to run the command 'flutter create ' inside the directory where you want to create the project and Flutter automatically downloads all the required files for the environment.
As the audioplayers module and the local image and video assets which I am about to use are not included in the default packages which are made available when a Flutter project is created,I have made changes to the pubspec.yaml file of the project to include them. While the assets need to be placed in the 'assets' folder inside the project folder,the dependency packages are either downloaded automatically by the IDE or manually by the user by running the 'flutter pub get' command inside the project folder. In my case,Visual Studio Code automatically downloads the packages as soon as I save the changes inside the pubspec.yaml file.
To use the 'Play' feature of the audioplayers package,you only require an AudioCache instance. However,pause and stop features require active monitoring and thus,an AudioPlayer instance needs to be passed to the fixedPlayer parameter of the AudioCache instance.
The AudioCache class has the capability to play multiple instances of the same audio or multiple audios together,which can be activated everytime a function which uses its instance is called. As this might become a rather irritating occurence in a music player designed to play one of many audios,I have used the bool type variable 'play' to keep track of whether an audio is already playing and to enable us to carry out the required actions to prevent more than one audio from playing simultaneously.
Since my app's design consists of two play buttons,one of which accompanies the audio title while the other one provides swift control,therefore I decided to store the location of the currently playing audio file in a separate variable and to use it everywhere where I need to trigger the play() action of the AudioCache instance.
I decided to create a dark mode app because of the simplicity and elegance of the theme,which makes even minimalistic apps look classy. For this,I assigned Colors.black value to the color parameter and set the width and height of the container to the double.infinity value to cover the whole interface except the app bar.
Since the Container() widget itself can only have one child widget,we require a way to bypass this limitation in order to fit more widgets as well as to position widgets better inside the app body. The Column() widget is one such way. I have maximized the mainAxisSize parameter to provide better utility during development.
Another way of fitting multiple children widgets inside a widget is to use the Row() widget.While the Column widget places its children in a vertically successive order,the Row widget places them in a horizontally successive order.
The cover art of the audio files is loaded from the respective image file in the assets folder. The location of these image files must be specified under assets in the pubspec.yaml file as described earlier.
The earlier mentioned 'play' and 'audio' variables are used everytime this play button is clicked. As specified in the onPressed parameter, the app first checks whether an audio is already playing and stops the audio before allocating the new audio location to the 'audio' variable and triggering the AudioCache instance to start playing the new audio.
Note: In my app,I have used local audios stored in the assets/audios folder. However,it is extremely easy to use the AudioCache instance from the audioplayers package to play audiofiles stored somewhere on the internet too. All you have to do is to assign a url instead of a local path to the 'audio' variable.
The title of the audio file is displayed last in the row. As I have used a dark-themed app and the deafault text color is black,it is wise to use white as the text color to facilitate ustrained readability.
One thing that I have found quite frustrating about Flutter app development based on my current knowledge is the elaborate amount of wrappings and steps you have to try to get a widget to the desired position when there is a lot of presumably blank space required on the left and/or upper side. Therefore,after searching through the internet to no avail,I decided to simply use the Text() widget to represent exactly what I needed: BLANK SPACE!
The pause button on the control bar,when pressed,calls the pause() function for the AudioPlayer instance used for our AudioCache's fixed player,thus pausing the audio,which can be played from the same point using the universal play button.
c80f0f1006