Latest posts from Codename One.
Blog

Xcode 10.1 Migration
Over the past month Apple started sending out warnings that they will no longer accept apps built with older SDK’s starting this March. To preempt that we will update our servers to use xcode 10.1 over the next couple of weeks. This change should be seamless for the most part but some odd behaviors or bugs usually rise as a result of such migrations. To test if a sudden regression is caused by this migration you can explicitly force xcode 9.2 for compatibility by using the build hint: ios.xcode_version=9.2. ...

TIP: Global Settings
A somewhat hidden feature of Codename One Settings is the ability to define global settings. Global settings are useful when you have multiple projects and would like to use common defaults. E.g. we have standard certificate definitions for iOS/Android that allow us to just send a device build on a new project without configuring anything. __ For iOS this can only work for debug builds and won’t allow features such as push etc. It requires some work… ...

See You in 2019
Happy holidays, Merry Christmas, happy new year to all. All of us here at Codename One hope you have a lovely vacation if you are taking one. Since half of our readership is from countries that celebrate these holidays it seems like a good time to take a short blogging vacation as well. During this time we won’t blog and won’t make releases unless there are crucial issues. We’re still here for support but some things will be pushed into January. Archived Comments This post was automatically migrated from the legacy Codename One blog. The original comments are preserved below for historical context. New discussion happens in the Discussion section. ...

TIP: Undo Delete
One of my pet peeves is the “Are you sure?” dialog. I’ve used it a lot myself because it’s the “easy way out”, but when possible I try to avoid it. This is especially important in mobile where constant prompts really slow down the workflow. The trick that lets us avoid the “Are you sure?” dialog is the undo option. Once you can undo an operation you can move fast and let users reconsider later. With file deletion this is a bit harder. Most OS’s provide a trash can abstraction. This doesn’t exist in mobile devices where apps are effectively segregated from one another. However, implementing our own trash can is pretty trivial. ...

Button Lists
I wrote in the past about the problems in the List class, so I won’t rehash them here. However, the ideas behind list are still valuable. One such idea is the list model which allows us to separate the state from the view. Unfortunately the renderer architecture makes this hard to implement for most developers and limits the flexibility of the API. To leverage this idea with the easier to use layout/container hierarchy we introduced ButtonList and its subclasses: CheckBoxList, RadioButtonList & SwitchList. ...

Install on Home Screen
We talked about our support for Progressive Web Apps before. We added quite a few enhancements since that support was introduced and it’s a pretty powerful feature. Personally I consider it a killer feature, even if Google decides to ban your account you can still distribute your app. One of the cool features is the seamlessness. Most of the functionality “just works”. However, there are some cases where we need explicit hints due to the different behavior of desktop/mobile and web. ...

TIP: Canceling Subscriptions
One of the things I like most about our subscription base is its solid nature. We still have a lot of subscribers in the $9 per month plan which we discontinued several years ago (it was so long ago I can’t find the relevant blog post anymore). That’s wonderful, it means people like our product and are with us for the long run. However, flexibility is important too. The fact that subscriptions can be canceled easily is important. Canceling subscriptions is easy although we don’t have any control over that. When you sign up for a subscription you effectively define a PayPal recurring payment process associated with your account. When we get a payment we keep the account at that level. ...

Bottom Align
Box layout Y is one of the most used layouts in Codename One. It’s a wonderful, easy to use layout that makes vertical scrollable layout trivial. I love its simplicity, but sometimes that simplicity goes too far. A good example of that is the a common layout where we have a button at the bottom of the screen. Historically we solved this by nesting box into a border layout: ...

Introducing Cloud Connect
A few years back we had Codename One LIVE! It allowed developers to preview designs built with the old GUI builder on devices. Today we’re introducing the equivalent functionality for the new GUI builder and the Codename One Build app. Cloud Connect allows you to instantly see changes from the GUI builder in the app. You can activate Cloud Connect using the new Cloud Connect button in the latest version of the GUI builder. Once it’s activated launch Codename One Build and open the side menu, you should see a new Cloud Connect option in the side menu. ...

Validate, Owner, Badges, ImageViewer and Picker Range
I’ve been pretty busy over the past few weeks and didn’t get a chance to write a “what’s new” post. This caused a huge backlog of new features which I’ll try to cut down in this post. UI Validation This is a feature that’s coming in the Friday update. Component inspector has a new “Validate” button that checks the UI for common mistakes. Right now it only checks for nested scrollables on the Y axis but ideally we should include additional checks. ...

TIP: Don't Use Push as a Communication Protocol
Apple introduced push notification at a time when iOS apps didn’t support multi-tasking. It was used as an intrusive notification system that allowed an app to communicate it had something important to tell you. Back then push messages would trigger a dialog box as it predated the pull down notification tray pioneered by Android. The purpose of push on iOS is visual notification. You can send non-visual meta-data but that’s almost an afterthought in iOS. ...

Subscription Pitfall
A while back Steve wrote about auto-renewing subscriptions and I recently got a chance to implement such a subscription in an app. However, it seems that all the changes in the world of in-app purchase created a situation where API’s work in some cases and don’t work for all of them. __ After publishing this post we walked back on this, you now need to use subscribe for subscriptions again! In the blog post, Steve used the purchase(sku) API to subscribe. This worked correctly as subscriptions are determined by the respective app store. As I implemented this code I chose to use the subscribe(sku) method which seems to make more sense. Unfortunately it doesn’t work and would be deprecated with the update this Friday. ...