In my iOS app I am using SPM to manage dependencies. One of them is a library that loads resources with Bundle.module (a new feature available in Swift 5.3). But now I need to use CocoaPods for my app. Hence, I should add CocoaPods support for this dependency. I know that I can copy Bundle.module's declaration from resource_bundle_accessor.swift to the library. But it should also support SPM. I want to know how can I check if I should use Bundle.module defined in resource_bundle_accessor.swift or my function that does the same thing if resource_bundle_accessor.swift was not generated.
How can I check if Bundle.module is defined?
1.2k views Asked by Roman Podymov At
1
There are 1 answers
Related Questions in IOS
- URLSession requesting JSON array from server not working
- Incorrect display of LinearGradientBrush in IOS
- Module not found when building flutter app for IOS
- How to share metadata of an audio url file to a WhatsApp conversation with friends
- Occasional crash at NSURLSessionDataTask dataTaskWithRequest:completionHandler:
- Expo Deep linking on iOS is not working (because of Google sign-in?)
- On iOS, the keyboard does not offer a 6-character SMS code
- Hi, there is an error happened when I build my flutter app, after I'm installing firebase packages occurs that error
- The copy/paste functionalities don't work only on iOS in the Flutter app
- Hide LiveActivityIntent Button from Shortcuts App
- While Running Github Actions Pipeline: No Signing Certificate "iOS Development" found: No "iOS Development" signing certificate matching team ID
- Actionable notification api call not working in background
- Accessibility : Full keyboard access with scroll view in swiftui
- There is a problem with the request entity - You are not allowed to create 'iOS' profile with App ID 'XXXX'
- I am getting "binding has not yet been initialized" error when trying to connect firebase with flutter
Related Questions in COCOAPODS
- Module not found when building flutter app for IOS
- My project code not running in Xcode(15.3) but the same code running in Xcode 14.2 in swift how to fix in xcode 15.3?
- I can not install CocoaPods and any package from "Add package dependency"
- JSON::ParserError on trying to run Flutter Project on iOS
- Google Maps Flutter plugin for IOS: Undefined symbol
- Embed Flutter inside a cocoapod and use it in the main project
- SwiftUI App only install framework(SwiftUI) not it's dependency(SDK.framework)
- iOS build failed using Expo EAS build. How can i fix issues with <PBXResourcesBuildPhase UUID=...> and pods not being defining modules?
- Module 'cloud_firestore' not found - Flutter Xcode Build
- Firebase SDK 10+ - unable to install packages
- Ld ADDRESS normal (in target 'PROJECT_NAME' from project 'PROJECT_NAME') (1 failure)
- Error updating Flutter project: CocoaPods could not find compatible versions for pod "webview_flutter_wkwebview"
- Error Domain=NSCocoaErrorDomain Code=3840 "JSON text did not start with array or object and option to allow fragments not set
- How to debug this Install Pods error on an EAS build for React Native Application
- Failed iOS Build with Expo on GitHub Actions: CocoaPod Error
Related Questions in SWIFT5
- How to do a Tuple extension in current Swift? It seems to be available experimentally
- No such module 'SwiftData'
- Is it perfectly correct that this computed property will work like a "pointer" in current Swift?
- Combining drawing animation with live video using Swift and Pencilkit
- Is it absolutely the case that Swift >will not< deep copy a large array, when one "guard let" the array?
- Is there a way to drop the comma and space elements when using Date.FormatStyle?
- NavigationStackView .searchable modifier not visible when embedded in NavigationSplitView
- Get height of a view inside ZStack in SwiftUI
- How to add axis titles with DGCharts in Swift?
- swift | Nothing in multiple TableView with custom cell
- Xcode 15: After deploy build to TestFlight, fonts have another style
- xcode datatask not running
- How can I change the source location of an OSLog Message?
- QLPreviewControllerRepresentation does not conform to protocol UIViewControllerRepresentable
- NSBatchInsert does not work for CoreData Transformable Attribute e.g. Dictionary<String, String>
Related Questions in NSBUNDLE
- How to get localized bundle display names of _other_ apps
- How do I handle duplicated symbols in a loadable NSBundle/plug-in?
- How to get localized name of NSBundle*
- Check existence of localized string in .strings resource file, fall back to default
- Image from bundle loads ok in SwiftUI but not in UIKit
- Cocoa get current running path of SIMBL Plugin
- No "kCFBundleVersionKey" sometimes: all possible scenarios?
- What is the difference between NSBundle bundleWithURL URLforResource and NSBundle mainBundle PathforResource
- How to find all available Strings-Tables in iOS project?
- NSBundle PathsForResources returning null after downloading On Demand Resource Bundle
- Thread 1: "Could not load NIB in bundle: 'NSBundle (loaded)' with name 'SleepThreeCollectionViewCell'"
- How can I check if Bundle.module is defined?
- Override internal symbol in different modules in Swift
- How can I check the values of NSLocalizedString in multiple locales?
- Objective C, Copy resource file from main bundle to documents: Error Domain=NSCocoaErrorDomain Code=4 The file doesn’t exist."
Related Questions in SWIFT-PACKAGE-MANAGER
- Package.resolved gets deleted on branch switching
- I can not install CocoaPods and any package from "Add package dependency"
- How to add a package from Swift Package Manager by build configuration? (workaround)
- What's the difference between ` Swift module` and ` Swift Package Manager module`?
- Fastlane run spm does not find Package.swift
- Including privacy manifest in package.swift with binary target
- XCFramework with SPM dependencies does not expose them to project it's used in
- Linker Command Failed with Exit Code 1 When Excluding arm64 Architecture on Simulator with Xcode 15
- How do I use Xcode to codesign a command line utility I created with SPM?
- Algolia InstantSearch Swift Package Manager throws Compile error
- Running Swift Package unit tests in release configuration: @testable module was not compiled for testing
- How to fix Xcode cloud build issues generated for third party libraries added through SPM?
- Xcode Cloud Errors Building Local SPMs that Work Locally "an out-of-date resolved file was detected"
- AudioKitEX not compiling
- Figure out .product line based on .package line for Package.swift dependencies?
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
One option it to use
#if SWIFT_PACKAGEto distinguish between SPM and CocoaPods specific code. Here's an example of how we set up a test to run with both package managers: https://github.com/firebase/firebase-ios-sdk/blob/master/FirebaseRemoteConfig/Tests/Unit/RCNRemoteConfigTest.m#L1144