iOS NowPlayingView in Nativescript (7 / Vue) - ios

Situation
I have a component playing audio in my nativescript app (recently updated to ns 7). Since the app should continue to play audio when it is in the background or the device is locked, I need a way to control the audio. iOS comes with the NowPlayingView.
Problem
Since I can not find a link to this feature in the Nativescript Documentation or a ns plugin for that, I am wondering if and how I could use that feature in my app. I did not yet dig into the "native-land" and was primarly using nativescripts own features. So I do not have any first steps that guide me in the right direction to implement such a feature, if possible at all.
Question
Maybe you could help me with some rough tipps or even some code snippets, if you have already implemented the NowPlayingView?

Related

Need advice on writing iOS apps on iPad with Swift Playgrounds

I want to write a keyboard app for iOS, but I only have an iPad at my disposal at the moment. I've been searching Apple Developer documentation as well as online forums and I'm not finding the answers I need to get started. There is focused documentation on Apple Developer (see: Creating a custom keyboard) that pertains to xcode and selecting the Custom Keyboard Extension template, but I'm not seeing this in Playgrounds. This makes me think I may have to build the app from the ground up, and I have no experience with Swift or app development.
Does anyone have any advice on how I can get started?
Out of my comfort zone,
-Kristopher
Unfortunately you will need to use Xcode on a Mac to do this. Playgrounds are not a full replacement for Xcode.
The ability to publish an app from a playground is relatively new and is limited.
To create a custom keyboard you need to combine an app with a custom keyboard extension in one project. Playgrounds can't do this.

Detect which app is in foreground on iOS9 without jailbreak

I'm trying to log users individual app usage on iOS9.
I'd rather prefer that it wouldn't use jailbreak limited solutions, self explanatory. Doing the variation of this app on a jailbroken phone shouldn't be hard.
This will certainly not be released on the App Store as Apple wouldn't allow it.
I'm looking for any private API that can do this, any hidden iOS API's that can be used to do this. ANYTHING.
What I've already looked through:
how to determine which apps are background and which app is foreground on iOS by application id
How to know about app launched and details jailbreak iOS 7
Is there a private API to be able to detect what is current foreground app on iOS?
How to monitoring App running in the foreground in iOS8?use the PrivateFrameworks SpringBoardServices
which proved to be relatively helpful - we now can assume that there is some sort of additional access requirement, probably an entitlement, but we don't really know how it should look like
Can you find individual app usage duration using SpringBoard services framework or other private framework?
Find out active application or if on Springboard
Programmatically detect which iOS application is visible to user
However all of these proved to be unhelpful because Apple fixed this security flaw with iOS8 and the method to copy/access the currently front most app bundle identifier no longer works.
Question is: Is there someone who knows a workaround using different tools/exploits that do not require jailbreak?
Ideas:
inspecting the processes running on the device and devising an algorithm that would be able to recognize spikes that mean an app has been launched, which potentially could work, but it probably would be a major pain in the ass. Questions mentioning this solution:
Detect which app is currently running on iOS using sysctl,
Return a list of running background apps/processes in iOS
How to get Names of Background Running Apps
Find Background running apps in iphone
inspecting the phones traffic somehow?
not sure if there is some kernel stuff that I could do
Here is my Reddit version of this question if anyone wants to check it out. Also if it's of any value, here are the runtime headers for iOS9 and list of Apple's private API's.
Unfortunately, I was looking for a similar solution and have come to the conclusion that, at least at this point in time, there are no known methods that will allow you to determine app usage on iOS. Even the MDM providers such as Good, Airwatch, MobileIron, etc. don't seem to be able to do this. If anyone is able to come up with a solution, I'd love to see it.
For now, however, I think we would have seen a solution if someone had one that worked on the latest iOS.
sysctl is still open but they block certain combinations of selectors. I did this on iOS 7 and gave Apple Product Security the code. They won't patch iOS 7 but rely on App Review. iPhone 4 is wide open.

AVSpeechSynthesizer iOS 8 Issues

Since upgrading to xCode 6 and iOS 8 I've noticed serious issues with AVSpeechSynthesizer. Prior to the upgrade, it worked perfectly, but now, several issues have risen.
Speech Utterances are playing at a much faster rate then how they were prior to upgrade.
When I queue up 2 speech utterances, it simply skips over the first utterance and plays the second one first. (This only occurs on the first run of the speech synthesizer. The second run and on works properly.)
Please, any help would be greatly appreciated. Thanks in advance.
For second issue, see this answer for AVSpeechUtterance - Swift - initializing with a phrase.
As for me - iOS 8 also did not support properly languages other than phone language + english.
upd dec-2014: XCode 6.2 beta2 did resolve issues with TTS in simulator and (maybe) with TTS rate.
It looks to me as though a user can only hear the voice if they have specifically downloaded it in their accessibility settings.
What I have not been able to do is work out how to tell which voices they have downloaded.
I have discovered a horrible hack to make voices that have not been specifically downloaded play.
To do so I had to have two synthesizers running and get one to run through all the voices saying something. Then the other synthesizer could use any of the voices. As I say, this is a horrible hack and I cannot guarantee its reliability. In addition, it may stop working at a future varsion of ios8.
In my own apps I have chosen to make a library and get it to cycle through all the voices. Where they take more than zero time to say a phrase, they are a "good" voice and I offer it to the user. This has the advantage that it is likely to be robust against changes in the ios version.

How to allow external music/audio to continue in Corona SDK apps when they launch?

In Corona SDK how do you allow existing music/audio already playing in the background when your app (corona sdk based app) is launched and run? In particular:
iTunes Music/Podcasts - ability to have background music/audio to keep playing when you launch your app (i.e. corona sdk built)
Other Apps (e.g. audible.com app for audiobooks) - ability to have audio from such an app continuing when you launch your app (i.e. corona sdk built)
I'm guessing (2) may not be possible, but at least how do you implement (1)? I know there are apps out there (well I've seen IOS ones at least) which offer the ability for your background music to keep playing, but need to find out how to do this with Corona SDK? or if it's not yet possible just to understand this
Note, my app was intending to just play short audio clips (e.g. menu button pushes) on top of the background music/audio. That is wasn't planning to stream music in my app
From my understanding, Corona allows background music to be played no matter if it's from iTunes or other apps.
However since build 2126, there was a regression bug that made external (background) music stops when the app launched.
And it is fixed in the recent Corona daily build, 2179.
Please take a look at this Corona forum post if you want to know the detailed development for this issue:http://forums.coronalabs.com/topic/40837-allow-external-music/
I have tested it & verified that the background music continues when my app launches if I build with build 2179 or before build 2126.
http://docs.coronalabs.com/api/library/audio/index.html
you can check the about audio load, play, streaming, pause etc.
audio.loadSound() — loads an entire sound into memory. It should be used for shorter audio files that may be used repeatedly throughout the app.
audio.loadStream() — reads in small chunks of an audio file over the course of its duration. It should be used for longer audio tracks like background music. Note that streamed files may have a slightly higher latency cost and CPU cost than files loaded with audio.loadSound()
Go through the above link.
I found this post corona post very useful related to it and it has content to resolve your issue, Please check:
http://developer.coronalabs.com/code/sample-code-loop-background-music-synchronized-your-apps

How to add (write a review) / (rate this app) in my app on iOS 7

I know that there are other answers on this forum for adding this feature to my app but none of the answers deal with iOS 7. I have heard that (iRate) is one of the better options for this but is that still the best option for iOS 7? Any help would be appreciated!! P.S I am using cocos2d in my app.
I use Appirater (https://github.com/arashpayan/appirater). Even if you don't want to remind your users it has a call to rate your app and it presents within your app.

Resources