The Effects of Severe Paper Usage in the Office on the Deforestation

Forests cover approximately the 30% of the land mass of our planet. While forests provide food, medicine, fuel for more than one billion people, people ruin this fundamental living space on a large scale and cause deforestation.  Unfortunately, long-term benefits of trees are sacrificed for short-term gain.

This year, one of the topics of World Economic Forum was the long-terms hardships of climate change alongside decreasing the economical and political threats.  Limiting climate change is on our hands just like we reversed the ozone depletion. Because there is one earth only and the risks awaiting us in the next 10 years can bee seen in the table below.

In terms of long-term risks, according to the report in which all the first 5 global risks of the next 10 years was about environment for the first time, extraordinary weather events, failures about decreasing climate change, large-scale natural disasters, loss of biological diversity, the downfall of ecosystem  and the damages people cause to the environment are seen as global risks that can cause serious effects.

Deforestation

With the general definition, it is making the forests or planted fields non-forested lands by ruining them. Turning forestlands into fields, farms or urban usage areas can be shown as an example.

The positive impact of forests and trees make the base of our existence. For this reason, they touch a lot of areas from fighting poverty and hunger to decreasing climate change and protecting biodiversity. We can sort out some of the impacts that touch our lives like this:

Impact on Contagious Diseases:

In 1997 , Indonesia’s rain forests were burned down to make roads; the fire intensified with drought. Trees didn’t produce fruits, fruit bats didn’t have a choice but to fly somewhere else to look for food, and brought along a deadly disease. A short time after the bats places on the trees of Malaysia gardens, the pigs around them started to get sick. They probably started getting sick after they ate the fruits that fell onto the ground after bats chewed them, just like the pig farmers… In 1999, 265 people had a serious brain infection and 105 people died. It was the first know break-out of the Nipah virus among people, and this caused recurring pandemics in Southeast Asia from then.

In the last 20 years, scientific researches show that deforestation creates parasites that cause deadly diseases like malaria and Lyme caused by contagious viruses like Nipah, Lassa viruses by triggering a complicated action sequence. A lot of viruses coexist with the animals in the forests without any harm, because animals have evolved with them. But when humans go into the forest habitat or change it, they can be unwanted owners of pathogens. Also, the rodents that carry viruses have been detected in deforested lands in Panama, Bolivia and Brazil.

Impact on Water;

The three out of four of world’s freshwater comes from forests basins and the quality of water is impacted by the loss of trees. Forests are our water fountains. They provide water for more then 1/3 of the world’s biggest cities.

Impact on Food;

Source of income and food safety of around 250 million of rural poor household depend on live forests and trees. Even around 50% of the fruit we eat come from trees; thus, non-wood forest products (NWFP) provide as food as well. Increasing food security without reducing forestland is one of the biggest hardships of modern-day.

Impact on Energy;

Around 2,4 billion people utilize wood for cooking, boiling water and heating. In general, forests provide approximately the 40% of global renewable energy as wood fuel. For that, it is necessary to focus on producing wood fuel more sustainably to reduce deforestation.

Impact on Air;

Forests that act as carbon sinks, are equal to approximately 2 billion tone carbon dioxide each year.

Impact on Our Children;

Children are usually more active when they are in a green field. For example, the rate of obesity in children in places where green fields are more reachable is around 11-19% lower compared to places where reaching green fields is limited or impossible.

When we analyze the World Economic Forum outputs in terms of the risks all these impacts will cause in short-time, extraordinary heat waves and degradation of natural life is among the negative impacts of which increase is expected in the upcoming period.

How Much Paper an Office Worker Consume in a Year?

Have you ever thought why leading companies of the world are trying to integrate the “paperless office” notion to their workflow within the scope of digital transformation? Here are some striking statistics:

  • An average office worker consumes 10 thousand papers a year. The same worker spends 30-40% of his/her time trying to find documents stored in his/her e-mail, file cabinet at the workplace or in drawers.
  • An average documents is physically copied 9 to 11 times a day.
  • 40% percent of the trees cut for industrial reasons are used for paper production only.
  • The cut trees make the 12-17% of the global greenhouse gas emission.

Is It Possible to Use Papers without Cutting Trees?

According to the statistical data, to make  100% non-recycled 10 batches of copying paper a bit more than half a tree is needed. A tree produces a bit more than 8333 paper sheets; for a roll paper of 500 sheets 6% of the tree is used.

While some people think that paper usage is a corporate culture, the others use it because of personal habits. But, wouldn’t it be cheaper to create and test digital versions of different business models? In fact, these days there is no aspect of an entity that cannot be modeled. You can choose the digital tools that are suitable for you and create your vision accordingly. We have compiled some of our solutions that will help you during your digitization process.

Let your e-mail signatures reach hundreds of people with Sign&GO.

As e-mail signatures take the place of business cards, the importance of messages they transmit increases. You can both announce your brand perception the best way possible and use the fastest and cheapest communication tool to increase your recognition with e-mail signatures that will reflect your corporate identity. Using less business cards equals to cutting less trees.

At the same time, it is not very easy to reach out to your customers fast and keep them up-to-date nowadays. Conveying your informative messages, current news to a lot of people will enable you to reach out to the right audience with your e-mail signatures. With your e-mail signatures, you can transmit messages that you can add like “During these hard times our country is going through, we are thinking about you, our partners, and share the most productive working methods on digital platforms with you” to hundreds of people.

 

Become Suitable for Collective Work with Velocity

Velocity is an intranet platform that digitizes and facilitates all the communication processes of companies. We know that the some of the essentials of a portal that creates your corporate culture are announcements, files, request forms (off-day, expenses, advance, training etc.). All these processes help you to solve your communication in a fast and integrated way with zero paper consumption.

You will spend less time sharing files and documents with your other branches. Enables you to show your corporate announcements on a single platform without needing any printed material like brochures of banners. It also helps you to publish documents in scope of Law of Protection of the Personal Data like employee clarification text and vehicle tracking system clarification text without using any paper.

 

Be Socially Responsible with Paper-free Projects

Maybe we should leave the old application methods aside and change to digital tools and create paper-free projects. During process we might be able to save our money, energy and a few forests… We should at least try it. Our world needs oxygen, water, food and our children.

We can start the change from our office where we spend most of our time  and our corporate culture with digital workplace applications. Because one day some topics we remain distant from might become an obligation. Just like the Covid-19 pandemic that caused us to lock ourselves in the house. We wish everyone a health feature.

Sources:

 

The safe way of remote working/ Hürriyet

We experienced that most of the remote education and work platforms we used in the past are insufficient. Because we didn’t need to use them this frequently and in detail. Right now, time and productivity are the most important criteria for us. In this situation, while moving the work methods to digitalization in order to keep up with the requests, the security remained in the background. A lot of companies use special work apps for that purpose to save time and energy, for friendly-use and security. One of them is Microsoft Teams…

With the attention and request of companies to the digital workplace increasing, the number of sectors that get to know or use Microsoft Teams now has increased as well. There are a ton of request from all sectors; manufacturing, education and logistics being in the lead. Companies with a high number of workers, branched and sales network, that have more than one office started to utilize the solutions Teams offers.

Features that Microsoft Teams Offers

Microsoft Teams offers a lot of solutions during the pandemic for those who get to know it just now and who want to experience it. Grants companies with a 6-month free trial. While using the Microsoft Teams for 6 months, you can plan meetings and save those meetings. You can make calls and conferences and reach out to a limitless number of users. We compiled a few features of Microsoft Teams that you can use:

What features are the most important ones for you while using MS Teams?

Activity

 

How to add a Git Android library project as a sub-module

In this article I will be answering the question of “How to add a Git Android library project as a sub-module?” but i don’t really know where to start. I think I’d better start with the time I asked myself “How do I add an android project to another android project?” Where and why such a need came to be?

Everything started last year a few weeks ago. When my recruitment process was going on in Peakup, I bombarded the Peakup Labs department manager Emrah Uslu with a ton of questions like “How many projects are we going to do? What kind of projects are you planning to do? Is there a Native Mobile developer in the team? (This question means “is there a legacy code” and you need to ask it) during the technical interview we had. He said “There are a lot of projects to be done, don’t worry” and added that we were going to do a lot of big and small projects rather than a project that would take years. The idea of “a library that can be used in common between different projects” that came into my mind in my previous job made sense once again. I don’t remember if I mentioned this to him. He especially requested my to create a common library from the first day I started working.

Did you say Java? Of course I know it, Mr Uslu.

For example, the Login and Language settings pages exist in all our projects and they are all the same. Or we will develop tons of methods, customized buttons, a wide arrange of views (CustomView), extension function, web service request architecture and DSL and these need to be in all the projects. As if that were not enough, they are all the same. Instead of going in the copy-paste loop and turning the project into thrash, isn’t it more simple and reasonable to add the common pages and features into a library and use them commonly from there?

I experienced a huge harm of copy-paste before. There for 8-10 projects created by being forked by each other. The smallest change of service meant to make this change in every single one of them one by one. Doesn’t matter what you say, this is not an example of good development. Don’t do it. Stay away from it. You can use the fork feature way more efficiently and do use it.

Open/Closed Principle, Software Reuse Don’t Repeat Yourself. Even when you think about it, you will see that all of the SOLID principles substantially support he library systems, and don’t find copying and pasting codes reasonable.

 Aaand Technically?

I think I’ve talked about what it is and why it is necessary enough. If you have a question like “Alright, got it, but how exactly?” roaming in your mind, please be my guest. When we mentioned libraries, the first thing that came to my mind is JAR files. But I realized that JAR files can only store the ones in Java SDK class. They don’t contain classes like Activity, Fragment, SharedPreferences, WifiManager like in the Android SDK. In the library structure I want, there must be structures like Activity, SharedPreferences. Another structure that comes to our mind in this situation is the AAR files. AAR files have some disadvantages. The biggest one of them is that you need to create an AAR file and add it to your projects every time you add a code. Keeping in mind that there is no legacy code in Peakup, and the library and main applications are created from scratch, together and parallelly; it really is a pain in the neck to deal with the AAR files. Yes, since they would take up a smaller place, AAR files would be my choice if they were created and prepared before in the library, but of course it is not like that.

When we take a look at the requirements:

  • A dynamical structure is in the lead.
  • It is prone to always changing. And it has a structure that wouldn’t cause me (the developer) a lot of work.
  • It had to correspond with the Open/Closed Principle strictly. Because we were going to do a lot of projects and i wasn’t supposed to mess up the existing projects when I added a code to the library in new projects. Any project download from the VSTS has to be in working condition right away.

So here came the Submodule into the play, which is a feature of Git.

The library had to have an Authenticator layer that would be used the same way in each project. You know, the login screen. Since this is the most important job of the library, we named it as PeakAuth. From that day on, I go like “PeakAuth come here, PeakAuth go” and it has kind of become my child. I loved it and until I switched to iOS I always developed it and added something all the time. The first Android App I created in Peakup was EnviSense. And it just got bigger and bigger in time with me saying” Heyy, I would use this extension function in other projects, let me add it to PeakAuth. Heyy, why would I write this date format in each project again and again, let me add it to PeakAuth right away” and adding common features and code snippets. You remember how I compared it to a child? It actually was a child.

Alright dude, got it, just give us the code already for God’s sake.

Note: Since Android Git Submodule is a feature of Git, the library and our main project have to contain git.

 

How to add a Git Android library project as a sub-module

Before adding the library to our main project, the PeakAuth needs to be a library first. There are 3 steps to achieve this and they are very simple.

    1. A library project in Android cannot have a launcher activity. No activity in the AndroidManifest file can have the Launcher label.
    2. A library project in Android has the com.android.library label in the app level build on top, not the com.android.application label.
    3. In the same file of the 2nd item, the applicationId that if normally under default config doesn’t exist in libraries, it needs to be deleted.

That’s it! Now PeakAuth is a library that can be commonly used with the other projects.

So, How Do We Add a Library to Another Android Project?

Now it is time to add the library project we have created to Android projects. If you want, you can write this to the README file in Git so that it is easier for your friends. And also this type of important points shouldn’t be dependent on one developer in the company only. In addition, not just the creater bu the other developers should be able understand easily, add and use when it’s needed. Just like I mentioned a few times, it is clearly explained in the README file how to add the common Android library named PeakAuth that we use in Peakup. I need to mark a very important point in the beginning. You shouldn’t sync till the last step I have written below. The sync will be done after all the connections and settings are made.

    1. Run the project you want to add the library to from the terminal with the cd command. Enter the code shown below and add the link of the library. git submodule add https:… Or in a simpler way, you can add it on SourceTree as well. If you are going to add Git Submodule to your project and especially if it has a dynamic purpose like mine, I definitely recommend you to use SourceTree. The management of a submodule in the project will be way simpler. When you open the project on SourceTree, right-click on the Submodule options as you see in the screenshot below and click on Add Submodule.
    2. Enter the necessary info and link of the submodule into the opened window. If there are multiple branches, you can choose the branch you want to connect to with the Advanced Options. Then, you ofcourse need to click on OK. The name you give to the file you want to add is very important here. We, as Peakup Labs mobile developers, naturally call the file in which the PeakAuth library will exist “peakauth”.

      After this step the .gitmodule file will be added to your main project automatically.
    3. Open the settings.gradle file of the project and add these lines
      :include ':peakauth'
      project(':peakauth').projectDir = new File('peakauth/app')
      
      

    4. Add this line as dependency to the application level gradle file of the project
      implementation project(":peakauth")
    5. Sync. Like I said above, you shouldn’t sync until this step.

If you have mistakenly synced in another step, you need to Reset/Discard all the changes on Git, delete all the added files and restart the whole process. Basically go back to the last commit. I did it a few times and couldn’t find a better way than restarting. I also recommend you to commit before starting to add libraries. So that no other changes happen and you don’t lose codes when you reset completely.

 

If your project looks nested like in the screen shot, it means that the Android Submodule library is ready for use. As you can see, you can navigate in it as you wish. Which is a feature that the AAR libraries don’t have. The icon in the beginning is important too. And in the screenshot below you can see how your project should look on SourceTree.

 

You can see how it will look when you commit/push PeakAuth i.e. your submodule library, click on the Submodule below your main project on SourceTree in the screenshot below.

 

Life Saving Note: Update the submodule only in its own repository. If you update the PeakAuth in the EnviSense, it will reflect on the main PeakAuth and it might mess up all the projects that use the library. If you don’t the submodule carefully, you might cause some chaos. As sweet as it is, the management of it will get harder as the project develops.

If you want more information about the Submodule usage in Android, the 2 resources below helped me a lot. I am attaching them here as well.

https://medium.com/@deepakpk/how-to-add-a-git-android-library-project-as-a-sub-module-c713a653ab1f
https://proandroiddev.com/creating-a-library-for-android-ea976983db1

Click here for the other android related articles on our blog.

Wish you a day fool of kindness, love and reading.

Corporate intranet helps remote working

It is very important to protect your mental health

We need to remember that crises, hard times and traumas are a part of life to protect our mental health from the psychological and behavioral negativity corona virus caused. Being home all the time during this process, our movements and free areas being restricted and limited social life can affect our motivation. Less communication and more social-physical distance thus our touching, hugging needs not being satisfied can make us more depressed and furious.

Feel like a part of the team

During this process, people miss their colleagues with who they worked together and spent most of their times. Being included in a group, maintaining our objectives and daily routines will help us overcome these days easily. According to the psychologist Gregory Walton, feeling like a part of the team helps us overcome obstacles and increases our motivation. Executing our daily routing with being a part of the team will increase the team spirit and our motivation even if we are physically apart. On the base of teamwork, qualitative unity is essential, not quantitative unity. Our strong work relations, unities, sense of belonging give meaning to our lives and help us easily overcome this process we are going through.

Strengthen your Communication!

We are in need of technological platforms that will strengthen our communication with our work and colleagues, helps us maintain our daily routine and increase our productivity. It will be possible to strengthen the feeling of belonging, reach our goals and increase our productivity with the corporate intranet application. It is possible to share posts with our workers without disrupting our routine, share announcements and development-oriented trainings instantly, celebrate special days and many other activities with the corporate intranet portal. Corporate intranet helps to share and increase motivation of workers even if they are apart.

Being a part of the team makes a person stronger during hard time. Coming together with our colleagues that share the same feeling, thoughts and goals with us without disrupting our daily routine will help us overcome these hard days easier. Like Henry Ford once said: “Coming together is a beginning. Keeping together is progress. Working together is success.”

Meet our intranet portal Velocity that brings your communication process together on a center, that increases your motivation and communication!

Velocity is Among the Top 8 Applications in the World

Velocity was chosen among the top 8 applications that can be integrated to Microsoft Teams in global with the evaluation done of all the applications. You can communicate and track your work easier with Velocity that you can access on Microsoft Teams. You communicate without any gaps not only in your work process but also with your teammates and managers through your social posts.

We kindly thank everyone who believed and supported Velocity!

COVID-19 COULDN’T GEAR PEAKUP DOWN / Enterprise Next

100% national capital PEAKUP has been in the Deloitte Technology Fast 50 list for the 3rd time with its successful performance and keeps growing with its England office.

PEAKUP CEO Ahmet Toprakçı has stated that they are moving towards their goals of being a global technology company fast and said: “In this journey we barked on to provide quality and value added services, we keep working to create a global brand. As we enter our 8th year, we started to keep our work with the title of PEAKUP Technology inc. as of July in accordance with our strategy of popularizing our products abroad.  Within this period , we believe that our country will develop with technology export and keep working to make PEAKUP a global technology company with our competent, young and high-motivated staff. And as the first step of this, we established a company that is 100% owned by us.”

The US Market is next

PEAKUP has grown with domestic funding only without any foreign investments, and now has its eyes on the US market after the London office they’ve opened in July. PEAKUP has entered the European countries, UK being the first, with Sign&Go that it developed as new generation marketing technology. One of the abroad goals of PEAKUP is after the COVID-19 period being done, to enter the US market.

You can watch the details of the interview we did with PEAKUP CEO Ahmet Toprakçı here.

 

Microsoft Office 365 New Updates and Improvements

Microsoft Teams Update: Group chat up to 250 participants

As you know the maximum participant number was 100 on chat groups. Microsoft increases this number to 250 with the request from customers.

Tasks: Outlook Tasks, Planner and To do

The Planner app in Microsoft Teams is changing as the Tasks app! Tasks will enable you to manage personal tasks and tasks assigned to you in a team through one place by consolidating the Microsoft To-do, Planner and Outlook tasks and channels. It will unite the messy tasks all together and group them by importance and due date, and even present them in Teams as lists, pinboards and charts. We think that Teams accepting all application within itself is very exciting!

Teams Meetings Video Display is Now 3×3

Teams displaying maximum 4 participants on screen during the meeting was highly criticized compared to their rivals in teleconference. Microsoft has announced that for now this number is 9, and that they are trying to increase this number to display more participants at the same time.

Raise Hand in Teams Meetings!

The new Raise Hand feature in Microsoft Teams enables the participants to indicate that they want to speak by changing the hand icon on the control bar, this way facilitates participating to meeting more efficiently. Participant themselves  or the presenter can lower their hands. With this feature, we will indicate that we have a question without interrupting the person who is doing a presentation. Just like in a class. 😊

No More People Timelines in Stream

If the people detection feature is active on Microsoft Stream, it detects people’s faces automatically to improve the Microsoft Stream play experience. If the video owner has turned on people timeline for a video, this feature would be displayed for the video.

This feature will be removed because of low usage. It will be removed permanently by July 15.

You Can Add Videos to Your Forms

When you choose the checkbox below, you can add videos with YouTube URLs or images from Bing to you forms. This way, you can make your polls more lively and effective!

SharePoint Lists, or Formulas with Condition in Libraries:

Users can show or hide columns in library form or in a SharePoint list depending on the value on another column. You can choose between formulas and columns. For example, you can hide a column depending on the values on another column.

PowerPoint Live Presentations

The upcoming “Live Presentations for PowerPoint for web” feature will enable the people who give a presentation to see their slides and words, and even live translations on their device as transcript!

Microsoft Bookings is coming as an Office 365 Application!

Microsoft Bookings is a self-service meeting organization tool that enables you to organize corporate and non-corporate meetings. Microsoft Bookings app can be used as add-on for Office 365 Corporate E3 and Office 365 Corporate E5 users. Microsoft is turning Booking into an Office 365 app from an add-on in the last update. It is possible to activate or turn off Booking as an organization. User-based restrictions will be available in time.

Meeting Experience Improvements

  • Instant Channel Meetings Experience is Changing:

Users will see the “Meet Now” button next to the channel name, on top-right. This way this feature that gets to be ignored as an icon below will be understood more clearly.

  • Participating to the Meeting is Being Improved:

More clear options will be offered to the users while they are joining a Microsoft Teams meeting through a link concerning how/where they want to join the meeting.

Things to pay attention to while working from home / Hürriyet

In Turkey most workers are following their work from home because of the pandemic, just like in the whole world. This obliged employers to switch to remote working on digital platforms and to adapt. So, what should we be careful about while working from home?

We had to quickly adapt to working from home with the corona virus pandemic. Companies who didn’t want to put people’s lives into danger but still had to keep doing their work started to sustain their work with different platforms. And this reminded us the “Digital Workplace” notion that we started to hear a lot. The way companies did their work changed with the sudden change to remote working. One of the most important topics during this process was making the communication between employees continuous and constant and to keep their motivation alive.  PEAKUP told about how right and efficient work will be on online systems with the Velocity and Microsoft Teams experiences and included recommendations about sharing files, video call, chat rooms and teleconference in their guide.

What features are we looking for the most while working from home?

PEAKUP COO Kadircan Toprakçı stated that first the most waited features on digital platforms should be detected and sorted those out like this: “An activity field where notifications are received and filtered, a chat room where files and images can be shared, accessing archived files easily, co-authoring on files with teammates at the same time, video call, sharing announcements and organizing meetings. What is need to do all these correctly is a good internet connection and a secure computer, tablet or phone. Tips and tricks start from right here.

Computer: If your personal computer is not protected well with a good system we recommend you to use your company computer. Using Wi-Fi or 4G/5G connections on a weakly protected computer might let you down. If you believe that your office computer is not safe enough either, it is better to contact the IT department right away. If not, all your company information might be accessed and your archived files might get damaged. The password security of company accounts you connect on your office computers is very important for your data. You need the keep you password security as high as possible, update as much as possible and avoid simple passwords.

Internet connection: The most unpleasant part of digital workplace is internet going down or slowing down in the middle of an important meeting. Increasing the upload quota of internet packages of people who need to share files a lot or video call might be a solution. Apart from that, it is possible to activate the “Personal Hotspot” feature of 4.5G internet access via mobile phones in case of a problem with WiFi networks. The safest way to access resources containing accounting, human resources and similar company data would be choosing the Virtual Desktop applications provided by the IT departments. You have to use VPN for the whole team to connect to the corporate network securely and for the network traffic to go through one tunnel.

Operating Systems: Always prefer to use the latest versions of operating systems and applications. The latest operating system will provide protection against cyber threats with new updates as well as being efficient with new features.

Archiving: You might need to access a file on your work computer or you might have deleted a necessary file while working from home. Your files need to be transportable anytime and anywhere while working remotely. You can securely store all your files with cloud storing solutions like OneDrive and take important actions like going back to previous versions or recovering a deleted item.

Common workplace: You could work with your colleagues while working at the office. But now while remote working, you cannot physically  be together if you need to get something done together. Applications like MS Teams help you out during this process. You can move all your office environment to a common workplace, co-author on documents and files with your colleagues, track a lot of actions that were in your daily routines like video call, chat, office documents through one single platform.

Security for the little ones: This one is especially for the workers with kids. To prevent your curios child deleting the files you are working on when you are on a break, you need to put a screen lock and a password. You can use the free Dynamic Lock feature that comes with Windows 10 at this point. Dynamic Lock you have synchronized with your phone will lock your computer the moment you get away from it.

Meetings: Meetings, activities and trainings have started to be cancelled with switching to online working. But meetings or trainings necessary for you workflow getting sidetracked might cause problems for your work. You can sustain your work program without any ado with video meetings and live activities on MS Teams. For example, you can join the meeting from your phone, tablet or computer, chat during the meeting and share a file or your screen.

Socializing with colleagues: This one is both for the workers and the employers. During this process where we are home all time and cannot socialize, it is important to increase the motivation of your workers with platforms that keep the intranet strong like MS Teams or Velocity, not just to keep doing your job. You can create groups where you can recommend movies and make video calls, and have some coffee together. You can make your communication sustainable and fun on digital platforms.

We achieved being the first by getting the “Change Management Advanced Specialization””

We are the first corporation to get the Adoption & Change Management Advanced Specialization in the Middle East and Africa region (MEA) and the 4th worldwide with Change Management Services we give on services like Microsoft Teams, Azure, Office 365 in order to enable right integration of new generation work places and technology to workflow.

We added another one to our achievements, and with our knowledge and experience proved that we are the best in this matter by ranking first in MEA.

We help more than 700.000 end users migrate to cloud technologies and keep achieving even more every day while providing help for our partners to change to new processes with our expert staff in America, Europe, Middle East and Africa with our solutions.

We are proud to be the first one in MEA to have this specialization status that Microsoft gives to limited number of partners worldwide, and kindly thank everyone who supported and believed us during this period.

Auto-Incrementing Build Numbers in Xcode

There are a lot of non-code related hardships we come across while developing a software. One of them is the test. On which server will the Beta distribution be? How will be the CI-CD processes? Where will the code be stored? How will the technical information be distributed in the team? What is versioning? What is Build Number? Is it just the number that Apple Store  wants us to increment and that goes to 2.0 from 1.0 as the app is published? And many more questions come up in our minds.

One of the problems we come across while developing a software is versioning. We come across it frequently in our daily lives. Numbers like v1.4.3 or x.y.x must have caught our eyes in the menu of the software products, profile page, settings page, on the left or right… But, how and relative to what is done this so called versioning? What it is done relative to and how it is done depends on the position of the company in the industry, what it does and whatever the developer wants. There is not a fixed versioning technique in the world, that being said, the techniques used are very similar to each other. And the most commonly used one is semantic versioning. And we, as Peakup Labs mobile developers, use this type of versioning. You can learn the details of semantic versioning here.

What is a Build Number?

I will just go over the basic details. While developing a software product we usually don’t put forward the whole product at a time. We start, get something done and then send it to the user/tester/manager. The receiver checks it and gives feedback like “can we add this, can we change this, there is an error here” etc. We do it and resend it.

But how the person who we send it to will distinguish these 2 products? Well, here comes the build number into the play. If the second product’s number is 1.1, while the first product’s number is 1.0, it can easily be recognized that the second product came out later. For example , when someone is using the first product instead of the second product and talk about a bug we fixed in 1.1, we can tell them to download the 1.1 version and that we have fixed that bug there.

Both build numbers and version numbers are numbers used to identify a product.

These numbers for sure don’t just help to distinguish versions. Also, the builds that have the same version number are not published since AppleStore and Google Play Store don’t see them as an update. Build number and version number should be incremented in a certain way. Version number can be incremented manually. Because the system can’t know or determine the size of our update, who knows it is the developer himself/herself so it is more convenient for the developer to increment it manually. But you don’t need to increment the Build number manually all the time. As befits the name, it is a Build number. It is incremented in every Build. I think manually incrementing it is against the spirit of being a developer. It is contradictory to manually increment the build number all the time while trying to automatize the system and the app we are developing. 🙂

IOS Versioning System

And now let’s get down to the business. In this article I will talk about how we can automatize the build number or set it to git commit. iOS applications have 2 different types of version numbers like we mentioned above.

  • Short bundle version string CFBundleShortVersionString (e.g. 1.12)
  • Build Number CFBundleVersion (e.g. 190)

Each “Short version” contains more than one build. And each build corresponds to “Bundle Version.” Which means that while the build number is incremented in every build, the version number is incremented after a few builds. As you can see on the screenshot below, the version with the 1.4 version number contains two different builds of numbers of 34 and 35.

Now that we have talked about version and build number way too much, let’s talk about how to auto-increment the Build number without further ado. We can achieve this by using a very simple Shell script.

buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${PROJECT_DIR}/${INFOPLIST_FILE}")buildNumber=$(($buildNumber + 1))/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${PROJECT_DIR}/${INFOPLIST_FILE}"

The script above takes the build number in the plist file, increments it 1 and rewrites it to the plist file by using the PlistBuddy feature of XCode.

  • ${PROJECT_DIR} :  Full path of the main project
  • ${INFOPLIST_FILE}:  Full path of the info.plist file

Auto-Incrementing the Build Number in XCode

It’s all well but how do we do this in XCode? First of all, this article is written with the XCode 11.4 version. If in new versions of XCode something changes, the article will be updated. If it not updated, it is enough for you to reach out to us and it will be updated immediately. As long as you follow our instructions step by step, you can auto-increment the Build number.

    1. Choose the Application Target field, and then the Build Phases tab.
    2. Click the + button above to add a new Script.
    3. Choose New Run Script Phase in the new tab
    4. When the new Script screen is open, write the script piece we see in the screenshot below. By the way, you can change the name of the script. Naming… Boy, do I love it!
    5. When you build the project your Build number will automatically increment.

As well as this method of incrementing the Build number is, I just can’t get myself to like it. 🙄

I hear you guys saying “For God’s sake dude, did you just write this for nothing, and did I read this for nothing so far, how would you like us to increment the build number your majesty?” This method is not the best practice when it comes to incrementing the Build number. So, what is the best practice concerning this?

It is, of course, to connect the Build number to the Git commit number.

How Can I Connect the Build Number to the Git Commit Number

If you connect the build number to the git commit number, the build not will go high to the sky. And it is guaranteed to always be more than the previous version just like Apple Store and our colleagues want. Incrementing this number in every build can cause this number to be too high in time. Well, does it harm anything when it is too high? Nope. I connect it to the git commit number just because I want to 🙂

https://gist.github.com/alparslandev/51ad5bc0192ad4d52ffcac02d5e3b541

I wrote the necessary script in the gist I shared above. As you can see it is possible to increment the Build number depending on the commit number. You can write the script in gist to the space I showed on the 4th step like I said above.

Click here for our other articles about iOS Developemnt
Click here for our articles on Android and Kotlin.

Alex is a good software developer. He likes to improve himself and learn new things. He is not one of those who learn the build number when the app is to be published on Apple Store. He had already learned the value of versioning and build number a long time ago. Alex is not one of those who say “oh dear the build number stayed as 1.0, let me make it 2.0” when he can’t send an update to Apple Store. Alex automatizes the build number and pays good attention to the versioning number.

Version notes are very important for Alex. He always writes comprehensible and well-liked version notes. Even if he is writing a very small application, he builds the versioning system well and increments it. A good beginning makes a good ending in the end, right? Alex knows that if he says “Ah, never mind!” even once, it bodes no good.

Be like Alex. Work hard.

Resources

https://developer.apple.com/library/archive/technotes/tn2420/_index.htmlhttps://crunchybagel.com/auto-incrementing-build-numbers-in-xcode/https://www.mokacoding.com/blog/automatic-xcode-versioning-with-git/https://fuller.li/posts/versioning-with-xcode-and-git/