I'm creating an iTunes clone in Cocoa (don't ask why, it's not evil) and I want to be able to sync my iPod with it. This means: music, photos, videos and podcasts. I couldn't really find anything, since Google only shows articles about iPod touch and iPhone programming, but I'm actually creating a desktop application for Mac OS X, and I also want to be able to sync click-wheel iPods.
Is there an API or should I read and write directly to the USB port?
Can anyone help me? Thanks
Apple jealously guards sync capability and doesn't provide an API. As far as I know you can't even use iTunes automation to make it do the syncing for you.
Ever-resourceful, the open source community has reverse-engineered the protocols and the libimobiledevice project exists to provide a sync library for Linux-based systems. I don't believe the library will build on OSX -- it relies on the Linux USB architecture -- but if you need to write your own sync library, it will provide you with a good starting point to understand the protocol and device workings.
Related
How is VirtualHere able to virtualize USB devices on macOS without requiring the user to install kernel extensions?
As far as I am aware, there's no documented way to virtualize USB devices on macOS.
The USB/IP project, for example, only supports clients on Windows and Linux.
I understand this is proprietary software but it must be using some technique available to userspace?
Thanks
Really interesting.
Seems they are using the IOUSBHost.framework, which is at most undocumented.
Using it requires getting custom entitlement from Apple:
com.apple.usb.hostcontrollerinterface, which could possibly take a lot of time.
There are some traces that it could be used to create virtual devices, but no details about it.
You could try to use tools like classdump to get some information directly from the framework, or read some headers on github.
It would be great if someone could share any information about it with community, as Apple seems to be very lazy about doing this.
Many of us are working from home more and I envy the Windows guys who have a virtual webcam plugging in OBS (Open Broadcast Studio). OBS and the Windows plugin are open source projects. As a competent software engineer I should be able to create a plugin that works on OSX -But- I am not a hardened OSX dev.
I am sure I am not googling for the correct APIs and Subsystems. If someone(s) could help me with the Apple concept map to this obscure topic. I would be grateful for a set of crumbs that leads to the OSX API to call(s) to create a camera. I know it can be done as SnapCam does it, but that is a closed-source app.
I am aware of the workaround for OBS that
1) uses code injection and requires disabling security features
2) Doesn't even work in the current versions of OSX
3) Requires yet another app running with video previews etc.
I like the challenge of creating this plugin. I am also wise enough to try and ask for a road map if one is available.
Someone beat me to it. https://github.com/johnboiles/obs-mac-virtualcam
I thought I would search just githib.com directly with the search "virtual camera macos site:github.com". Constraining the search to just GitHub was quite useful.
I am exploring some ideas and trying to make three different applications talking each other via bluetooth.
Two of them would run on Android phones, while the third would run on a MacMini. I can use Bluetooth on the Android phones almost without problems by using native extensions, but I am a bit confused about how to access it on the Mac Mini.
Any research about native extension leads me to mobile related links.
Any idea on how I could send and receive data to/from bluetooth on osX?
Is native extensions the way to go? And in case that was the way, do you know if there is any Native Extension available that I can use? Writing one on my own can be a bit overwhelming...
Yes, you'll need a native extension to access Bluetooth on the Mac.
The process should be more or less the same as on mobile, except of course the Mac extension will need to be built to target OS X instead of Android. A quick Google search turned up this article which might help get you headed in the right direction:
How to Create an Adobe AIR Native Extension for Mac OSX
Library FPBluetooth.ane supported platforms iOS+OSX.
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.
I have a macbook pro. I would like to have my screen lock when I (my phone) moves away from the laptop. I'm sure third party solutions exist, but if I'd like to code something from scratch, what libraries or hooks should I be looking at?
http://web.mac.com/jhollington/technocrat/The_Technocrat/Entries/2007/3/18_Bluetooth_Proximity_Detection_on_OS_X.html has a pretty good step-by-step on how to do a lot of this, although it's using an existing app. That app is open source though, so maybe this will help too? http://code.google.com/p/reduxcomputing-proximity/
I know it's an old question, but I've stumbled upon it today and have an answer.
Here's an opensource third-party solution: BLEUnlock
Lock/unlock your Mac with your iPhone, Apple Watch, or any other Bluetooth LE devices
It contains a modern version of all the code you need. Plus, the app itself supports hooks so you can add a hook to the app instead of writing your own.