Linked Questions
28 questions linked to/from Importing CommonCrypto in a Swift framework
2 votes
1 answer
2k views
Cannot import Common Crypto in a Swift framework [duplicate]
In Xcode, when I try to add the Objective C library Common Crypto via a bridging header file in a Swift framework (using #import <CommonCrypto/CommonCrypto.h>), I get an error saying that ...
0 votes
1 answer
3k views
How to use Objective C bridging header in swift framework? [duplicate]
I have created my own cocoa POD framework in swift, which uses #import CommonCrypto/CommonCrypto.h in Objective C bridging header file, but when I try to use same POD in project, It gives compile ...
212 votes
23 answers
383k views
Command CompileSwift failed with a nonzero exit code in Xcode 10 [duplicate]
After updating to the latest version of Xcode at the moment (version 10.0) the project is unable to build because it found some errors regarding some "Command CompileSwift failed with a nonzero ...
150 votes
19 answers
129k views
How can I convert a String to an MD5 hash in iOS using Swift?
I want to convert a string like "abc" to an MD5 hash. I want to do this in iOS and Swift. I have tried using the solutions below but they were not working for me: Importing CommonCrypto in a Swift ...
151 votes
6 answers
86k views
How to call C from Swift?
Is there a way to call C routines from Swift? A lot of iOS / Apple libraries are C only and I'd still like to be able to call those. For example, I'd like to be able to call the objc runtime ...
23 votes
4 answers
18k views
Swift Can't Import Sqlite3 iOS
I added libsqlite3.0.dylib to my project, and then I tried to import using the following code: import UIKit import sqlite3 class Dataware: NSObject { } But it's giving me this error: No Such ...
19 votes
2 answers
10k views
Can I use an Objective-C class in my Swift framework library?
I have created a Swift Framework that I use in multiple projects. There is an Objectivce-C class that I would like to use in that is difficult to port in straight Swift. Lets say that class is SFTest ...
21 votes
9 answers
3k views
App submission failed - 1+ corrupted binaries/non-public API usage and no additional details
I’ve been submitting my app to the App Store for test flight and after build 11, I’ve been getting failures via email from Apple: Non-public API usage: The app contains one or more corrupted binaries....
9 votes
4 answers
6k views
How to use libxml in Swift? [closed]
I try to use this new language to start a new project with Some of my old code, I used Libxml2.2 in my old project,so xcode shows "libxml.h/parse.h file not found" after my putting the code in my new ...
22 votes
2 answers
22k views
Private module map for a framework
I'm using this answer to create a module map to create a module for CommonCrypto so I can use it in a framework. Doing this however means that any projects that I use this framework in have access to ...
8 votes
2 answers
7k views
How to use a C dylib from a Swift file in a framework
I'm looking at starting to use Swift in a framework, which uses libz.dylib, but it looks like there's no way to import it from within Swift. I tried import zlib and import libz, which didn't work. ...
9 votes
1 answer
14k views
Swift Project: "Missing Required Modules" when import a modular framework
Setup I create a swift framework which include C library (CommonCrypto) and a Objective C file. There is no bridge-header in swift project. So I create a module.modulemap to import CommonCrypto and ...
4 votes
2 answers
15k views
Where can I get CommonCrypto / CommonCrypto file from?
I have a problem with importing CommonCrypto/CommonCrypto or CommonCrypto/CommonDigest. I need a SHA256 for my Swift code. I found CommonCrypto github site in Cocoapods. https://github.com/...
3 votes
2 answers
10k views
How to get MD5 hash from string in SWIFT and make bridge-header
i dont even expect this problem, but it appears. I try to get md5 hash from string in swift. I search about that on SO and assume that i need to import library like that: #import <CommonCrypto/...
6 votes
0 answers
3k views
How to set the modulemap for cocoapods project?
I was trying to use a pod that was written in Obj-C and my project is Swift-only. I got this error include of a non-modular header inside framework module in the import statement of a dependency ...