I'm a newbie in OSX development.
I'm developing an app in mac which requires receiving notifications similar to the iOS APNS. I am fully aware of the Growl Framework, however many suggested that in order to avoid any future compatibility and/or support issue with Growl, using the Apple Push Notifications (applicable for Apps from Lion onwards) would be better.
Can you suggest a way on how to do this or give some important tutorial regarding this.
Thank you for your help!
Apples own documentation is the best place to start:
https://developer.apple.com/notifications/
Lots of documents there as well as videos from WWDC regarding mac notifications and sample code. In general the implementation is very similar to ios push.
Related
The last days I sent a new build of my app to Apple to fix some minor bugs with macOS Catalina. This evening Apple called me and explained that they are refusing the new version in the AppStore because the application monitors keystrokes. I use the Clipy/Magnet library (github.com/Clipy/Magnet) to manage the hotkeys. This library uses a Carbon API. Admittedly, I'm a little surprised - on the one hand that Apple is calling me directly via phone about this and on the other hand the use of this library has not caused any problems so far. The only thing I noticed about the new build was that Catalina asks for "Input-Monitoring" at the first start of the program. I've installed several other programs that also respond to global hotkeys and none of them require the permission for "input monitoring".
Does anyone have a similar phenomenon under Catalina or how do you solve the problem of query/monitoring global hotkeys?
I know of numerous applications using the MASShortcut framework, and I don't believe they've had issues with the store. It also uses a carbon API, but I think the issue in Magnet is the call to CGEvent.tapCreate which can globally monitor all keyboard input, and which MASShortcut doesn't use.
I have watched the WWDC session "Whats New in HTTP Live Streaming" https://developer.apple.com/videos/play/wwdc2016/504/ where it is described how to use AVPlayer for offline FairPlay playback.
A look at the documentation however seems to imply this is only possible for iOS (not MacOS) as all the classes described are iOS10 Only.
Is this not possible for MacOS? Any sources to confirm either way?
Thanks.
Eventually this question was posted on Apple Developer Forums and the response is that
Offline HLS is only supported on iOS at this time. Please do file an
enhancement request at bugreporter.apple.com if you have use cases for
macOS as well, including some details of the use case.
The thread is here : https://forums.developer.apple.com/thread/5529
I have been searching high and low, but have so far been ineffable. I am now turning for the stackoverflow community for advice.
My goal is to build a Mac app in XCode, that will allow me to send MP4 content from my Mac (or from a public URL on the web) to my Apple TV.
I have located numerous classes within the framework for iOS that enables this (quite easily it seems), but the trail ends there. It just seems like there is no API to do the same from OSX, but I am hoping that I have overlooked something :-) There seems to be well established methods for sending audio to AirPlay enabled devices, but not video?
I am aware of the 3rd party specification of the protocol at http://nto.github.io/AirPlay.html, and it looks a tangible plan B for my needs, but I would appreciate any pointers if anyone knows of a more official way.
I know the midiXxx API, but I saw it is currently listed under 'legacy' in msdn.
http://msdn.microsoft.com/en-us/library/windows/desktop/dd743619(v=vs.85).aspx
Is there some other API i should use to target the newer Windows versions?
Will the old API still work on Windows 7 and 8?
Thanx,
Marc
Last Friday Microsoft released a preview Windows Runtime API for MIDI. Check out the //build/ session here:
http://channel9.msdn.com/Events/Build/2014/3-548
MSDN: http://msdn.microsoft.com/en-us/library/windows/apps/dn643522.aspx
Although a preview, apps can go live and be deployed to the Windows Store. Please let us know what you like or don't like. Happy app building!
For dektop applications (non metro) you can still use the legacy API safely.
Sadly for WinRT/Metro, there is no midi support at all (see this discussion on msdn).
Hope they will change that.
Catflier is correct that there is no direct support (at the API level) for MIDI in WinRT. However, if you are wanting to have MIDI-like capabilities in your app, there are workarounds. A protocol growing in popularity is the network-based OSC (Open Sound Control). Since it is network-based, you can use that.
For example, one can use external hardware like The Missing Link which translates from MIDI to OSC. You hook up your MIDI device to The Missing Link, which then translates to OSC messages that are sent to the computer. Your app can then receive OSC messages and talk to the MIDI device. I don't have any code to show here, but I've seen demos of this working in-action.
You can see OSC in use on iOS as well with popular apps like TouchOSC.
I want to update my developing knowledge from iOS to Mac for distributing my apps to Mac App Store.
What are the differences? What are the limitations?
For example, if I want to port my iPhone app that syncs contacts with social network the various NSRequest or ABAddressBook are the same? It changes only views and corresponding view controllers?
Does exists some sort of "adapters" from iOS to Mac to easily convert iOS apps to Mac?
In general, what challenges Mac apps arise respect to iOS apps?
Thanks
If you've gathered some experience you will get along with mac development in no time. Mac and iOS have many things in common, however there are some gotchas, not all of which are visible at first glance.
The most obvious difference may be the use of viewcontrollers - cocoa for mac knows viewcontrollers, however they play a different (and less important) role.
I think the best approach for you would be to take a quick look at the Cocoa Application Tutorial and the Cocoa Fundamentals Guide. Most of it will appear familiar to you. Other than that I'd suggest to not port that project over, but use it as a opportunity to learn mac dev and recreate it from scratch (if it is not too complex). Of course you can copy paste many of the logic stuff, no need to reinvent the wheel.
By the way, I started out developing for iOS too and I found it to be very easy to get used to cocoa mac.
As to your question regarding NSURLRequest (I think that's what you meant, theres no NSRequest in either platform), they are almost the same. Just look it up in the reference library. I found it very helpful to have the iOS and mac os reference library available at the same in my browser, so I could look up differences quickly.