iOS Declares

Hi Jason,
would be possible for the next version to have an example of AVAudioPlayer playing a remote file?
I’m trying to play with it looking for the way to initialize an NSurl object with a remote ( http ) address, but no success until now…

thank you

 Giulio

Does this kit make me get signatures in my iPad and iPhones ? I would really like to get signatures directly into my Valentina DB, now that V6 will support REST. DB access with no driver, only through http protocols .

iOSLib has been updated. Main new feature is the AppleCGContext class (and a convenience module for iOSGraphics), extending the possibilities inside a paint event a bit:

https://github.com/UBogun/Xojo-iosLib/wiki/AppleCGContext

Another update to iOSLib. Mainly bugfixes, but featuring a fully fledged UIScrollView implementation together with a customcontrol. Now we would just need a resizable view to have easy multi-page scrollable views. Currently I have only the idea of stitching together several views and attach them to the contentView of the ScrollView as one big view. But haven’t tested yet:

https://github.com/UBogun/Xojo-iosLib/wiki/AppleScrollView

Kudos to Antonio from whose ScrollView I learnt and to raywenderlich.com. I adoted their doubletap-to-zoom and twofingertap-to-zoom-out Swift/ObjC tutorial methods.

Please don’t download iOSLib currently! A code error was introduced which tells you the class doesn’t exist. Looks like a task needing a bit more time … Sorry! Damn SourceControl!

OK, I think I found everything. I copied every external file now into the project, you will probably just have to find the image folders.
The main project has just the splashscreen now. Examples have moved to a “Demo project” folder.

** Please note you have to copy (or reference it) the iOSLib Folder into each of the demo projects. **

I didn’t want to have several versions of the library. So from now on (hopefully), the current version will be in the main project.
SpriteKit has moved into a different optional folder and into the SpriteKit example project. You will still have to copy the iOSLib folder into the project too.

AppleScrollView, now working, has moved into the Demo projects / Control extensions folder.

It would be great if you could send me a short feedback if everything is working now.

As a bonus, I have added Launch images so even iPhone6 will work. And I think I found the bug that caused the linker error – now everything seems to build as well.

Sorry for the trouble and thanks for the friendly feedback this way!

Thanks Ulrich for the great work! Really appreciated.

Thanks a lot, Christoph! You’re very welcome.

And to avoid too much OT on this thread: Another small update on iOSLib. This time I added all missing UIImage features, but I am unsure about what convenience module methods I should add – open for feedback!

UIImage (aka AppleImage in iOSLib offers many advanced features, including playing animated series of images and stretchable images with Insets – just the core will be resized, corners and borders will stay in perspective. And I added an experimental delegate for saving images to the photo roll. Still having no test device, I’d be glad to hear if it works.
Documentation: https://github.com/UBogun/Xojo-iosLib/wiki/AppleImage

New update (v1.3) to iOSKit adds RegEx classes with similar functionality to the desktop classes along with other small changes. Special thanks to @Kem Tekinay for helping with testing the Regex classes!

https://github.com/kingj5/iOSKit

wouldnt it be easier to have 2 threads, one for ioskit and one for ioslib ?

and by the way Gentlemen Jason and Ulrich, could you unite your welcomed efforts to bring us only one “perfect” ios declares lib
for the community ? (that Xojo Inc could then include in Xojo directly …)

many thanks for both of you for the time and efforts you put in this work.

[quote=205268:@jean-yves pochez]wouldnt it be easier to have 2 threads, one for ioskit and one for ioslib ?

and by the way Gentlemen Jason and Ulrich, could you unite your welcomed efforts to bring us only one “perfect” ios declares lib
for the community ? (that Xojo Inc could then include in Xojo directly …)

many thanks for both of you for the time and efforts you put in this work.[/quote]

IMHO it is a bit early to have their projects converge. First of all because each has his own philosophy that conduces to different approaches, and secondly because iOS is still far from having achieved stable status, as OS X did several years ago.

While iOS goes through growing pain, it is good to have as much talent as possible working on it.

Finally, while Jason and Ulrich seem to be the most prolific ones at this moment, lets not forget Antonio Rinaldi who regularly posts declares, or our two industrious commercial providers of declares Jean-Paul Devulder and Christian Schmitz, which products bring features not found in the two libraries you cited.

Hopefully having one channel for all declares can even impulse more members to share their work.

The problem with our libraries is we have indeed different basic structures which makes it hard to merge the projects. But we are aware of the fact that they at least should be able to cooperate, maybe even share core modules with global methods and constants.

I personally must admit it happens more often that I find something new I’d like to include instead of going on similarity hunt between our libs and trying to align them. But I think it’s ok with Jason if I reveal to you that Jason has sent me a new extension of his iOSKit which raises the need for lib cooperation highly, and we will definitely work on this issue. Sadly I cannot give you a schedule, only can assure you there’s a high degree of cooperation between many of us and we’ll try to figure out a solution.

In the meantime, because our projects (like Antonio’s great snippets) are open source, it’s fully ok if you find some iOSLib feature you’d like to have included in iOSKit to ask Jason to port it (and vice versa). In fact I stole a few pieces from Jason and Antonio and extended them, and iOSLib is meant to be used that way too. And, of course, both our libraries being on GitHub is an open invitation for others to use the basic framework and create own new classes upon them, preferably then merging their branch so others can use them too. If. for that case, a short explanation on iOSLIb GitHub wiki could help, please tell me and I’ll write something.

iOSKit has been updated to version 1.4. This is major update with many changes. Pragmas have been added to eliminate compiler warnings about unused variables. Error handling in AVFoundation has been updated so that errors are properly returned if they occur. Unfortunately this may break some code since it is no longer possible to pass nil to the updated functions. StoreKit classes have been added. They have not been fully tested and if you find any bugs or problems with them please send me a PM and I will try to fix them. A Notification_Center module has been added that allows for in app notification sending and processing. UIAlertClasses have been added UIKit, and an isIPad method has been added to Extensions.

https://github.com/kingj5/iOSKit

Enjoy, and as always if you have any questions please ask!

After the compatibility with iOSKit a small addition to iOSLib: AppleBezierPath (aka UIBezierPath) with its full feature set of blendmodes, line patterns and transformation possibilities. Sadly it currently must be used as a replacement, not an addition, due to the lack of handles in iOSPath which it otherwise could complement.

A demo view showing the basic forms was added to the Graphics demo project.
Don’t forget to drag the iOSLib folder from the main project into the demo projects!

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

And another addition: UIDynamics.
UIDynamics (AppleDynamics in iOSLib) allows you to use physics simulations on every control or view. If you want to give your UI a more realistic touch, use gravity or force fields. Or build a physics simulation without any sprites – just use imageViews. There’s a demo view in the graphics demo project giving you a short introduction. The documentation has not been updated, so please refer to Apple’s developer library or some of the excellent UIDynamics tutorials for Swift or Obj. C Google will present you upon request.

The UIDynamics folder inside the UIKit folder is completely optional. If you don’t need this framework, just remove the folder.

Hi all,
It’s been a while, but a new version (v1.5) of iOSKit has been released. This release adds all of the classes needed to use GameKit in your apps. Other small changes were made to make iOSKit compatible with the small changes introduced by 2015r3, along with other small changes. A very basic overview of how to use the GameKit classes is included in the ReadMe, and there is an example view to show how to use a standard GKMatch and send data between match objects. To fully test this view (or use any of the classes), you will have to enable developer mode for GameKit on your phone under Settings -> Game Center -> Sandbox (slide it to yes) then sign in with two test Apple IDs on two separate phones. Then you can “play” yourself in the small example game. Please note that playing a game between the simulator and a phone is often buggy or simply doesn’t work, so testing with two phones is recommended. Also, please consider the GameKit classes to be in beta. Although they should work just fine, there may be small hiccups along the way since I was not able to test all aspects of all of the classes.

As always let me know if you have any questions, I’ll do my best to get back to you in my spare time.
Enjoy!

https://github.com/kingj5/iOSKit

iOSLib v0.8.0 is available. See the features here: https://github.com/UBogun/Xojo-iosLib/releases/tag/v0.8.0 and have a look at the Wiki. As usual, there’s much more included but finally the documentation catches a bit up. Will have to do Keychainitem & TouchId documentation next.
A few CALayer custom controls are momentarily out of order, but I guess noone’s used the CAGradientLayer when there’s a much easier Context method.

New: KeychainItem, UserDefaults, TouchID, AlertController.
Improved: Many things, most of all view events, easier graphics handling, better iOSLibCanvas, ScrollView, Textfields, Labels and SearchField and an ImageFromContext method to create new images completely from code.

Thanks Ulrich. Have you checked that it “plays nicely” with iOSKit?

Good point, Jason. And no: We added both conflicting globals. Therefore:

[quote]If you need to use iOSKit too, please wait for iOSLib release 0.8.1 :wink:
[/quote]
EDIT: @Jason, knowing you are using iOSLib for a few context things mainly: You should have a look at the direct draw commands, as described in the ImageForContext method here: https://github.com/UBogun/Xojo-iosLib/wiki/AppleImage
In experimenting I found it so much easier to handle: No need to address the CurrentContext. Just define a graphics object and paint it directly with its draw commands that work on the current context.

Thanks Ulrich. I use iOSKit a lot in my app but I’ve also started using iOSLib too so I’ll need to wait. I’m looking forward to be able to incorporate your new version. :slight_smile: