Cordova vibrate plugin is not working in ios - ios

I have implemented an app and I need a vibrate function to invoke on a button click in angularjs. It works fine on android, but on iOS it says that navigator is undefined.
I have used the below plugin for the vibrate function
https://github.com/apache/cordova-plugin-vibration
Is there any workaround I need to do get it work on iOS?

Maybe the device is muted? I had this issue where everything was logging correctly but my system volume was off. This post on Android solved it for me. In case your phone has different types of volumes (media, call, etc), un-muting System volume is what solved my trouble.
be sure that the device is un-muted. Many (most) devices will "mute" the vibration as well as the audio.

Related

change notification sound of ios(Flutter) using a network sound

using flutter my application users should be able to select notification sounds online dynamically, i am not able to find the solution for that, technology i am using is flutter
I have tried local notifications as well as different packages like ringtone. in android it is working smoothly but for iOS its not working. it gives an error

Flutter_background_service doest work IOS

Why does the background service not work on iOS devices? I gave all the necessary permissions and tried every way. flutter_background_service: I'm using ^0.0.1+21 and it says IOS support.
I'm trying to add a pedometer. It works perfectly in the background on Android, but I could not run it on IOS even though I met all the conditions.
When I close the application, it continues to work on android. How can I make this possible on iOS?

Can I make a purely voice driven app in Expo?

I want to create an Expo app for ios that will say something, and wait for my reply, via headphones. The headphones part is immaterial but it indicates what I want... which is for this to run while my phone is locked and in my pocket. Once I have replied, the app would proceed. I have built Expo apps but I am unsure of whether an app can still interact with me via audio and the microphone in this way while the phone is locked. Also, I don't know if Expo has introduced this sort of capability. I also don't know if React Native (i.e. ejected Expo apps) can do this sort of thing. The lack of apps that truly interact in this way (not via Siri etc) are far and few between so I'm assuming it's a hard problem to solve. I would be just as happy if I could have a browser page running on the device do the same thing, but I'm pretty sure webpages can't play audio and wait for replies when a phone is locked. Is any of this possible at this point?
I did research this online, just to be clear. I wasn't able to find an answer so I came here. I mention this because this whole post does have that 'can you research this for me' vibe. I'm just hoping someone has knowledge of what is possible.
There is a page in the expo documentation that says when not to use expo, and the following is in there:
The SDK doesn't support all types of background code execution
Background execution is the ability to run code when the app is not foregrounded or the device is sleeping. We support background geolocation (including geofencing) and background fetch, but we do not yet support background audio with the operating-system playback controls and you cannot handle push notifications in the background. This is a work in progress.
You can take a look at it here.
I think you can do it in React Native though, however I can't say if there is a library to do it, so you can try creating your own with native code. You can see how here for android and here for ios.

Play audio file as microphone input using AudioKit - for iOS simulator dictation testing

I am looking for a way of play an audio file and have it as input for the iOS simulator microphone. I am creating a bunch of UI tests for an iOS app that uses dictation (speech-to-text) and I didn't find a way of doing it using applications like SoundFlower, etc as I want to run in the CI and bypassing Apple's security Gatekeeper is not possible as I can't run the machine in recovery mode.
I want to launch the app as an UI test and send some audio to the "device microphone" as a way of triggering a wakeword. Mocking the code here is not an option, or better, not what we want, otherwise we won't test anything.
I was wondering if I can use AudioKit to do this.
I don't think AudioKit will help you with this. I would have thought Soundflower could do it, but you could also try Rogue Amoeba's Loopback if you haven't already.
The iOS simulator does inherit audio from the host Mac, so you could try an old school solution of physically attaching a cable to the microphone input from the output.

iOS Private API: lock device and power off the screen

I'm making an app for jailbreak that lock the device when the user launch the app. I've tried GSEventLockDevice(); from GraphicsServices.framework but this does not work properly because it locks the screen but does not power off the screen. Is there another way to lock the screen without MobileSubstrate?
Just as another alternative, check out this answer, which uses SBDimScreen(). You could use that in conjunction with GSEventLockDevice().
It appears that you may now (iOS 5+) need to add an entitlement to your app to use this call successfully. If you haven't done that before, here is an example of how to do so. Obviously, in this case, the entitlement in question must be changed to com.apple.backboard.client.
You also might see if #VictorRonin has experimented with this, as he commented on the question I linked to. I tested SBDimScreen() on a jailbroken iOS 4.2.1 device, but my newer devices are currently unavailable to run this test. I'll try it later on iOS 5.x and post an update.
Note: the answer I linked to from Elias has a different call altogether for iOS 6.
Look at these several questions:
Simulating System Wide Touch Events on iOS
Simulating System Wide Touch Events in iOS without jailbreaking the device
How to send a touch event to iPhone OS?
The idea is that you can simulate system wide events. One of events is power down event. If you simulate it, it will turn off device and will lock it.
BTW. You may be interested to google more on GSEvent which is the key for even simulation.
Here are couple of useful links:
http://iphonedevwiki.net/index.php/GSEvent
http://networkpx.blogspot.com/2009/08/gsevent-recording-and-playback-in-30.html
Also, this approach isn't limited to jailbroken phones. It works on jailed phone too (however, you won't be able to post it to AppStore).

Resources