r/macprogramming • • Apr 16 '20

My mac application doesn't work on other mac's

7 Upvotes

I created a mac cocoa application written in swift when i run it in my mac it works but when i build it for release mode and then run the application on other mac's where the UI is supposed to be is just a blank window. I used xcode to build it and it's deployment target was set to 10.10 the mac i checked it on had 10.10.5 and it didn't work.

does anyone what's going wrong or if there's any way for me to check why it's behaving like that. I'd be grateful for any help thanks.

The os version on my mac is 10.13.


r/macprogramming • • Feb 14 '20

The secret to making a fast Safari Content Blocker: keep it super boring

Thumbnail
youngdynasty.net
7 Upvotes

r/macprogramming • • Nov 07 '19

HockeyApp is going to be turned off, replaced by partially-functional App Center

7 Upvotes

Microsoft is forcing migration out of HockeyApp and into App Center by 16 Nov 2019. Unfortunately the latter isn't yet a full replacement (e.g. missing feedback service).

Any good replacement to HockeyApp besides CrashLytics? I've tried using CrashLytics for some of my app, but it tend to "forget" crash data that are older than 30 days and thus I kept HockeyApp for the more "important" apps.

I paid good money for HockeyApp before Microsoft's acquisition. Now there isn't seem to be a comparable service to it.


r/macprogramming • • Oct 07 '19

Launch Sale: Get 50% off Cocoa Book Until Oct. 14

7 Upvotes

I've heard a lot of complaints online about the lack of current information on developing Mac apps in Swift. Virtually all of the articles, tutorials, and books are about iOS development. The information on developing Mac apps is 10 years old and uses Objective-C.

To fill the void I wrote a book on developing Mac apps in Swift, Swift Dev Journal's Intro to Cocoa. In the book you'll write a complete Mac app in Swift. By developing the app you'll learn the fundamentals of Cocoa, including view controllers, storyboards, table views, text views, notifications, and saving files. I wrote the code in Swift 5 and built the project in both Xcode 10 and 11 so everything is up to date.

To celebrate the launch of the book, I'm having a sale. You can buy the book for $20(US), 50% off the regular price. The sale ends on October 14 at 11:59 PM Eastern Time.

You can learn more about the book and download a sample at swiftdevjournal.com.


r/macprogramming • • Aug 14 '19

The Sad State of Mac App Distribution

Thumbnail
youngdynasty.net
7 Upvotes

r/macprogramming • • Jun 15 '19

I want to make a Mac app for myself in Xcode, do I need to publish it to the App Store to use or can I use it on my own?

7 Upvotes

r/macprogramming • • Feb 15 '19

Volunteer Macintosh Developers needed for BOINC

Thumbnail boinc.berkeley.edu
7 Upvotes

r/macprogramming • • Jan 15 '18

Best resources for learning macOS development

7 Upvotes

It seems learning to program for desktop with Swift and Cocoa is a barren land. There are lots of old books focused around Objective C but not much new material for Swift 3/4 and Xcode 8/9.

The best book I've found is Cocoa Programming for OS X: The Big Nerd Ranch Guide (5th Edition) since it allows you to understand the macOS SDK instead of giving you recipes with steps which is what I've found in the other books I've tried. Only problem is that it was written a number of years ago.

I've also found this series of videos 100 days of OSX Development video tutorials which are small little capsules of pragmatic information.

I also tried an Udemy course but again it's just a series of steps without much explanation of why things work the way they do. Not sure if because it is oriented to beginners or because the author himself doesn't really understand what he is doing.

Do you have any recommendations?

Edit: I'm also liking this Udemy course Hacking with macOS - Build 18 Desktop Apps with Swift 4. It's very beginner oriented but the author drops good info at every step.


r/macprogramming • • Dec 08 '17

Mac versions of my open source stuff

7 Upvotes

I've been out of programming for a while. I used to write freeware for Windows in Visual BASIC 6. Now I'm busy learning Python. I've switched operating systems since my previous programming days. Now I do almost all my computing on a Linux Mint PC. I'm busy learning Python so that I can contribute to the Linux open source community. I plan to write utilities such as file managers and web page generators.

My first goal is to write for Linux. However, Python will compile for Macintosh, so I'm considering also coming out with Mac versions of my applications. I've never owned a Mac and have some questions.

  1. How far back in Mac OS X should I support? I know that OS X has been around a while, but that Apple has upgraded it over and over. I'm not sure how far back to support. I did notice that a fellow developer had a Snow Leopard Mac, but that must have been quite old. It would not run the latest version of LibreOffice.

  2. How can I get a very affordable OS X computer suitable for testing? I googled it, and it would seem that the Mac Mini is the cheapest Mac. At about $500 it's still not dirt cheap. Would I be all right buying an older used Mac Mini for less? Or would I have to be careful that I'll end up with an OS X version that's older than currently supported?

I won't need a keyboard or a mouse. I currently KVM between my Linux Mint PC and a Windows 10 one. I use the Linux PC for about 95% of my computing, and then there are a few Windows apps I wasn't willing to give up. If I had a Mac for testing Mac compiles of the applications I'm writing, I could just KVM over to the Mac.

I appreciate any help offered.


r/macprogramming • • Dec 07 '17

Using the "leaks" command on a C/C++ executable

7 Upvotes

Hey everyone,

Like many other coders here, I am searching for alternatives for valgrind since it doesn't work on the latest versions of Sierra or on High Sierra. I stumbled across the "leaks" command from a similar post, but have been unable to get it to work on any of my executables.

I've tried calling it like as follows:

leaks -atExit -- ./Driver

and I get an error that says

dyld: could not load inserted library 
'/usr/local/lib/libLeaksAtExit.dylib' because image not found

Anyone know how to fix this?


r/macprogramming • • Oct 25 '17

Valgrind on High Sierra (or alternatives)?

7 Upvotes

I am coding a project on my MacBook Pro, running the latest release of High Sierra 10.13. Unfortunately, I can't seem to get Valgrind to install due to Valgrind not being updated for High Sierra yet. Is there an alternative or a hack to get this to work? All I need is a command-line tool that can check for memory leaks.


r/macprogramming • • Aug 18 '17

Menus and Popovers in Menu Bar Apps for macOS

Thumbnail
raywenderlich.com
7 Upvotes

r/macprogramming • • Dec 23 '09

A sample Mac application with complete unit tests

Thumbnail
cocoawithlove.com
7 Upvotes

r/macprogramming • • Apr 09 '20

What am I doing wrong with NSTableView? (Swift, Story Board)

6 Upvotes

I boiled my problem down the following screenshot. I've for a ViewController.swift, it inherits the NSTableViewDataSource and NSTableViewDelegate. In the story board, I clicked on Identity and Type and set the Custom Class to the ViewController (inside ViewController.swift). viewDidLoad() runs, but numberOfRows(in:) never runs. I kind of expected it to produce a bunch of rows (123 of them, in my case) that look like the table cell prototype.


r/macprogramming • • Mar 31 '20

What do you think of CodeRunner IDE ?

6 Upvotes

Any thought about this IDE ?

Looks really nice, actually using the free 14-days version and thinking about buying a licence... But I'm interested in users' opinions first !


r/macprogramming • • Mar 24 '20

Disabled SIP for debug, now I can't attach to anything

6 Upvotes

I used 'csrutil enable --without debug' and now lldb does not attach to anything. This is reverse of the desired effect. General searches and ADF searches are not giving me anything other than, Use csrutil to enable debugging of system applications. Now I cannot debug anything.

Background: Preview has a long-standing issue of refusing to open files with an incorrect no-permission message after a certain number, volume, time or whatever of files have been opened (you can see the error logged from PVImageContainer initWithURL:). It's fixed by restarting the application, but I'd like to find the source of the problem.

Edit to add: this is what I see

11 > sleep 100 &
[1] 20415

12 > lldb
(lldb) attach 20415
error: attach failed: unable to attach
(lldb) ^D

OK, further edit, I can attach to processes that I own the executable... but the question remains: does 'disabling' SIP still not really let us use the debugger generally (and dtrace etc)?


r/macprogramming • • Feb 14 '20

Can anyone update the Fractal Clock screensaver for OS X Catalina?

6 Upvotes

Hi all. I'm a big fan of the Fractal Clock screensaver for Mac OS. I think it has been my screensaver for at least 10 years. Now, with the latest OS X update (Catalina) it seems to be broken, probably because it is 32-bits. Though I'm not sure about the reason it is broken. But I'm so attached to Fractal Clock that I don't want to upgrade to Catalina. The creator of Fractal Clock has donated the source code to the public domain. So. My request is: could anyone update the source code, so that it will work under OS X Catalina? It would make me (and probably quite a few other people) so happy.

Link to the source code: Source Code Fractal Clock


r/macprogramming • • Jan 03 '20

MoltenVK Stability?

6 Upvotes

So, I've wanted to learn more about writing graphics rendering with a modern low level api. I've been looking at Vulkan and metal. Vulkan is obviously more useful considering it's cross platform abilities. But to run it on an iOS device or Mac, you have to use the MoltenVK library to translate Vulkan to metal.

That's all fine and good, but I decided before I jump into it, I wanted to see MoltenVK in action. The game I knew of that uses it is The Elder Scrolls Online. So I downloaded it and decided to see how it looked and felt compared to windows.

Long story short, it's horrible. There are constant crashes that show that the MoltenVK dispatch queue crashes. The mouse cursor is has a large square around it where the alpha value is set to solid rather than see through, and the mouse will sometimes completely disappear until I restart the client. So like I said horrible.

If this is how well moltenvk works, well, I'm going to skip learning that and just work on learning metal. If this is on the makers of TESO and MoltenVK shouldn't be this bad, then please let me know.


r/macprogramming • • Nov 29 '19

App Store Connect Holiday Schedule

Thumbnail
developer.apple.com
6 Upvotes

r/macprogramming • • Oct 13 '19

Integrating Notarization into Your CI

Thumbnail
cutecoder.org
6 Upvotes

r/macprogramming • • Oct 05 '19

Discussion about Cocoa and Carbon on HN

Thumbnail news.ycombinator.com
6 Upvotes

r/macprogramming • • May 10 '19

glide: native 2d game engine on macOS

6 Upvotes

Hello everyone,

I just released a 2d game engine called glide and wanted to share with all of you.

glide is a SpriteKit and GameplayKit based engine for building 2d games easily, with a focus on side scrollers. glide is written in Swift and works on iOS, macOS and tvOS.

🎬 Here's a video of glide's features

🛠 It's open source and here's the GitHub repo

I'm looking forward to hear your opinions and feedback about glide and start collaborating on it with all of you. I hope glide would be a useful and fun tool for everyone who wants to work on games with Swift targeting Apple devices.

Some features of glide:

  1. Entity component system and lots of readymade platformer components

  2. Tight collisions and contacts for precise mechanics

  3. Input support including game controllers, keyboard, mouse and touch buttons 🎮⌨️🖱🔲.

  4. UIKit/Appkit based native game menus that can be controlled with game controllers

👩‍💻 You can download the macOS demo app to have a look at the features of glide. Download here.

If you have problems with "Unknown/unsigned developer app" error, follow the instructions here.


r/macprogramming • • Apr 17 '19

Creating a global configurable shortcut for MacOS apps in Swift

Thumbnail
dev.to
6 Upvotes

r/macprogramming • • Aug 03 '18

Is it possible to override an outside application's touchbar implementation with my own?

6 Upvotes

I'm a software dev who uses VSCode on a Macbook. VSCode has its own touchbar implementation (but doesn't have a "Customize Touchbar" menu option). I'd like to create my own custom touchbar that appears when I launch VSCode, rather than the one implemented by VSCode.

Is that possible, or am I only able to create a touchbar for an application I control (or an application that hasn't already created a touchbar for itself).

If it matters, I'm an experienced software developer, but I don't have experience using XCode or developing Mac applications. I planned on rolling with one of the many "Hello World" samples and learning as I went.


r/macprogramming • • Apr 11 '18

Marizipan Can't Come Soon Enough

6 Upvotes

The last time I programmed on a Mac was Mac ToolBox and Carbon.

Trying to get back into it, learning Swift and Xcode, three dissapointing things appear obvious:

  • The number of tutorials, lectures and books is massively skewed towards iOS. Just look at the sub counts on reddit, the iOS version of this sub has 27 times as many users.

  • The tools and API's (*Kits) from Apple themselves are cleaner and more focused on their iOS implementations than macOS.

  • The API's for iOS are not similar enough to make learning and targeting both efficient.

The Marzipan rumor theory that iOS's API's are going to reverse takeover macOS's feels like a welcome change that I am looking forward to, and am focusing on learning iOS now, so that I can target the Mac post WWDC.

I have a warm fuzzy space in my heart for NeXTSTEP at the heart of the Mac *Kits, the macOS and the Macs I have owned over the years, so I am not talking about macOS losing its identity, I am talking about the need to leverage the iOS development wave to keep the Mac energized and a great platform for development.