64 questions
1 vote
1 answer
505 views
Xcodebuild clean command fails in build script but works in terminal
I have a build script written in Bash that is used to create an XCFramework for iOS. The script includes several xcodebuild commands, including a clean command to clean the workspace cache. When I run ...
0 votes
1 answer
279 views
Authorizing access to health data
I would like to request the HealthKit data here, but I keep getting a lot of error messages from the compiler. Does anyone know what the problem is here? Here is the code: let healthStore = ...
2 votes
1 answer
1k views
In Xcode, how do you set compiler flags for standalone module (framework)?
I was writing my own standalone module and wanted to use cblas_dasum for efficient calculation of the sum of absolute values of a double array. Though a message pops up saying that I have to specify ...
3 votes
2 answers
2k views
Module not found when adding a framework to an existing Xcode project
I have created a simple swift framework from scratch and was able to use it by adding the framework to a newly created app project. Just to test, I've also created just another app project and was ...
2 votes
0 answers
240 views
How to wait for code inside addSnapshotListener to finish execution before returning to function?
func getStudents() { var student: Student = Student() db.collection(StudentViewModel.studentCollection).addSnapshotListener { (querySnapshot, error) in guard error == nil ...
3 votes
3 answers
977 views
iOS Modularization - Is a scheme required for a Xcode project [framework] that's imported into the main app Xcode project?
I have been creating Internal (local) Swift Packages and then creating frameworks that import those packages as modules to help create service providing [public] classes and structs. Said frameworks ...
11 votes
0 answers
5k views
Swift Version Conflict: this SDK is not supported by the compiler - using BUILD_LIBRARY_FOR_DISTRIBUTION setting. What could be the issue?
I'm building a Swift static library with: Xcode 13.2 (Swift compiler 5.5.2) iOS Deployment target 12.0 Build library for distribution YES Skip install NO Swift language version 5 and tried with 4.2 ...
0 votes
1 answer
650 views
OpenSSL fails to compile for swift framework
In a sample app that I have created, have used the openssl lib using module map. Following is the structure of module.modulemap file. framework module TestApp { umbrella header "TestApp.h&...
1 vote
0 answers
216 views
iOS Xcode 12 _CodeSignature folder not created when generate SDK Framework having Cpp code or files
I'm trying to create SDK framework in xCode12. My code have the cpp file, Objective-c and .swift files Now, when i try to generate the framework and i'm able to build the project and it's successfully ...
0 votes
1 answer
544 views
UI Elements in a Swift Package
I've bumped into some specific problem, that I really need to be resolved: Trying to assemble my own Swift Package with complex structure, had an idea^ that I can re-use some design elements, such as ...
0 votes
1 answer
378 views
Photo Asset Iteration
I'm messing with some photo assets and I am trying to go through my camera roll and print out all the assets from every single photo. I know it would need to be a for loop but just not entirely sure ...
6 votes
0 answers
1k views
SwiftUI Preview not finding image of used framework
My project consists of a main iOS app project and three additional frameworks for Presentation, Domain and Data layers. My own frameworks are embedded in the main target. Third party frameworks are ...
2 votes
2 answers
1k views
Embedding a Swift Framework into another Framework Xcode
I have basically two frameworks running on Xcode. "ResearchKit" and "AppMethods". While all works fine, the "AppMethods" framework utilizes code within "ResearchKit&...
10 votes
2 answers
9k views
Custom Framework : dyld: Symbol not found: _$s11CryptoSwift7PaddingO5pkcs7yA2CmFWC
I am using a custom framework created using 3 different cocoapods. I am using this custom framework in a client app by dropping the xc framework created. As soon as the client app launches it crashes ...
0 votes
1 answer
2k views
Xcode error accessing build database while using the universal script for making framework builds
I am trying to build a Swift framework containing cocoapods, using the below universal framework script got from here: Swift universal framework depending on pod The build fails when using Xcode 12 ...