Module: A set of parts that can be assembled into a structure. To Xcode, that means you can have a group of lines of code that you can (re)use in different places without having to write that code again.
This is a relative new thing to the macOS/iOS, that came along with Swift. A module is a component, yes, but an important aspect is that it is a namespace, into which API (classes, methods, properties, etc) can be collected without name conflicts with API in other modules/namespaces. Traditionally, Obj-C-based development has used a single, "global" namespace. (That is why, in the old Obj-C days, classes were generally named with a unique two-letter prefix. That was to prevent clashes with class names in frameworks, and elsewhere. Until recently, every class name used in an app had to be globally unique.)
Bundle: A collection of files that make up a built app - in this case, the compiled binary and plists, images, and any databases - these file make up an app, which is an .ipa, which is just a .zip file.
Apps are only one kind of bundle, but there are others. Of these, the most important is a framework, which is also a collection of files, but with a somewhat different internal structure from an app.
Framework: A supporting structure, like a skeleton - Apple creates these files, which have code we use to create our apps. Not every app uses every framework. There are Private and Public frameworks. Devs can only use/add Public frameworks for their apps. Private frameworks are only used by Apple. Think of them as sets of instructions, known as libraries.
I would say that the key element of a framework (bundle) is a dynamic library (dylib). This is a prebuilt library, which can be "loaded" by an app at run-time, rather than "linked" into the app at build time.
Frameworks folder: This folder holds the libraries/frameworks that have been included in the project, that Xcode uses to build your app.
Target - Each project has one or more targets. Think of a target as the main thing Xcode is interested in when you decide to run and build your app.
- Each target defines a list of build settings for that project
- Each target also defines a list of classes, resources, custom scripts etc to include/use when building
- Targets are usually used for different distributions of the same project. You can have one project, with more than one target, where you can create different apps without having to have more than one project.
See Xcode Concepts: https://developer.apple.com/library/content/featuredarticles/XcodeConcepts/Concept-Targets.html
Product : The results, or output, from when you run and build your app.
Products folder: Inside the Products folder, you'll find the built version of your app, that Xcode translated from the source code into the object code for your device's processor to execute, or run.
网友评论