Message:

iOS (23 posts)

We are happy to announce the new release of Backendless, version 5.2.0. The new release delivers completely redesigned support for push notifications. With the new release you can create highly visual, dynamic and interactive push notifications for Android and iOS devices. The content in the notifications can be personalized for each individual user, you can greet the users of your apps by name, provide content and information in the context of user’s location or any other related user properties. You can configure your push notifications to include sounds, images, configurable buttons (with inline reply) and custom vibration patterns. You can easily schedule push notifications to be delivered automatically, alternatively you can send them out with Backendless console or using the API. The video below provides an overview and a demo of the new functionality:

Did you know you can use the Backendless Code Generator, which is a part of Backendless Console, to easily generate a simple real-time chat application for iOS, Android and JavaScript? You get full source code and can see how to use Backendless APIs for sending text-based chat messages in real time. In this article I will describe how to modify the generated iOS application so you can send both pictures and text messages.

Continue reading
Posted in Examples, iOS, Messaging

Development of mobile applications generally requires two parts: the Backend and the Frontend.  Of course, you could limit it only to the client-side, but if there is some data which must be stored on the server, there is no way to get around having a backend. In this series of articles, you will create a native mobile client-server application – a basic ToDo app. Backendless will take care of the backend, it gives you everything you might expecting from the server-side (user management, data persistence and scalability to name a few). And for the client side you will use the Dropsource service.  In case if you are not familiar with this service, you can learn more about that from their website, but in short, it is an awesome service which lets you build native mobile apps without any coding. At the end of this series, your will have a native mobile application with the User Registration/Login screen, a screen with a listing of the ToDo items and a screen to create a new ToDo Item. Here’s a brief preview of the app along with real-time changes in the Backendless database:
todo demo codeless - Developing a mobile application without any coding using Backendless and Dropsource (Part1)

Let’s go!

Continue reading
Posted in Android, Codeless, iOS

With the introduction of the real-time database, Backendless is a great platform for developing games, especially multi-user ones. In this series of posts, I will be showing to you how to build a game for iOS with Swift using Backendless. For a quick overview of the game in action, please watch the video below:

Continue reading
Posted in Examples, iOS

Backendless SDK for iOS has received several improvements which increased the portability of our code. As a result, the same library you use for the iOS apps can also be used in tvOS and watchOS apps. All the functionality available in our SDK is available in these two environment, this includes real-time database and real-time messaging. The Backendless APIs are the same as for iOS when using them in tvOS and watchOS apps.  Below is a video with a demo of a tvOS app which shows the real-time database in action. The source code of the application demonstrated in the video is available at:

https://github.com/Backendless/AppleTvDemo

This is a very exciting improvement for the SDK as it opens up new opportunities for the developers who look to expand their reach to different types of Apple devices.

Posted in Examples, iOS, tvOS, Video

All available APIs for creating, updating and deleting objects in the Backendless database operate on single objects. It means when you need to store multiple objects in the database, each object requires a separate API call. This increases the number of API calls your app makes. While it is great for us (hey, our billing is based on the API calls), it is not that great for your app as it results in longer processing times and substandard user experience. Starting today, with the release of Backendless version 4.5.0 we’re introducing the new APIs which will allow you to create, update or delete multiple objects with a single API call.

Bulk Create

Saving multiple new objects in the database is now as simple as passing an array of objects to the server. The server responds with a collection of objectId values (which, for example, can be used in the createRelation  API). The bulk create API is supported in all SDKs as well as the REST interface.

Bulk Update

To update objects in the database, the API accepts a condition (where clause) which identifies a group of objects. In addition to the condition, the client must also provide an object containing the changes which should be applies to the selected objects.

Bulk Delete

Similar to “Bulk Update”, this API receives a condition which identifies a group of objects to be deleted.

All of the APIs can be extended using custom business logic’s before/after events.

You can find the documentation for these APIs in the developer guides:

Performing a calculation on a group of database objects may be a complex task. For example, to calculate the sum of all orders for a customer would require retrieving all customer’s orders, iterating over them to calculate the mathematical sum of all amounts. This was yesterday! As of Backendless 4.4.0, you can use aggregate functions to calculate the average, sum, maximum and minimum values for a collection of objects without retrieving them from the server. Additionally, the system supports calculating object count for all records in the database or a record subset.

To use an aggregate function, simply request a property in a data retrieval request in the following format (the example below is for calculating the sum for the orderAmount  column):

The returned object includes the sum  property with the calculated value:

The name of the property can be modified by assigning an alias (using %20  to replace the spaces in the URL):

The result contains a value for the property named after the alias:

Grouping Results

Results can be grouped by a column. The column could be either in the same table or a related one. For example, the following request retrieves the sum of all orders grouped by related country:

Unlike the response above, the result for this query includes a collection of objects, each containing the sum for a related country:

It is also possible to apply a filter on the grouped values. This can be done using the having  clause. For example, the request below retrieves only the groups of countries where the total order amount is greater than 10000:

For more information about aggregate functions see the Backendless API documentation:

Backendless supports two approaches for saving data objects in the database: class-based approach and map/dictionary approach. With the class approach, you declare a class, instances of which represent individual objects stored in the database. With the introduction of Swift 4, it is important to add a new attribute to your Swift 4 classes. For example:

Notice the @objcMembers  attribute declaration in the class. The attribute allows Backendless SDK (which is written in Objective-C) to access object’s property values. If you do not add the attribute, objects retrieved from the server will not have properties initialized with the values.

It is also possible to set a project-wide configuration property. When you do that, you do not need to add @objcMembers  attribute, however, you will see warnings when the project is built. To set the project property, open “Build Settings” for the project target, locate “Swift 3 @objc inference” and set it to “On”.

swift3 prop inference - Declaring data classes in Swift 4

For additional information on the @objcMembers attribute, see the “inheriting from Objective-C Classes” section in the Swift 4 programming guide.

 

 

Posted in iOS

google signin backendless - Google Sign in for your Backendless AppWe supported Google Sign in for a while, however, the feature was not properly documented. Not anymore )) The documentation has been updated for Android and iOS SDKs. Using the “Login with Google” function, an app can provide a way for the users to login using their Google credentials. Once a user is authenticated, Backendless creates an internal account and starts a logged-in session.

See Backendless documentation for details:

Android SDK

iOS SDK

The recording of the “Push Notifications” webinar which we conducted earlier this month is now available in our YouTube channel. You watch the webinar below or on the Webinars page on our website. In the webinar we reviewed the process of setting up an Android and an iOS apps as well as the backend to be able to register device and receive push notifications.

Find us in facebook