# swift-package

Published articles for swift-package.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Stream APIs, Swift Package Manager, Tutorial Trail Refresh, and the UWP Transition

DevFeed: [Stream APIs, Swift Package Manager, Tutorial Trail Refresh, and the UWP Transition](<https://devfeed.tech/articles/stream-apis-swift-package-manager-tutorial-trail-refresh-and-the-uwp-transition-19534.md>)

Original publisher: [Read original article](<https://www.codenameone.com/blog/stream-apis-spm-tutorial-trail-and-uwp/>)

Author: Shai Almog

Published: 2026-03-20T00:00:00Z

Content type: release

Language: en

Sources: [CodeName One](<https://devfeed.tech/sources/codename-one.md>)

Topics: [Java](<https://devfeed.tech/topics/java.md>), [iOS](<https://devfeed.tech/topics/ios.md>), [Universal Windows Platform](<https://devfeed.tech/topics/uwp.md>), [Maven](<https://devfeed.tech/topics/maven.md>), [Package manager](<https://devfeed.tech/topics/package-manager.md>)

Tags: [dependencies](<https://devfeed.tech/tags/dependencies.md>), [ios](<https://devfeed.tech/tags/ios.md>), [java](<https://devfeed.tech/tags/java.md>), [maven-plugin](<https://devfeed.tech/tags/maven-plugin.md>), [swift-package](<https://devfeed.tech/tags/swift-package.md>), [swift-package-manager](<https://devfeed.tech/tags/swift-package-manager.md>), [update](<https://devfeed.tech/tags/update.md>)

### AI overview

Codename One adds built-in support for Java Stream APIs and Swift Package Manager integration for iOS dependencies, refreshes its written tutorial trail, and removes the UWP target from the Maven plugin in version 7.0.229.

### Source excerpt

Codename One now includes built-in java.util.stream support, adds Swift Package Manager support for iOS dependencies, refreshes the written tutorial trail, and removes the UWP target from the Maven plugin in 7.0.229.

## Ship It Right: A Swift Package Quality Checklist. Part 1 of 3.

DevFeed: [Ship It Right: A Swift Package Quality Checklist. Part 1 of 3.](<https://devfeed.tech/articles/ship-it-right-a-swift-package-quality-checklist-part-1-of-3-24553.md>)

Original publisher: [Read original article](<https://medium.com/snapp-mobile/ship-it-right-a-swift-package-quality-checklist-part-1-of-3-34d58d16f581?source=rss----bcd96e620b02---4>)

Author: Oleksii Kolomiiets

Published: 2026-01-05T08:49:11Z

Content type: tutorial

Language: en

Sources: [Snapp Mobile - Medium](<https://devfeed.tech/sources/snapp-mobile-medium.md>)

Topics: [Swift](<https://devfeed.tech/topics/swift.md>), [Documentation](<https://devfeed.tech/topics/documentation.md>), [swift-package-manager](<https://devfeed.tech/topics/swift-package-manager.md>), [GitHub Actions](<https://devfeed.tech/topics/github-actions.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>), [Automation](<https://devfeed.tech/topics/automation.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [automation](<https://devfeed.tech/tags/automation.md>), [build](<https://devfeed.tech/tags/build.md>), [documentation](<https://devfeed.tech/tags/documentation.md>), [github-actions](<https://devfeed.tech/tags/github-actions.md>), [guides](<https://devfeed.tech/tags/guides.md>), [ios-development](<https://devfeed.tech/tags/ios-development.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [swift](<https://devfeed.tech/tags/swift.md>), [swift-package](<https://devfeed.tech/tags/swift-package.md>), [swift-package-manager](<https://devfeed.tech/tags/swift-package-manager.md>), [tests](<https://devfeed.tech/tags/tests.md>)

### AI overview

This tutorial presents a checklist for turning internal Swift Package Manager packages into polished public repositories. Part 1 focuses on documentation and README design, including installation instructions, usage examples, badges, links to full documentation, and licensing, while also introducing quality automation, community infrastructure, and discoverability.

### Source excerpt

I still remember the moment I decided to open-source my first Swift Package Manager plugin. The code worked perfectly in our internal projects at Snapp, but making it public-ready? That was a different story. I spent the next week adding DocC documentation, setting up GitHub Actions CI, writing example apps, and addressing edge cases I'd been ignoring because "it worked for us". Photo by Vooglam Eyewear on UnsplashThis series is for Swift developers turning internal packages into polished public repositories -- covering documentation, quality, and community setup. Here's the thing: most developers know how to write good code. But there's a massive gap between "code that works" and "a repository that welcomes users and contributors." That gap includes: Documentation that assumes zero context -- Your README.md makes sense to you, but will it help someone discovering your project at 2 AM? Quality automation -- Are you manually checking code style, or does your CI catch issues before they reach main? Community infrastructure -- When someone wants to contribute, is the path clear or confusing? Discoverability -- Great code that nobody knows about might as well not exist. I learned these lessons by studying successful repositories, discussing best practices with experienced coworkers, and developing my own sense of what makes a project polished versus what might fall short. Let's start with the most visible part of any repository -- the README. README: Keep It ConciseREADME is the door, not the whole house. Follow a simple rule: the README should answer three questions: What does this do? How do I install it? Where can I learn more? What Belongs in a README 1. Title and One-Line Description -- make it crystal clear what this is. # SwiftFormatLintPlugin A Swift Package Manager plugin that integrates swift-format linting and formatting into your build workflow. 2. Key Badges -- status, version, license, supported platforms etc. [![Tests](https://github.com/oleksiikolomiietssnapp/Me

## Meet SnappTheming

DevFeed: [Meet SnappTheming](<https://devfeed.tech/articles/meet-snapptheming-24551.md>)

Original publisher: [Read original article](<https://medium.com/snapp-mobile/meet-snapptheming-abd04baa7bee?source=rss----bcd96e620b02---4>)

Author: Volodymyr Voiko

Published: 2025-02-27T10:28:25Z

Content type: tutorial

Language: en

Sources: [Snapp Mobile - Medium](<https://devfeed.tech/sources/snapp-mobile-medium.md>)

Topics: [Swift](<https://devfeed.tech/topics/swift.md>), [Library](<https://devfeed.tech/topics/library.md>), [Xcode](<https://devfeed.tech/topics/xcode.md>), [JSON](<https://devfeed.tech/topics/json.md>), [ui](<https://devfeed.tech/topics/ui.md>)

Tags: [design](<https://devfeed.tech/tags/design.md>), [getting-started](<https://devfeed.tech/tags/getting-started.md>), [installation](<https://devfeed.tech/tags/installation.md>), [ios](<https://devfeed.tech/tags/ios.md>), [json](<https://devfeed.tech/tags/json.md>), [library](<https://devfeed.tech/tags/library.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [swift](<https://devfeed.tech/tags/swift.md>), [swift-package](<https://devfeed.tech/tags/swift-package.md>), [ui-components](<https://devfeed.tech/tags/ui-components.md>), [xcode](<https://devfeed.tech/tags/xcode.md>)

### AI overview

This tutorial introduces SnappTheming, an open-source Swift framework for dynamically applying app themes from JSON declarations. It explains how to add the package to an Xcode project and use theme elements such as colors, fonts, gradients, images, animations, metrics, and shapes in UI components.

### Source excerpt

Today, most applications interact with cloud-based content. In addition to content, app configurations such as feature flags, translations, and even UI elements (Server Driven UI) are often managed from the server. But what about theming? How can we hotswap or update app themes without requiring app updates? I have the answer! Recently, we at snappmobile.io announced our open-source library, SnappTheming. This Swift framework simplifies the integration of dynamic design themes into your applications. By utilizing JSON declarations, SnappTheming facilitates the extraction and application of various theming elements, including colors, fonts, gradients, and shape styles, directly into the application's user interface. In this article, we will explore how to get started with the SnappTheming library, including installation steps and basic usage. Getting Started In this section, we will create a sample app that utilizes the SnappTheming dependency. We will define a theme and use its declaration to retrieve styling elements and apply them to various UI components. This will demonstrate how easy it is to implement dynamic theming in your application. To get started, first create a new project in Xcode. Creating the Project Before we begin, ensure that you have Xcode installed (make sure it's a version compatible with Swift). Follow these steps to create a new Xcode project: Open Xcode and select "Create a new Xcode project." Choose the appropriate template for your app, such as "Single View App." Fill in the necessary details like project name and organization identifier, then click "Next" to create the project. Adding the Framework Dependency Next, we need to add the SnappTheming package dependency to our project. Follow these steps: Open your project's settings and navigate to the "Swift Packages" tab. Click the "+" button to add a new package. Enter the URL for the SnappTheming repository and select the version you want to use. Click "Add Package" to include it in your

## KMMBridge 1.1.0 Released - Kevin Galligan

DevFeed: [KMMBridge 1.1.0 Released - Kevin Galligan](<https://devfeed.tech/articles/kmmbridge-1-1-0-released-kevin-galligan-38240.md>)

Original publisher: [Read original article](<https://touchlab.co/kmmbridge-1.1>)

Published: 2024-12-05T00:00:00Z

Content type: release

Language: en

Sources: [Touchlab | Enterprise Mobile Innovation & Development](<https://devfeed.tech/sources/touchlab-enterprise-mobile-innovation-development.md>)

Topics: [Kotlin Multiplatform](<https://devfeed.tech/topics/kotlin-multiplatform.md>), [Refactoring](<https://devfeed.tech/topics/refactoring.md>), [gradle-plugin](<https://devfeed.tech/topics/gradle-plugin.md>), [Maintainability](<https://devfeed.tech/topics/maintainability.md>), [swift-package-manager](<https://devfeed.tech/topics/swift-package-manager.md>), [cocoapods](<https://devfeed.tech/topics/cocoapods.md>), [iOS](<https://devfeed.tech/topics/ios.md>), [.NET 11](<https://devfeed.tech/topics/net-11.md>)

Tags: [cocoapods](<https://devfeed.tech/tags/cocoapods.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [gradle-plugin](<https://devfeed.tech/tags/gradle-plugin.md>), [ios](<https://devfeed.tech/tags/ios.md>), [kmmbridge](<https://devfeed.tech/tags/kmmbridge.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [maintainability](<https://devfeed.tech/tags/maintainability.md>), [refactoring](<https://devfeed.tech/tags/refactoring.md>), [releases](<https://devfeed.tech/tags/releases.md>), [spm](<https://devfeed.tech/tags/spm.md>), [swift-package](<https://devfeed.tech/tags/swift-package.md>), [swift-package-manager](<https://devfeed.tech/tags/swift-package-manager.md>), [xcode](<https://devfeed.tech/tags/xcode.md>)

### AI overview

KMMBridge 1.1.0 is a significant internal refactoring of the Gradle plugin used to publish Kotlin Multiplatform Xcode Framework binaries through Swift Package Manager and CocoaPods. The release improves maintainability and adds Gradle configuration cache support where possible, while introducing separate modules for GitHub features and potentially requiring plugin ID changes for GitHub publishing.

### Source excerpt

KMMBridge is a Gradle plugin that publishes Kotlin Multiplatform Xcode Framework dependencies for Swift Package Manager and CocoaPods. The 1.1.0 release is a significant internal refactoring to support ongoing improvements and maintainability.

## How Apollo Manages Swift Packages in a Monorepo with Git Subtrees

DevFeed: [How Apollo Manages Swift Packages in a Monorepo with Git Subtrees](<https://devfeed.tech/articles/how-apollo-manages-swift-packages-in-a-monorepo-with-git-subtrees-23357.md>)

Original publisher: [Read original article](<https://www.apollographql.com/blog/how-apollo-manages-swift-packages-in-a-monorepo-with-git-subtrees>)

Author: Zach FettersMoore

Published: 2024-01-30T07:45:00Z

Content type: article

Language: en

Sources: [Apollo Blog](<https://devfeed.tech/sources/apollo-blog.md>)

Topics: [monorepo](<https://devfeed.tech/topics/monorepo.md>), [Swift](<https://devfeed.tech/topics/swift.md>), [swift-package-manager](<https://devfeed.tech/topics/swift-package-manager.md>), [Git](<https://devfeed.tech/topics/git.md>), [Submodules](<https://devfeed.tech/topics/submodules.md>), [Library](<https://devfeed.tech/topics/library.md>), [Package manager](<https://devfeed.tech/topics/package-manager.md>), [iOS](<https://devfeed.tech/topics/ios.md>), [Code](<https://devfeed.tech/topics/code.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [development](<https://devfeed.tech/tags/development.md>), [git](<https://devfeed.tech/tags/git.md>), [ios](<https://devfeed.tech/tags/ios.md>), [library](<https://devfeed.tech/tags/library.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [monorepo](<https://devfeed.tech/tags/monorepo.md>), [packages](<https://devfeed.tech/tags/packages.md>), [pull-requests](<https://devfeed.tech/tags/pull-requests.md>), [submodules](<https://devfeed.tech/tags/submodules.md>), [swift](<https://devfeed.tech/tags/swift.md>), [swift-package](<https://devfeed.tech/tags/swift-package.md>), [swift-package-manager](<https://devfeed.tech/tags/swift-package-manager.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

The article describes Apollo iOS's challenges with managing multiple Swift Package Manager library targets in a monorepo. It explains the goal of distributing smaller, independently versioned packages while preserving an efficient shared development and testing workflow, and discusses Git submodules as one approach and its operational drawbacks.

### Source excerpt

The monorepo is a common structure for many software projects, and Apollo iOS is no different. Our project was structured in a single repo containing many different Swift Package Manager (SPM) library targets, along with test code and code only used as part of development. This presents a few problems however, one being that when a user adds the SPM package as a dependency, it will pull down all of the code and files in the repo, even though most of them aren't needed.

## An Introduction to Swift Package Manager and how it works

DevFeed: [An Introduction to Swift Package Manager and how it works](<https://devfeed.tech/articles/an-introduction-to-swift-package-manager-and-how-it-works-24750.md>)

Original publisher: [Read original article](<https://medium.com/ymedialabs-innovation/an-introduction-to-swift-package-manager-and-how-it-works-cfe8e0d8cbd3?source=rss----8b5620c36355---4>)

Author: prateek arora

Published: 2023-04-11T05:00:35Z

Content type: tutorial

Language: en

Sources: [ymedialabs-innovation - Medium](<https://devfeed.tech/sources/ymedialabs-innovation-medium.md>)

Topics: [swift-package-manager](<https://devfeed.tech/topics/swift-package-manager.md>), [Package manager](<https://devfeed.tech/topics/package-manager.md>), [Package Management](<https://devfeed.tech/topics/package-management.md>), [Swift](<https://devfeed.tech/topics/swift.md>), [Xcode](<https://devfeed.tech/topics/xcode.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>), [iOS](<https://devfeed.tech/topics/ios.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [tvOS](<https://devfeed.tech/topics/tvos.md>)

Tags: [apple](<https://devfeed.tech/tags/apple.md>), [cocoapods](<https://devfeed.tech/tags/cocoapods.md>), [dependencies](<https://devfeed.tech/tags/dependencies.md>), [introduction](<https://devfeed.tech/tags/introduction.md>), [ios](<https://devfeed.tech/tags/ios.md>), [linux](<https://devfeed.tech/tags/linux.md>), [macos](<https://devfeed.tech/tags/macos.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [package-management](<https://devfeed.tech/tags/package-management.md>), [packages](<https://devfeed.tech/tags/packages.md>), [swift](<https://devfeed.tech/tags/swift.md>), [swift-package](<https://devfeed.tech/tags/swift-package.md>), [swift-package-manager](<https://devfeed.tech/tags/swift-package-manager.md>), [xcode](<https://devfeed.tech/tags/xcode.md>)

### AI overview

An introductory tutorial explains Swift Package Manager (SPM), its role in downloading, compiling, and linking Swift dependencies, and its integration with Swift. It compares SPM with third-party options such as CocoaPods and Carthage, outlines supported platforms and requirements, and describes advantages and limitations.

### Source excerpt

What is a package Manager? A package manager or package-management system is a collection of software tools that automates the process of installing, upgrading, configuring, and removing computer programs for a computer in a consistent manner. or A package manager deals with packages, distributions of software and data in archive files. Packages contain metadata, such as the software's name, description of its purpose, version number, vendor, checksum (preferably a cryptographic hash function), and a list of dependencies necessary for the software to run properly. What is Swift Package Manager (SPM) As per official Apple Swift Documentation: "The Swift Package Manager is a tool for managing the distribution of Swift code. It's integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies." The Package Manager is included in Swift 3.0 and above. Why do we need Swift Package Manager? Though we have multiple other ways to manage the dependencies like cocoa pods, Carthage etc. then why is there a need to use SPM? The answer is both cocoa pods and Carthage are third-party package managers, which eventually leads to extra code and efforts one has to put in order to utilise these third-party package managers. For example: For cocoa pods, we need to have a pod framework to be installed, which then needs ruby, gem file or brew in order to install pods. But then SPM comes inbuilt with XCode, so there won't be extra effort and extra files that will be getting added once we use SPM. System Requirement SwiftPM is compatible with macOS, iOS, tvOS and Linux For macOS, you need XCode 11 and above. For Linux, you have to install it manually or use swiftenv. Advantages SwiftPM is open-source like Cocoapods. It may be challenging or fast to contribute but it is possible. Ease of managing dependency's dependencies. If a dependency relies on another dependency, the Swift Package manager will handle it for you. Ease of resetting, manag

## Samples of Using KMMBridge - Michael Friend

DevFeed: [Samples of Using KMMBridge - Michael Friend](<https://devfeed.tech/articles/samples-of-using-kmmbridge-michael-friend-38312.md>)

Original publisher: [Read original article](<https://touchlab.co/samples-of-using-kmmbridge>)

Published: 2022-11-29T16:25:42Z

Content type: tutorial

Language: en

Sources: [Touchlab | Enterprise Mobile Innovation & Development](<https://devfeed.tech/sources/touchlab-enterprise-mobile-innovation-development.md>)

Topics: [Kotlin Multiplatform](<https://devfeed.tech/topics/kotlin-multiplatform.md>), [multiplatform](<https://devfeed.tech/topics/multiplatform.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [gradle-plugin](<https://devfeed.tech/topics/gradle-plugin.md>), [cocoapods](<https://devfeed.tech/topics/cocoapods.md>), [swift-package-manager](<https://devfeed.tech/topics/swift-package-manager.md>), [iOS](<https://devfeed.tech/topics/ios.md>), [Android](<https://devfeed.tech/topics/android.md>)

Tags: [cocoapods](<https://devfeed.tech/tags/cocoapods.md>), [code-sharing](<https://devfeed.tech/tags/code-sharing.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [kmm](<https://devfeed.tech/tags/kmm.md>), [kmmbridge](<https://devfeed.tech/tags/kmmbridge.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [spm](<https://devfeed.tech/tags/spm.md>), [swift-package](<https://devfeed.tech/tags/swift-package.md>)

### AI overview

This sample project demonstrates how to add Kotlin Multiplatform code to existing Android and iOS apps using KMMBridge. It describes a setup split across four repositories, with SDK distribution through CocoaPods and Swift Package Manager.

### Source excerpt

As you explore how KMM can help your mobile dev team, we've put together more KMMBridge sample to help you evaluate this best-in-class tool.

## Firebase SDK for Apple now fully supports Swift Package Manager

DevFeed: [Firebase SDK for Apple now fully supports Swift Package Manager](<https://devfeed.tech/articles/firebase-sdk-for-apple-now-fully-supports-swift-package-manager-16397.md>)

Original publisher: [Read original article](<https://firebase.blog/posts/2021/08/firebase-swift-package-manager>)

Author: Peter Friese; Paul Beusterien

Published: 2021-08-27T00:00:00Z

Content type: release

Language: en

Sources: [Firebase Blog](<https://devfeed.tech/sources/firebase-blog.md>)

Topics: [Firebase](<https://devfeed.tech/topics/firebase.md>), [SDK](<https://devfeed.tech/topics/sdk.md>), [iOS](<https://devfeed.tech/topics/ios.md>), [Swift](<https://devfeed.tech/topics/swift.md>), [Xcode](<https://devfeed.tech/topics/xcode.md>)

Tags: [apple](<https://devfeed.tech/tags/apple.md>), [firebase](<https://devfeed.tech/tags/firebase.md>), [ios](<https://devfeed.tech/tags/ios.md>), [news](<https://devfeed.tech/tags/news.md>), [sdk](<https://devfeed.tech/tags/sdk.md>), [swift](<https://devfeed.tech/tags/swift.md>), [swift-package](<https://devfeed.tech/tags/swift-package.md>), [swift-package-manager](<https://devfeed.tech/tags/swift-package-manager.md>), [tutorials](<https://devfeed.tech/tags/tutorials.md>), [updates](<https://devfeed.tech/tags/updates.md>), [xcode](<https://devfeed.tech/tags/xcode.md>)

### AI overview

Firebase 8.6.0 for iOS fully supports Swift Package Manager, allowing developers to add Firebase to iOS projects through Xcode. The article explains the setup process and describes the engineering work behind the integration.

### Source excerpt

News, tutorials, and updates from the Firebase team.

## Cross compiling for Apple Silicon with Swift Package Manager

DevFeed: [Cross compiling for Apple Silicon with Swift Package Manager](<https://devfeed.tech/articles/cross-compiling-for-apple-silicon-with-swift-package-manager-25400.md>)

Original publisher: [Read original article](<https://smileykeith.com/2020/12/24/swiftpm-cross-compile/>)

Author: Keith Smiley

Published: 2020-12-24T22:32:00Z

Content type: article

Language: en

Sources: [Keith Smiley](<https://devfeed.tech/sources/keith-smiley.md>)

Topics: [Swift](<https://devfeed.tech/topics/swift.md>), [Package manager](<https://devfeed.tech/topics/package-manager.md>), [macOS](<https://devfeed.tech/topics/macos.md>), [x86](<https://devfeed.tech/topics/x86.md>), [Xcode](<https://devfeed.tech/topics/xcode.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>), [Linux](<https://devfeed.tech/topics/linux.md>)

Tags: [apple](<https://devfeed.tech/tags/apple.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [architectures](<https://devfeed.tech/tags/architectures.md>), [binaries](<https://devfeed.tech/tags/binaries.md>), [build](<https://devfeed.tech/tags/build.md>), [command-line](<https://devfeed.tech/tags/command-line.md>), [linux](<https://devfeed.tech/tags/linux.md>), [macos](<https://devfeed.tech/tags/macos.md>), [performance](<https://devfeed.tech/tags/performance.md>), [swift](<https://devfeed.tech/tags/swift.md>), [swift-package](<https://devfeed.tech/tags/swift-package.md>), [swift-package-manager](<https://devfeed.tech/tags/swift-package-manager.md>), [x86](<https://devfeed.tech/tags/x86.md>), [x86-64](<https://devfeed.tech/tags/x86-64.md>), [xcode](<https://devfeed.tech/tags/xcode.md>)

### AI overview

This article explains how to cross-compile Swift Package Manager command-line binaries for Apple Silicon. It shows how to create a universal macOS binary containing both arm64 and x86_64 slices using the hidden --arch flag, and how to build separately for each architecture and combine the results with lipo, including an approach that also works on Linux.

### Source excerpt

If you distribute binaries for command line tools built with Swift Package Manager, you might have previously built your distribution binary with: % swift build --configuration release If you inspect the binary, you can see it was built for the current machine's architecture by default: % file .build/release/package .build/release/package: Mach-O 64-bit executable x86_64 Previously, this was sufficient since macOS only supported one architecture. Now, in order to fully utilize the native performance of Apple Silicon chips, we need to produce a fat binary that contains a slice for both x86_64 and arm64. Swift Package Manager has a few different ways to achieve this. The easiest way, as far as I can tell, is to pass the hidden --arch flag once for each architecture: % swift build --configuration release --arch arm64 --arch x86_64 This goes through a different code path in Swift Package Manager, and utilizes Xcode's underlying XCBuild tool. This results in the built binary being in a different path than usual. Inspecting the new artifact, we can see we have a binary containing both requested architectures: % file .build/apple/Products/Release/package .build/apple/Products/Release/package: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64:Mach-O 64-bit executable arm64] .build/apple/Products/Release/package (for architecture x86_64): Mach-O 64-bit executable x86_64 .build/apple/Products/Release/package (for architecture arm64): Mach-O 64-bit executable arm64 Another option is to build once for each architecture, and then combine the binaries using lipo. Unlike the --arch option, this approach also works on Linux. Here's an example: % swift build --configuration release --triple arm64-apple-macosx % swift build --configuration release --triple x86_64-apple-macosx % lipo -create -output package .build/arm64-apple-macosx/release/package .build/x86_64-apple-macosx/release/package Inspecting our final binary we can see it correctly

## TIP: Use iOS CocoaPods Dependencies in Native Code

DevFeed: [TIP: Use iOS CocoaPods Dependencies in Native Code](<https://devfeed.tech/articles/tip-use-ios-cocoapods-dependencies-in-native-code-19606.md>)

Original publisher: [Read original article](<https://www.codenameone.com/blog/tip-use-ios-cocoapods-dependencies-native-code/>)

Author: Shai Almog

Published: 2017-02-12T00:00:00Z

Content type: tutorial

Language: en

Sources: [CodeName One](<https://devfeed.tech/sources/codename-one.md>)

Topics: [iOS](<https://devfeed.tech/topics/ios.md>), [Library](<https://devfeed.tech/topics/library.md>), [Gradle](<https://devfeed.tech/topics/gradle.md>)

Tags: [cocoapods](<https://devfeed.tech/tags/cocoapods.md>), [dependencies](<https://devfeed.tech/tags/dependencies.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [ios](<https://devfeed.tech/tags/ios.md>), [library](<https://devfeed.tech/tags/library.md>), [native](<https://devfeed.tech/tags/native.md>), [swift](<https://devfeed.tech/tags/swift.md>), [swift-package](<https://devfeed.tech/tags/swift-package.md>), [swift-package-manager](<https://devfeed.tech/tags/swift-package-manager.md>)

### AI overview

A Codename One tutorial explains how to use iOS CocoaPods dependencies with native code. It covers adding native libraries, the iOS deployment-target caveat for Intercom, and the build hint needed to target iOS 8 or newer. An editor note says Swift Package Manager is also supported in the current setup.

### Source excerpt

Editor note: This post is still valid for CocoaPods, but current iOS dependency setup also supports Swift Package Manager (SPM). See the current "Working with iOS" section in the developer guide. Last week I talked about using gradle dependencies to build native code, this week I'll talk about the iOS equivalent: CocoaPods. We've discussed CocoaPods before but this bears repeating especially in the context of a specific cn1lib like intercom. CocoaPods allow us to add a native library dependency to iOS far more easily than Gradle. However, I did run into a caveat with target OS versioning. By default we target iOS 7.0 or newer which is supported by Intercom only for older versions of the library. Annoyingly CocoaPods seemed to work, to solve this we had to explicitly define the build hint ios.pods.platform=8.0 to force iOS 8 or newer.