Post

Replies

Boosts

Views

Activity

Reply to IBDesignables Swift Package Manager - Xcode 12
The problem in Xcode 12.4 still persists, I understand that the Swift.package, if it is not declared if it supports tvOS or another platform it assumes a default value, but having an iPhone emulator selected, it fails because it is not able to compile on tvOS doesn't make sense when the target doesn't support it. I'm testing with Xcode 12.5 beta to see if it works. This solution not work: https://developer.apple.com/forums/thread/652558?answerId=618201022#618201022 In the SupportedPlatform - https://developer.apple.com/documentation/swift_packages/supportedplatform documentation explain: By default, Xcode assigns a predefined minimum deployment version for each supported platforms unless you configure supported platforms using the platforms API. This predefined deployment version is the oldest deployment target version that the installed SDK supports for a given platform
Feb ’21
Reply to Detect if Bundle.module is available
In the Package.swift in target declare: let package = Package(   name: "Library",   defaultLocalization: "en",   platforms: [     .iOS(.v11)   ],   products: [     .library(       name: "Library",       targets: ["Library"]     ),   ],   dependencies: [],   targets: [     .target(       name: "Library",       dependencies: [],       path: "Sources",       swiftSettings: [         .define("SPM")       ]     ),   ] ) the important part is the definition of SPM, then we create the following extension #if !SPM extension Bundle {   static var module:Bundle { Bundle(identifier: "com.library.example")! } } #endif this way we always have Bundle.module available
Feb ’21