Xcode Swift Import Code Within "an App Target" vs. "a Framework Target" -- What is difference?

Doug Null

I'm importing two .swift files into an existing ObjC app.

The Apple document "Importing Swift into Objective-C" lists these two choices but I don't understand their difference.

I don't know the difference between "App Target" and "Framework Target".

I created an Xcode app project and not a framework project. Is that the difference?

Duncan C

A framework target means that your project compiles your code into a library which can then be consumed by other programs. CocoaPods are examples of frameworks.

A project can contain multiple targets. It's possible to have your project define a framework and provide the source files for that framework, and also build an application as a separate target (normally you'd do this when your application consumes the framework(s) that it builds)

Unless you are building your own frameworks, you should pick "App Target".

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Is it possible to build Swift code using the Foundation Framework and target linux?

What is difference between NSDictionary vs Dictionary in Swift?

VS Code: What is the difference between push and publish

Typescript full-qualify namespace vs import what is the difference

How do I call Swift code from Objective-C in a Framework target?

What is the difference between import a large csv file into SAS by code and by mouse?

Using VS Code, how can I add a durable function to a function app with target framework 5.0

import Swift vs import Foundation

What's the difference between import from 'events' vs. import {EventEmitter} from 'events'?

what is the difference about import import {} import * as in typescript

What is the difference between jedi and python language server in VS code IDE?

What is the difference between [pwsh] and [Powershell Integrated Console] on VS Code?

VS Code: What is the difference in settings between User and Workspace

what is the difference between [=] vs [this]?

Import Framework in Swift Project, Xcode

What is the difference between using ref vs ref.current within useEffect?

What is the difference between import crypto from 'crypto' vs just using crypto in Node?

OSGI Import-Package: version vs bundle-version - what's the difference?

How to access all Swift standard lib source code or module definitions from within Xcode?

What is the difference between these import statements?

What is difference between "?" and "!" in Swift?

What is Swift Compiler - Search Paths Import Paths in Xcode 6 Building Settings?

What is the difference between a Python terminal vs. a bash terminal in VS Code?

What is the difference in the Code Snippets?

What's difference of this code

VS CODE: Unable to import - pylint(import:error)

Java import vs code performance

VS Code Python auto Import

python, import module in vs code