Post

Replies

Boosts

Views

Activity

JsonElement
Hello! Kotlin has such a wonderful thing as JsonElement, which allows you to postpone the decoding of dynamic json fields until better times. Is there an analogue in Swift Decodable?
0
0
252
Nov ’23
XCFramework with dependencies inside Swift Package Manager
Hi. I have a task to make a closed source library and distribute it through CocoaPods & SwiftPM. I easily assembled XCFramework, but it directly depends on Alamofire. In the .podspec file, you can specify which libraries should be specified in the dependencies. SwiftPM has .binaryTarget, but it does not allow you to set the dependencies parameter, and the program breaks with logs that Alamofire is not found. How can I distribute a library with closed source code and third-party dependencies through SwiftPM? 2023-12-13 22:40:31.324591+0300 xctest[59301:854197] [loading] Error loading /Users/artur/Library/Developer/Xcode/DerivedData/OneEntry-dmiwhalyzfolnqbikdorjplpbnlz/Build/Products/Debug-iphonesimulator/OneEntryTests.xctest/OneEntryTests (158): dlopen(/Users/artur/Library/Developer/Xcode/DerivedData/OneEntry-dmiwhalyzfolnqbikdorjplpbnlz/Build/Products/Debug-iphonesimulator/OneEntryTests.xctest/OneEntryTests, 0x0109): Library not loaded: @rpath/Alamofire.framework/Alamofire Referenced from: <55A39AAE-1CE1-3384-986B-7070E1BD4A47> /Users/artur/Library/Developer/Xcode/DerivedData/OneEntry-dmiwhalyzfolnqbikdorjplpbnlz/Build/Products/Debug-iphonesimulator/OneEntry.framework/OneEntry Reason: tried: '/Users/artur/Library/Developer/Xcode/DerivedData/OneEntry-dmiwhalyzfolnqbikdorjplpbnlz/Build/Products/Debug-iphonesimulator/Alamofire.framework/Alamofire' (no such file),
0
0
500
Dec ’23