官术网_书友最值得收藏!

iOS application programming languages

A majority of the apps developed for iOS are native apps; these are developed in Objective-C and, since 2015, Swift. Apple has mandated the use of Swift for developing apps. This would be easy for those who have some background in object-oriented programming languages.

Objective-C

Objective-C is a strict superset of and augmentation to C; it is an object-oriented language that adds Smalltalk-style (an object-oriented, dynamically typed, reflective programming language) messaging to the C programming language and was created by Brad Cox and Tom Love in the early 1980s. This means that the Objective-C compiler can also compile C programs. The following diagram provides the sample Objective-C runtime and its components:

In Objective-C, one does not call the object one sends a message to. This language is mainly used on the Mac OS X and iOS operating systems and their APIs. The apps are compiled to native code and linked against the iOS SDK and Cocoa Touch frameworks.

Note

You may need more information about Objective-C, which you can find at https://developer.apple.com/library/mac/documentation/cocoa/conceptual/ProgrammingWithObjectiveC/Introduction/Introduction.html.

The Objective-C runtime

In Objective-C, all classes are designed in such a way that they are aware of their own states and are also capable of altering their own implementation during runtime. All compiled files (.h and .m files) are linked with a library called libobjc.A.dylib.

Note

The source code of the dylib file can be found at http://www.opensource.apple.com/source/cctools/cctools-525/ld/dylibs.c?txt.

This dylib file provides in-memory runtime functionality to the Objective-C language. A majority of attacks during runtime depend on the libraries that are linked.

Swift

Swift is a new programming language created by Apple Inc. specifically for iOS, OS X, and watchOS and is potentially a replacement for Objective-C in the future. It was first released on June 2, 2014, with a stable release on September 15, 2015. Interestingly, this proprietary software will be transitioning to open source in the near future (https://developer.apple.com/swift/).

Note

Similar to Apple's Swift programming language, Google came up with Go and Dart in 2011. However, Dart was open source. It missed the mark and is less used nowadays. Swift is mandated by Apple to develop apps starting from iOS 8 and Yosemite. You may need more information about Swift development, which you can find at https://developer.apple.com/library/prerelease/mac/documentation/Swift/Conceptual/Swift_Programming_Language/index.html#//apple_ref/doc/uid/TP40014097-CH3-XID_0.

主站蜘蛛池模板: 怀远县| 顺平县| 澄城县| 长葛市| 大荔县| 兴仁县| 堆龙德庆县| 祁门县| 新宾| 苍山县| 德钦县| 河西区| 罗山县| 壤塘县| 太谷县| 江阴市| 上蔡县| 桐庐县| 浙江省| 健康| 松阳县| 浠水县| 阳原县| 化隆| 华安县| 峡江县| 乌鲁木齐县| 图木舒克市| 鸡西市| 花垣县| 仁怀市| 依安县| 新丰县| 康马县| 兴义市| 九寨沟县| 汪清县| 湖口县| 岳阳市| 阿图什市| 廊坊市|