So I try to create a custom keyboard extension with a speech recognition functionality provided by our own server. In some older thread I read about the restriction where you cannot use the microphone from an App Extension, but I cannot found any hints about that in the new Developer Documentation. There is only a bullet point which mentioned the fact that you cannot access the Microphone when RequestOpenAccess is set to false in the Info.plist file, which made me thought that I can use the microphone from inside the keyboard.
So I tried it myself, set the RequestOpenAccess setting to true and also set the "Microphone usage Description". The question to allow the microphone showed up on the first try but the recording did not start and there were no hint about it in the console and no errors poped up. I tried the recording code before, directly inside the app and there it worked perfectly, so I think it has nothing to do with this code.
As an addition I tried the Keyboard in the Simulator and there the recording worked also as intended so I think I maybe miss some permissions or something.
Does anybody know something about this and can help me figuring out my issue?
The workaround is to make keyboard extension open containing app which does the actual mic recording and communicates with extension via user defaults. The containing app switches back to host app after it starts recording.
I want to use my own sound in push notification in iOS platform of Flutter. Since I have no experience in iOS development, I am struggling with it.
In my app settings there are 3 notification sound options, so that user can choose notification sound. I have already implemented local_notifications package and although I am getting notifications in my app, I couldn't find how to use custom sound in push notification for iOS platform.
You should replace this default given sound name to your sound name.
var iOSPlatformChannelSpecifics = IOSNotificationDetails(sound: 'slow_spring_board.aiff'); //put your own sound text here
(Before this, your sounds should be added to your project using Xcode)
Here is the link how to add custom sound to your project for iOS devices using Xcode: https://medium.com/#dmennis/the-3-ps-to-custom-alert-sounds-in-ios-push-notifications-9ea2a2956c11
Note: Sound duration should be less than 30 seconds otherwise it will not work
In my iOS AU host application, I am using AVAudioUnitComponentManager.components method to retrieve the list of available Audio Units. It works as expected most of the time. However sometimes it returns only Audio Units created by Apple, and none of the third-party Audio Units that are installed on the device. The interesting thing is that, if after I encounter this issue in my app I go to GarageBand and open the Audio Unit list there then when I return to my app, all the third-party AUs are present. So I am wondering maybe some other initialization should be done before calling AVAudioUnitComponentManager.components method which GarageBand is doing and I also should do in my app.
Any suggestions?
As is turned out, the problem was happening because my app did not have an entitlements file with the “Inter-App Audio” capability key. After adding this capability to my project target in xcode the problem was fixed.
I have not found a definite answer to this. This SO article from 2012 does not work anymore.
So far I have included audio in the UIBackgroundModes array in my Info.plist file.
Furthermore I installed the cordova-plugin-media plugin (version 3.0.1). But the music still fades out when I press the home button. What am I missing?
So my problem was, that I didn't see an Info.plist file and simply created my own.
Under cordova the file is called <app_name>-Info.plist and located in the Resources folder. Either way it can also be accessed under the Info tab when selecting the project target.
So after adding audio to UIBackgroundModes to the correct file even the simple HTML5 <audio> tag continues to play in background. Yay!
I am currently developing an app using Corona SDK which uses the audio API for sound effects and background music. The audio was working fine in the simulator and on Android, but when I tested it on iOS, no audio played.
To check if it was a problem with my code, I tried the sample "AudioPlayer" app included in Corona SDK as an example. Again, the audio played fine on the simulator and on Android, but on the two iOS devices I tested (an iPad and an iPad Mini), no sound was heard. I double-checked the volume on the device and tried all of the available sound formats, but nothing helped. You can found the sample application in the "Media" folder under Sample Code, but here's the key part that actually plays the sound:
--If we are trying to load a sound, then use loadSound
if supportedAudio[ platform ].extensions[ audioFileSelected ] == loadTypes[ "sound" ].extensions[ audioExtensionSelected ] then
--Load the audio file fully into memory
audioLoaded = audio.loadSound( audioFiles[ audioFileSelected ] .. supportedAudio[ platform ].extensions[ audioExtensionSelected ] )
--Play audio file
audioHandle = audio.play( audioLoaded, { channel = 1, loops = audioLoops, onComplete = resetButtonState } )
else
--Load the audio file in chunks
audioLoaded = audio.loadStream( audioFiles[ audioFileSelected ] .. supportedAudio[ platform ].extensions[ audioExtensionSelected ] )
--Play the audio file
audioHandle = audio.play( audioLoaded, { channel = 1, loops = audioLoops, onComplete = resetButtonState } )
end
Is this a bug with Corona SDK and/or iOS, or am I doing something wrong? I couldn't find anybody else who seemed to be having a similar problem when I searched this on Google, though it seems like playing sound wouldn't be a very rare task. Since nobody else is having this problem as far as I can tell, I'm probably doing something wrong, but I honestly have no idea what it could be. Can anybody else reproduce this problem? Thank you in advance for your help!
Notes:
The iPad is running iOS version 5.1.1, the iPad Mini is running iOS version 6.1.2, and I am using the latest public release of Corona SDK (which is available for free as Corona SDK Starter). I also tried the previous public release of Corona SDK, but it made no difference, so if it is a regression it is not a recent one.
Update:
I just tried it on an iPod Touch (iOS version 6.1.3) and the sound is working fine. However, I still have absolutely no idea what is causing the problem on the other two devices. Anybody have any insights on what it could be?
Out of interest, which file types are you using? I had problems trying to use oggs on iOS. Like yourself, they worked on the simulator and Android, but not on iOS. So my first suggestion would be to check that the filetype can be used on iOS.
Also, are you 100% sure there are no mistakes in the filenames in your code? I've experienced problems where one platform somehow bypassed a mistake in upper/lower case file names, but another platform didn't.
Ogg Vorbis is a royalty free and patent free format. However, this is not supported on iOS.
Beware that certain formats (particularly highly compressed lossy formats like mp3, aac, ogg vorbis) can pad/remove samples at the end of an audio sample and potentially break a "perfect-looping" clip. If you are experiencing gaps in looping playback, try using WAV and make sure your lead-in and ending points are clean.
For further clarification visit:http://developer.coronalabs.com/partner/audionotes
I had the exact same issue. It did turn out to be the upper/lower case naming issue. The actual files name was "song.mp3", was referring to it in code as "Song.mp3". Android doesn't care about this, but iOS does. Also, I find sometimes in my windows environment, if I rename the file just changing the case, it doesn't always reflect it.