how hard is it to program for OSX if you already know iOS?

Discussion in 'iOS Programming' started by 1458279, Dec 27, 2015.

  1. 1458279 Suspended


    May 1, 2010
    I just had an idea for an OSX app and I doubt it's already out there. I've never done OSX and don't see any other reason to do it.

    Here's the OSX app idea:

    A min/max volume control. It would monitor the volume and adjust the master volume based on a min and max range the user would set. Example usage: when you listen to a audio stream (radio or YouTube) the output is dependent on the persons voice or recording level. When an ad comes on, it's much louder than the regular program.

    It shouldn't be too hard, something like a UV meter gauges sound, you'd just turn it up if it's below the min and down if it's above the max.

    Even if it just dropped the volume when it went too high, then returned to normal settings after the sound spike was over.

    Does this sound like a tough project for someone that knows iOS but never did OSX?

    Or, better yet, does anyone know if something like this is already out there?
  2. DeltaMac macrumors G3


    Jul 30, 2003
  3. ArtOfWarfare macrumors G3


    Nov 26, 2007
    I didn't think Boom did what he wanted (seems mostly to be an EQ program) but from the description, his app might be exactly the "Night Mode" feature of Boom:

  4. AxoNeuron macrumors 65816


    Apr 22, 2012
    The Left Coast
    It's the same language (Swift / Objective-C) and the frameworks are largely the same. As far as system audio it might be a little different, I don't have much experience in OS X Audio programming so I couldn't really say in that particular case. But as a general principal it's usually very easy to develop for OS X if you know iOS development.
  5. 1458279 thread starter Suspended


    May 1, 2010
    I don't know if night mode would do the trick or not because part of the problem is that the way the audio is produced, the content you want is very low and the content you don't want is very loud.

    It's almost as if I need an 'ad blocker' for audio :D

    I'm thinking of maybe the volume control would be a ranged instead of a single point setting. The volume control isn't feedback based, I don't know if that can be done or not.

    It could actually be a good project to market if someone added filters for all those YouTube videos where you get more background noise than voice, but that sounds pretty advanced.

    Edit: one cool thing to add would be a scheduled record function, it could even launch an app, or capture the stream and record it for later listening.
  6. bjet767 macrumors 6502a

    Oct 2, 2010
    "Edit: one cool thing to add would be a scheduled record function, it could even launch an app, or capture the stream and record it for later listening."

    Great idea, but it's been done. But, that doesn't mean you can't do it better.

    Now to answer the question about programming OS X, It's almost the same as iOS.

    Basic programs are really easy with OS X. You can use NSDocuments and port easily from UIDocuments, storyboards are close to the same, the views are inverted (iOS has 0,0 at top left OSX lower left), iOS has a lot more media API stuff and the animations are more native to iOS.

    But the real work is how will you interface the music, measure the volume or gain and make changes automatically. That is the real challenge. Timed recording is basically simple stuff in comparison.
  7. 1458279 thread starter Suspended


    May 1, 2010
    Ok, found a solution but it's costly for what I need. There's a product called audio hijack. it allows you to control the volume of one app like Chrome, but it applies to all Chrome windows, not just one.
    It allows you great control and scheduled recording.

    They want $49 and the demo version creates noise and uninstalled itself after a while. Problem I have is this it does a lot more than what I wanted to do. Scheduled recording would be cool, but doesn't seem that hard to program. It's the hijacking of audio that I've never done before and it does it per app.

    So it looks like it can be done, it's just an issue of how do you hijack audio per app.
  8. firewood macrumors 604

    Jul 29, 2003
    Silicon Valley
    It's not hard to move to OS X development from iOS development, but does require some time relearning and recoding. You have to switch from UIStuff to NSStuff (views, controls, etc.) all with slightly different APIs, switch from touch to mouse and keyboard input, and add menus and maybe multiple windows and preference panes for the app to "feel like" a Mac app. I ported a personal test app from iOS to OS X, and maybe less than half of it (Objective C) needed to be rewrote (the Model objects were identical).

    Audio on a Mac is also slightly different. No RemoteIO or AVAudioSession, so you have to hunt around for the audio ports and configuration APIs. If you want to capture and modify audio, you may have to deep dive into writing mach kernel extensions (kext's), or find a lib that does this and works properly on various versions of OS X.

Share This Page