AppleLib Releases

Time to start releases while I try to include more controls to the shared library.
New in 0.5.0, besides a lot of fixes and additions:
ApplePopover for macOS, including the new Appearance possibilities.
TouchID for iOS finally working without crash. I had to use a timer in this case to wait for the results because the private thread that the response comes in could not be convinced to invoke anything on main thread without creating sporadic exceptions.

https://github.com/UBogun/Xojo-AppleLib

New release: 0.5.5:

macOS:
First, incomplete release of SceneKit for macOS
Button enhancements
ButtonCell subclass for macOS
AppleSound class
UserDefaults

For iOSLib:
TouchID

While it is possible to load a SCN file from Xcode’s SceneBuilder, the images used by it are not found. Any hints are very welcome!
Currently, OSXLibSCNView does not offer mousedown events, or the debug features would not react. Use either the gesture events or enable the events in the AppleSCNView classPtr and the AttachHandlers and RemoveHandlers method of OSXLibSCNView.

Hi Ulrich. Thanks for your contribution. Is this an open source library?

Also, can you please explain the difference between using this and the old MacOSLib for OSX target?

https://github.com/macoslib/macoslib

I am currently using the old library and intend to create an iOS version of my app at some point so would it be advised to switch now?

Hi Denise. Yes, AppleLib is free to use (and free to contribute optionally too), with the exception of games created with SpriteKit or SceneKit where I would like to get a license for :smiley:

The main differences are:
– AppleLib is much smaller (yet). Often needed controls like TableView are not yet finished.
– it is 64Bit and Xojo framework compatible. It uses Xojo.core.classes and text, but in most cases you can forward strings as parameters too.
– It has no Carbon code, and many classes implement features that came with El Capitan and Sierra.
– It has much fewer cross-dependencies. There are obligatory core folders, but everything sitting in an “optional” folder can be removed safely. So no reason to blow up your code with the complete library,
– in the final stage, Xojo wrappers and conversion modules should make its use more Xojo-like, but currently you often have to use the Apple classes directly (just in MacOSLib) – which saves a few conversions and often gives better results, like in the case of NSColor vs. Xojo color.
– and of course, it includes iOSLib so you can in many cases reuse code for both Apple platforms.

I receive very rarely only comments, reports and requests, so I cannot guarantee for every feature. I build it mainly around my own interests and projects but am very willing to implement something on demand. I think it would be wise to give it a try and feel free to tell me what is missing or buggy. And like MacOSLib, code contributions are very welcome.

I think it would be great if you kept it that way. One of the main reasons I avoid macoslib is how gargantuan it is. I try to pluck out individual declares that I need.

Or, if it does get larger, keep it modular so that one doesn’t need the entire library for one little thing. (it sounds like this is your plan)

Hi Tim,

yes, after I found out that iOSLib took the same path as MacOSLib (becoming a monolith) I realized it’s important to keep it this way:

The core folders are not really “that” small, but I don’t they they will get much bigger. Most that will follow will be purely optional.

+1

In particular, calls are so nested, it is sometimes very difficult to undo the ball.

Thanks, Ulrich for the clarification.

I agree that MacOSLib is huge and it’s annoying to have so much in my project for only a handful of calls. That said, I am still extremely appreciate of whoever created and contributed to it because it has helped me a lot.

I remember taking only the ones out I needed from WFS but found the OSLib calls so nested (as Michel states) that it became quite hard to do.

I think I will need to investigate what I really need and then see if I can easily replace them with Ulrich’s library. Also, I will be trying to replace all the old Carbon calls with Cocoa so maybe now is the time to make the leap to a new library also.

New release 0.5.8:
• ScrollView on macOS is enhanced and fixed. The OSXLibScrollView custom control forwards most features to Xojo classes transparently. Also, an AutoCenterClipview exists that centers scrollview content too small to fill the view (mostly at least).

• AVAudio has a custom AppleLibAVTonePlayerNode. This can be used to beep or play simple melodies. And it explains a bit the use of some Accelerate framework methods – the sine wave is built with its help. Demo view/window in with projects.
Thanks to Dave for his Swift class I took as a template!

• and of course many fixes of bugs encountered along the way.

[quote=295829:@Ulrich Bogun]Time to start releases while I try to include more controls to the shared library.
New in 0.5.0, besides a lot of fixes and additions:
ApplePopover for macOS, including the new Appearance possibilities.
TouchID for iOS finally working without crash. I had to use a timer in this case to wait for the results because the private thread that the response comes in could not be convinced to invoke anything on main thread without creating sporadic exceptions.

https://github.com/UBogun/Xojo-AppleLib[/quote]

Hello Ulrich,

I was searching for a way to generate PDF on iOS and I found this on the Git , can you please help me on this, i saw that you wrote most of it but would be nice if I get some guidelines on how to actually generate the document and how to save it.

Thanks a lot.