Is it possible to eliminate the the ability to add media to a JSQMessagesViewController - uitoolbar

I am integrating this into my app and do not want me users to be able to add media to their message threads. The input messages toolbar documentation does not have any reference to media or attachments. Is it possible to remove this feature from the UI?

This will remove that nasty bugger I put it in the viewDidLoad
self.inputToolbar?.contentView?.leftBarButtonItem = nil

Related

Why need to use Media controller and media session?

All most media app also need using Media COntroller and media session. I dont understand why need to use them? if i call direct to MediaPlayer, my apps will run, huh? thank you.
They are needed so that you can control your MediaPlayer even without using the UI,Ex : notifications, Media Buttons etc. and to keep everything in sync.
You can read about it here : Link
They are needed to keep everything in sync:
you can't handle all possible media buttons action using, for example, BroadcastReciever, so that's why we use MediaSession, we create a MediaSessionCallback in the service to respond to all action like(play/pause, next or prev ...) from notification, media buttons, .. and also from our UI(using MediaController)
media buttons: pause/play button in your Bluetooth Headphone for
example...

How do I notify users of new content available in tvOS apps from the home screen?

Push notifications have been left out of tvOS (understandably so) but the docs seem to contradict themselves in alerting users to the fact that there is something new available in your tvOS app.
Here it seems to say that you can add an app badge: https://developer.apple.com/library/prerelease/tvos/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/WhatAreRemoteNotif.html
Here it says they've been removed from UIKit: https://developer.apple.com/library/prerelease/tvos/releasenotes/General/tvOS90APIDiffs/Objective-C/UIKit.html
Removed UIApplication.applicationIconBadgeNumber
Assuming the badge approach is not supported in this release, does anyone know the best practice for alerting a user that there is new content in your app without the user taking an explicit action? ie focusing on the app and showing them something in TopShelf?
I encountered the same problem and dived into this. Probably your best way is to update the topshelf with latest items, which is my way to solve this for now. You can use network calls to update the topshelf with content from your backend.
This depends on the type of application. E.g. showing the latest top movies for a movies app.
You can trigger an update of the topshelf after your network call completed using the following code:
NSNotificationCenter.defaultCenter().postNotificationName(TVTopShelfItemsDidChangeNotification, object: nil)
Make sure to implement the TVTopShelfProvider which should be clear using the following documentation:
This protocol is adopted by the principal class of an app’s TV Services extension. Apps that implement this extension can provide dynamic content to the Top Shelf element rather than having the system use the static image submitted with the app. The topShelfStyle property specifies the interface style you want, and the topShelfItems property specifies the content items to display. Whenever you change the content provided by the extension, post a TVTopShelfItemsDidChangeNotification notification to prompt the system to reload your content.
Icon badges are removed for app icons, push notifications as well (except for silent push notifications).

How to share with messages, mail, print and copy

I've seen some apps that allow you to share content with ios's mail, messages, print and copy.
I see there is a project called sharekit that does something similar but integrates social network sharing. Personally I don't need the social sharing, so sharekit it probably overkill.
I just need to popup an actionsheet that will allowe me to pass some text for example to the mail app or the messages app.
What you are looking for is the MessageUI.framework.
This framework contains:
MFMailComposeViewController
this class will allow your user to compose an e-mail.
MFMessageComposeViewController this class will allow your to compose a SMS message. MMS is not supported.
You will have to write the action sheet you self, but after the user made there choice you can create an instance of MFMailComposeViewController or MFMessageComposeViewController and present it to the user.
Be aware that you will need to implement the MFMailComposeViewControllerDelegate and/or MFMessageComposeViewControllerDelegate to dismiss the view.
Look my answer here:
https://stackoverflow.com/a/13975189/736384
I wrote about the new UIActivity control, It let you do all you are looking for.
If all you want to do is integrate with Mail or Messages, use the MFMailComposeViewController and MFMessageComposeViewController classes respectively.
If you want to add support for Copy, Print, and other such "activities', take a look at the documentation for UIActivity and UIActivityViewController.

MFMailComposeViewController : subject/text non editable?

I need to work on an application able to send a mail with automatic content (subject/text) that the user shouldn't be allowed to edit. Is it possible to do ?
Thanks for your advices
The answer is "no". If you want to use the MFMailComposeViewController class, you have to pay attention to this paragraph in Apple's documentation:
Important The mail composition interface itself is not customizable
and must not be modified by your application. In addition, after
presenting the interface, your application is not allowed to make
further changes to the email content. The user may still edit the
content using the interface, but programmatic changes are ignored.
Thus, you must set the values of content fields before presenting the
interface.
The user can (and should be able to) change anything and everything s/he wishes before they send out an e-mail.
If you don't want to follow those rules Apple set, there are other mail frameworks you can use within your iOS app.

CLLocationManager "turn on location services..." alertview customization ios

I know that I can't change the title or the buttons for this alertview, but i've seen numerous apps that changed the message of the alert view
Something like this
Also, I have the Bump API in my app so everytime the popup shows, it says "Bump uses your location to help determine whom you are bumping." and I don't want that displayed when they first use my app.
Does anybody know how I can change the message or change bump's message?
Thanks
To change the message of the alert, use the "purpose" property of CLLocationManager. Check the docs: http://developer.apple.com/library/IOs/#documentation/CoreLocation/Reference/CLLocationManager_Class/CLLocationManager/CLLocationManager.html
I'm not sure how the Bump API works, but if you are just importing all the classes you need, you should be able to edit the location services message. Otherwise, one option would be to request location access before calling the Bump API's to get permission for your app. Once Bump checks, it will already have permission and skip presenting its own.