iOS and open source: A red apricot blossoms

iOS and open source: A red apricot blossoms

For most people, Apple and its iOS empire give people the impression of a walled garden. If you are not in it, you cannot appreciate the beauty inside. The same is true for developers. No matter what platform tools you use to develop iOS Apps, you must first compile and package them with Xcode on OS X and upload them to Apple's developer center. Only after passing the official review can they finally be seen by the world. Before that, no one even knows the hard work you have put in.

This walled garden is also the reason why open source supporters have complaints about Apple. However, this situation has changed now. Thanks to the spontaneous efforts of iOS developers, open source awareness and actions are gradually gaining popularity.

Apple's open source

Before discussing iOS open source, we need to understand Apple’s attitude towards open source software.

Contrary to what most people imagine, Apple is very supportive of open source software. It calls itself the first large personal computer company to use open source software as a key strategy. It is also an important participant in open source, and its contribution to open source ranks high among many technology companies.

Apple has a dedicated source code website: opensource.apple.com, and its own open source agreement APPLE PUBLIC SOURCE LICENSE (APSL), which is a relatively loose agreement that has been recognized by the Free Software Foundation FSF. Software marked as APSL on the source code website is basically contributed by Apple. Here is also a specific list of Apple's open source software.

Among them, Apple’s most famous open source projects are the following two:

Darwin: This is Apple's most important open source project, driving Apple's OS X system until the current Yosemite. It is a Unix-like hybrid operating system, whose kernel includes Mach, FreeBSD, etc. Apple has been open source since 2001 when it developed Mac OS X 10.0 based on it, and it has been open source until now.

WebKit: WebKit is a browser engine. It is a branch of KHTML and KJS under the KDE open source project, but its popularity has far exceeded the latter, especially in the mobile Internet field, where it almost dominates mobile browsers.

Other well-known open source projects of Apple include OpenCL, which is built for heterogeneous computing, Bonjour, a service discovery protocol implementation, and LLVM, of which it is the main sponsor.

Any of these open source projects can put domestic Internet companies to shame and become the treasure of any company that values ​​technology. This is enough to show that Apple is an active participant in open source.

So, if that's the case, why is it considered closed?

If we take a deeper look, we will find that Apple's attitude towards open source is to use it for its own benefit. Its open source purpose is to make its own products better. Apple strictly controls the open source projects that constitute the core of its products, so it may have disagreements with community contributors. For example, WebKit, one of the reasons why Google announced the launch of its branch in 2013 was that Apple's control was too strict and could not meet the needs of the search giant.

This attitude can also be seen in the open source software in the iOS system. Compared with the huge list of open source software in OS X, not only is the open source system version of iOS seriously lagging behind (only iOS 6.1.3 was released as of press time), but there are also very few software in it, and most of them have to be released due to the requirements of the open source agreement (such as some open source projects under the GPL and LGPL agreements).

However, although Apple is very cautious about open source on iOS, the iOS development ecosystem is willing to share. Why is this? First of all, it can be attributed to the rise of CocoaPods.

The rise of CocoaPods

CocoaPods is an application-level dependency manager for the Objective-C programming language, which helps developers manage third-party libraries used in their programs. Before CocoaPods, we needed to manually add, configure, and update third-party libraries, which was a tedious and headache-inducing problem because of the complex dependencies between third-party libraries.

Since the initiator of the project, Eloy Durán, released the first official version in September 2011, CocoaPods has quickly gained popularity among Objective-C developers. Its total downloads have exceeded 1 million times this month. Even the iOS third-party library released by Facebook supports CocoaPods, which shows its influence.

The purpose of CocoaPods is to increase the visibility and participation of third-party open source libraries and create a more centralized ecosystem. When users use it, they need to obtain the source code of the third-party library for compilation, so this is a playground that only open source participants can enter. CocoaPods itself is hosted on Github, and the main repository of the third-party library list it maintains is also hosted on Github. Its development community is very active, with more than 200 contributors. It was once ranked among the top ten most active open source projects on Github in 2013.

iOS open source closed loop

However, CocoaPods alone cannot solve the problem of finding third-party libraries, and this is where Github and some code libraries come in handy. Most third-party libraries that support CocoaPods are hosted on Github, which we can view through the Objective-C language category in Github Trends. Third-party code libraries such as CocoaControls or CocoaChina code libraries are more focused on OS X/iOS codes, and the classification is more detailed, so developers can find their favorite third-party libraries more smoothly.

iOS open source closed loop

In this way, CocoaPods - Github - third-party code library - developers, these four formed a closed loop of iOS open source, which became more and more powerful with the increase of participants.

There are currently more than 6,000 third-party libraries on CocoaPods. More and more iOS developers are open-sourcing their own codes and sharing them on CocoaPods. This fresh force has subtly changed the ecosystem of iOS development.

It is worth mentioning that many Chinese iOS developers have also participated in this open source movement, such as Kevin, Lex, Onevcat, gavinkwoe, qfish, xhzengAIB, etc., and many of their projects have achieved good results on Github. When the domestic open source community is still lamenting how the Chinese people's attitude towards open source is only to take but not to contribute, Chinese iOS developers have already participated in open source and reaped fruitful results.

The impact of the open source movement on iOS development

People who know something about iOS development will know that the difficulty of iOS application development lies in data storage, network, UI animation, etc. If there is no third-party library, it will be very difficult to write it yourself, and the time and cost of the entire iOS App development will also rise. With a third-party library, efficiency can be improved, allowing developers to focus on developing core logic and optimization, simplifying the iOS development process.

Kevin, the author of PNChart, an iOS chart library with more than 2,500 stars on Github, said that iOS open source projects are like building blocks, and using open source projects for iOS development is like playing with building blocks. Undoubtedly, this will greatly lower the threshold for iOS development. Although this may cause a mixed quality of iOS developers and ultimately affect the quality of iOS applications, with Apple's supervision, I believe the problem will not be too big. The benefits of lowering the threshold are greater than its negative impact. Some good application ideas can be realized more easily, and we will have more apps that will make people's eyes shine.

At present, many apps developed by well-known companies have used third-party iOS open source libraries, such as Facebook Paper, Instagram, LinkedIn, Skype, etc., which have made extensive use of third-party libraries, and many domestic Internet companies have also used them. These companies have the ability to develop their own third-party libraries, but still choose not to "reinvent the wheel", which shows that these iOS third-party libraries are necessary and have played their value.

Another phenomenon is that most of the open source projects on Github related to iOS UI interfaces and animations are equipped with dynamic images, forming a beautiful landscape on Github. These projects have already stepped half a foot into the design level. Unlike Apple's strict protection of design, the contributors of these projects are happy to share the wonderful effects they have created and discovered. Even designers and developers of other platforms can draw inspiration from them.

In this way, the spontaneous open source action of iOS developers has not only gradually changed the way iOS is developed, but also its influence will exceed the barriers set by Apple, becoming a successful example of open source, openness and freedom. Just like the red apricots inside the wall, unwilling to be lonely, bravely climbed up the wall and bloomed, lighting up the whole world from then on.

<<:  33 data points on Apple in 2014

>>:  Ronglian Cloud Communications: Communication cloud connects mobile medical care

Recommend

Xiaohongshu 618 Marketing Preparation Strategy

The situation varies from brand to brand, so the ...

30 guidelines for brand marketing in the post-epidemic stage

Recently, a large number of companies have resume...

Windows 10 is frustrated. Can Cortana take on the future of Microsoft?

[[135660]] In March, Microsoft reached a cooperat...

Introduction to Humanistic Psychotherapy

Introduction to Humanistic Psychotherapy A humani...

Shen Yifan shows you how to use mind mapping to develop your strongest brain

Yifan will help you master mind mapping and devel...

Video courses on e-commerce industry design

Introduction to video course resources in the fie...

How much does it cost to be a Heyuan agent for an automatic food ordering app?

For entrepreneurs, although mini program developm...

2014 TOP100 Open Source Software

I don't know when it started, but many people...

Understanding of the concept of seo, how to understand seo?

Understanding of the concept of seo, how to under...

Is Linux right for you?

Linux is not for everyone -- for many users, Wind...

How to improve the effective conversion rate when running advertisements?

In the process of search advertising , many corpo...

Boys should not choose to be coders casually

[[165935]] When I express this view, I may be opp...