How to get macos app signing set up for packages - macos

I am new to macOS development and am having a terrible time trying to get my code signed. The documentation to me seems to be horrible.
My specific situation...
I am building a cross-platform app that runs on Linux, Windows, macOS and eventually iOS and Android.
It is a console app that runs as a service or LaunchDaemon
It has a UI served by WebView, http, or console commands depending on the scenario.
It is built with Go 17 in VScode.
I am not using xCode other than the command line tools.
My goal on macOS it to distribute it as a package (pkg) and not as an app.
I have been using MunkiPkg to build it
I am hung up on understanding how the various certificates need to be set up. I have not been able to get a successfully signed package notarized.
Can someone please point me to some documentation that explains how my scenario works? Most of what I found requires it to be built in xCode. And the Apple docs seem mostly to focus on how great their tools are without actually explaining how to use them.
Help!

Related

OSX Sandbox: Launch a different executable based on OS version

I have an application in the Mac App Store. I'm trying to support users going back to Snow Leopard but this is becoming increasingly difficult.
Recently I've hit a roadblock due to the iTunesLibrary.framework, this framework must be linked to the main executable and yet doing so will always trigger a crash on load when running in Snow Leopard.
To workaround this problem, I want to compile a version of my app that doesn't use features and frameworks from newer versions of OSX. The problem is, how can I launch the compatibility build automatically?
I'm considering trying to make the main executable point to a shell script, but I don't really like that idea. I've also thought of the main executable being a helper that simply launches the full app and then exits. I expect this would work, but I worry about it getting approved by Apple. Finally, I'm wondering if the app bundle format itself can support this kind of setup, maybe via an advanced used of CFBundleExecutable that I'm unaware of.
Has anyone been down this road, what would you suggest?
Try weak linking the frameworks, more information about Weak Linking and Apple Frameworks here. Then also check in your code for the OS version or - (BOOL)respondsToSelector:(SEL)aSelector of any NSObject to determine what you can call and what not.
To have Snow Leopard as Base SDK you'll need an old Xcode and will have troubles submitting to Mac App Store.

Difference in behavior between Xcode and OTA Ad-hoc distribution

I have my app working to my satisfaction both in the simulator and on two devices when debugging through Xcode 4.3.2. I use OTA Ad-hoc distribution to send to my beta testers. After archiving, saving, and uploading my ipa and plist file to my website, I then download and successfully install the app on my phone.
Sounds good, right?
HOWEVER, I am using CoreAudio and CoreData, and low and behold suddenly there is no sound in my app. I delete and install OTA on the same devices I am debugging with, so I am at a loss to where the problem is occurring.
I have a feeling that there might be an underlying problem with my Core Data model (which feeds my sound) but checks upon checks seem to verify that it is working. It DOES work when I install from Xcode, unplug, close, and reopen the app on the device. Only the OTA install has this problem.
Has anyone encountered any differences in behavior like this? I checked my build settings and the only difference I see for AdHoc is using the Entitlements.plist, which only useful setting appears to be NO to debugging.

Xcode 4.3.2 and iOS 5.1.1 + jailbreak: App installs but crash on launch

I don't have the Apple 79€/year account. In iOS 5.0 and Xcode 4.2.1 I changed SDKSettings.plist ecc... And it works. In iOS 5.1.1 and Xcode 4.3.2 no, I already changed settings ecc but don't work, the app installs on device but crash on launch... How can I run my app on device without crashes? Thanks, and sorry for my english.
I have had this issue before on a jailbroken device. You have a few solutions depending on the exact issue. First you can install app sync in order to allow unsigned code to work on your device if you are not using a valid code signing identity. The second option is to actually get a valid code signing identity along with the provision profile so you can run the application correctly. This involves paying for the developer program so this may not be the best option.
Last is a very common issue with jailbroken devices. Which is that you will receive an error such as "failed to get the task for process xxxxx". This tends to happen a lot with jailbroken devices. This is because Xcode notices you are not using a provision profile that is required to report error logs. All you have to do is launch the application again on the device and everything should work.
This is just Xcode not being able to fully launch your application because of the missing provision profile so it results in a crash. If none of these solutions solve your problem please post a more detailed explanation of the issue you are having.

Is it possible to get an AIR 3.0 Captive Runtime app into the Mac App Store?

Is it possible to get an AIR 3.0 Captive Runtime app into the Mac App Store? How would you do that?
Here's a link where you can find pretty thorough article how to upload an AIR app in the Mac App-store.
There are actually a couple of steps to doing this. First, and this is what I have found to be the easiest solution, is to build an AIR Intermediate file from Flash Builder 4.5. Once that file is built, use the adt command line packager with the "-target bundle" flag to sign and package the a Mac OSX application bundle. This will result in a fully working captive runtime application bundle that you can run on OSX. When you have completed the Adobe side of things and have verified that is runs correctly you can move on to the Apple side.
I would recommend you reference Apple's developer documentation for this here: Submit Your Application using Application Loader. You will need to use both the "codesign" and "productbuild" commands on the application bundle you created from Adobe's packager. When done, you should now be able to use Apple's Application Loader to submit the package to the Mac App Store.
I have not yet tried to sign the AIRI package with my Apple certificate, so I'm not sure if that would work, since I have both an Thawte cert for Air apps and the Apple issued one. This would take further testing.

Blackberry Development on Mac OS X

I recently started creating applications for mobile devices and have successfully completed an application for the iPhone. I am now turning my attention to the Blackberry but haven't been able to find a convincing article or website that states that it can be done or a tutorial on how to do so. Can Blackberry apps be developed on Mac OS X? If yes, how do I go about doing so? Can anyone please point me in the right direction as I only have access to a Mac and really want to get this project on the road. Thanks in advance for your help.
UPDATE:
RIM has released a MacOS Eclipse plug-in for Blackberry Development: http://na.blackberry.com/eng/developers/javaappdev/macosx.jsp
While there is no built-in simulator, the plug-in DOES support USB tethered device debugging for the Torch 9800 handhelds. I plan to get one; they are ~$499 w/no contract. With a Torch and the new plug-in, Blackberry development is possible without using a VM. (Finally!)
PREVIOUS POST:
Building on MacOS works well once you set it up. I've had less luck with the simulator. On the whole though, being able to run Eclipse natively in MacOS and flip to a Windows VM only for debugging is a big win in my book.
You can get a MacOS version of preverify (see link below for details). I do my development with Eclipse on MacOS X and use Ant to build BB apps.
This blog is excellent and has many of the details to get you started:
http://www.azizuysal.com/2009/07/blackberry-development-on-mac-os-x.html (original link is dead. The "wayback machine" provides us with the original text content, but images and styling are lost to the sands of time. Still worth a read.)
The tricky part is getting the simulator to work. There is a Wine-based work-around, but on my computer, while the simulator was able to run under Wine, the LCD output was scrambled.
Currently, I build COD files from Mac, and my Ant build process drops them into a directory that is shared with a WinXP VM. I can run the simulator stand-alone in this VM. Debugging is also possible by installing Eclipse inside WinXP and pointing the debug configuration it at the source directories.
I've actually got a bit more magic. I enabled some of the Java 1.5 features by compiling against 1.5 and then translating the bytecode to 1.3 prior to the preverify script. (Blackberry only speaks a barbaric 1.3 java, flashback to circa 1992). It's not a silver bullet as some features still don't work, but it does cut down on the need to make everything an untyped Object reference.
Lately, I've been working on a x-platform framework to allow me to write app code once and build against both Android and Blackberry (both are Java). The Android part was easy. It's just a bitch to debug anything in Blackberry. Someone working at RIM decided that Blackberry didn't need to keep Exception stack traces unless there was a catch(Throwable), and then they could do something bizarre, non-standard, and undocumented (catching Throwable behaves weird). I've only kinda-sorta figured out a hack to get stack traces using JavaLoader.exe without breaking into the debugger, and it's barely worth it.
p.s., I now do x-platform development with a single code-base targeting Android, Blackberry, and Desktop. Desktop is great for testing app functionality, with very little Blackberry on-device testing needed once features work in the desktop 'simulator' (a Swing GUI built for debugging our games).
Even though certain components of the RIM development platform are java-based, such as the JDE - other components such as the preverifier and device simulators are implemented as native Windows executables.
Basically, the easiest way to do it is to install Windows on your Mac using Bootcamp or Parallels and run inside a real Windows environment on your Mac.
However, there are other "hackier" ways to do it using Wine, MacPorts, and a number of other tools - as an example see this blog post

Resources