Post

Replies

Boosts

Views

Activity

Reply to What is Bundle.module?
Nice! With this in mind though I still need the same functionality for devs integrating my framework using e.g. Carthage and there I still use Bundle(for: Self.self). My Question now is how to detect if I am integrated using SPM or not, i.e. if I have to use Bundle.module or the old cousin above?
Aug ’20
Reply to Loading resources from SPM Package
To build an iOS package from command line you can use this command uses the iOS 14 SDK: swift build -Xswiftc "-sdk" -Xswiftc "&#92;&#96;xcrun --sdk iphonesimulator --show-sdk-path&#92;&#96;" -Xswiftc "-target" -Xswiftc "x86_64-apple-ios14.0-simulator" Okay I also found a solution, so Swift actually generates the Bundle.module file 🎉 The documentation - https://developer.apple.com/documentation/swift_packages/resource explicitly states that you have to put your Resources under the folder <project_root>/Sources/<MyTarget>/ since SPM scopes resources by target. The target definition looks then like this for my repo SHSearchBar - https://github.com/Blackjacx/SHSearchBar/blob/swift53/Package.swift (compare file structure on Github): // swift-tools-version:5.3 import PackageDescription &#9;&#9;targets: [ &#9;&#9;&#9;&#9;.target( &#9;&#9;&#9;&#9;&#9;&#9;name: "SHSearchBar", &#9;&#9;&#9;&#9;&#9;&#9;resources: [.copy("Resources")] &#9;&#9;&#9;&#9;) &#9;&#9;] Target Folder: <project_root>/Sources/SHSearchBar Resource Folder: <project_root>/Sources/SHSearchBar/Resources To make my little post here complete I also want to mention that a package using the Bundle.module approach can be integrated in apps that run on iOS <14 too since the generated extension does not contain any new API 👍
Sep ’20
Reply to iOS 16 CTCarrier deprecation
Hey hey 👋 same as @spoxies, we use CTCarrier to detect the SIM's country code to preselect the correct country code for our phone numebr entry: https://github.com/Blackjacx/Columbus/blob/dd328d6a66686e067da4990ab472fa14cf681eaa/Source/Classes/CountryPickerViewController.swift#L268-L281 I wonder how all the apps, that use phone numebr login, should do that from now on... I mean yes we could use the Locale information but that is not really accurate, right? Any suggestions? Thanks in advance!
May ’23