求助dyld:Libraryyou are not aloneloaded:rpath/libswiftCore.dylib

dyld: Library not loaded: @rpath/libswiftCoreAudio.dylib Referenced from:&Framework& Reason: image not found
Related questions
dyld: Library not loaded: @rpath/libswiftCoreAudio.dylib Referenced from:&Framework& Reason: image not found
imported from
I've created a Cocoa Touch Framework to centralize my common Swift code and moved some things into it-- and now I'm using it in my other Swift project, in a workspace.
At first the main project compiled, but upon startup I got this error:
dyld: Library not loaded: @rpath/libswiftCoreAudio.dylib
Referenced
/Users/username/Library/Developer/Xcode/DerivedData/AppName-guvhnmqtcqhmmndemyhztmwxbkjq/Build/Products/Debug-iphonesimulator/JBS.framework/JBS
Reason: image not found
I've found that can fix it by turning on the option Embedded Content Contains Swift Code in the framework, but then I get a bunch of duplicate symbols in the log, like so:
objc[19237]: Class GGLBundleUtil is implemented in both
/Users/username/Library/Developer/Xcode/DerivedData/AppName-guvhnmqtcqhmmndemyhztmwxbkjq/Build/Products/Debug-iphonesimulator/JBS.framework/JBS
/Users/username/Library/Developer/CoreSimulator/Devices/CCAD7FCA-BF5F-428A-00618/data/Containers/Bundle/Application/22DC1E4F-B631-450A-A157-A6ADA0126DE6/AppName.app/AppName.
One of the two will be used. Which one is undefined.
I don't think I'm supposed to turn on the Embedded Content Contains Swift Code option in the framework, but I don't know why the framework can't find the Swift libraries.
When I try to run the app on the device, I get a similar but different error.
It seems to be complaining that it can't see my framework:
dyld: Library not loaded: @rpath/JBS.framework/JBS
Referenced from:
/private/var/mobile/Containers/Bundle/Application/CA0-431E-A7DB-D3B124CDC677/AppName.app/AppName
Reason: image not found
Did you test it in device? If so, the bundle id must be the same between your project and your framework.
The main problem was that when I tried to add the framework into the Embedded Binaries, I didn't pay good enough attention to the section names.
Instead I added it into the section which had the other Linked Frameworks and Libraries, because there were some other ones there already.
Once I added it into the Embedded Binaries section (which also re-added it back to the Linked Frameworks and Libraries when I did) it no longer gave me the main error as seen in the title.
I still as of yet, however, haven't figured out how to solve the duplicate symbols error, which occurs all the time now even though Embedded Content Contains Swift Code is turned off everywhere.
But that wasn't the main issue in my question.
See also questions close to this topic
I want to upload a PHAsset to the server. Now my PHAsset can be a photo or a video. I am able to do it successfully for the PHAssets present on the local device. But what if the PHAsset is not on the local device and instead present on the iCloud.
Can we upload directly from the iCloud to the server or do we have to first download to the local device and then to upload operation to the server.
Also, I would be grateful if someone could tell how to do this.
I'm trying to start a workout session, continuously get heart rate, and display it in a WKInterfaceLabel. It's crashing right after the interface controller loads saying it unexpectedly found nil while unwrapping an optional. I can't seem to find which value is nil.
import WatchKit
import Foundation
import HealthKit
class HeartrateDisplayController: WKInterfaceController, HKWorkoutSessionDelegate {
@IBOutlet var heartrateLabel: WKInterfaceLabel!
@IBOutlet var group: WKInterfaceGroup!
var workoutSession: HKWorkoutSession?
var hrUnit: HKUnit?
var hrType: HKQuantityType?
let healthStore = HKHealthStore()
var hrQuery: HKQuery?
var doubleValue = Double()
override init() {
super.init()
override func awake(withContext context: Any?) {
super.awake(withContext: context)
group.setBackgroundColor(.blue)
requestAuth()
hrUnit = HKUnit(from: "count/min")
hrType = HKObjectType.quantityType(forIdentifier: .heartRate)
let workoutConfiguration = HKWorkoutConfiguration()
workoutConfiguration.activityType = .running
workoutConfiguration.locationType = .indoor
workoutSession = try HKWorkoutSession(configuration: workoutConfiguration)
workoutSession?.delegate = self
healthStore.start(workoutSession!)
hrQuery = createStreamingQuery()
healthStore.execute(hrQuery!)
} catch let error as NSError {
fatalError("*** Unable to create the workout session: \(error.localizedDescription) ***")
override func willActivate() {
// This method is called when watch view controller is about to be visible to user
super.willActivate()
override func didDeactivate() {
// This method is called when watch view controller is no longer visible
super.didDeactivate()
func requestAuth() {
let readTypes = Set([hrType!])
let writeTypes = Set([hrType!])
healthStore.requestAuthorization(toShare: writeTypes, read: readTypes, completion: {
(success, error) -& Void in
if error != nil {
print("Auth Error: \(error?.localizedDescription)")
} else if success {
func createStreamingQuery() -& HKQuery {
let queryPredicate = HKQuery.predicateForSamples(withStart: Date(), end: nil, options: [])
let query: HKAnchoredObjectQuery = HKAnchoredObjectQuery(type: hrType!, predicate: queryPredicate, anchor: nil, limit: Int(HKObjectQueryNoLimit), resultsHandler: {
(query, samples, deletedObjects, anchor, error) -& Void in
if let errorFound = error {
print("query error: \(errorFound.localizedDescription)")
if let samples = samples as? [HKQuantitySample] {
if let quantity = samples.last?.quantity {
self.doubleValue = quantity.doubleValue(for: self.hrUnit!)
print("\(self.doubleValue)")
let string = String(format: "%f bpm", self.doubleValue)
self.heartrateLabel.setText(string)
if self.doubleValue & 180.0 {
self.group.setBackgroundColor(.blue)
self.group.setBackgroundColor(.red)
self.setNotification()
query.updateHandler = {
(query, samples, deletedObjects, anchor, error) -& Void in
if let errorFound = error {
print("query-handler error: \(errorFound.localizedDescription)")
if let samples = samples as? [HKQuantitySample] {
if let quantity = samples.last?.quantity {
self.doubleValue = quantity.doubleValue(for: self.hrUnit!)
print("\(self.doubleValue)")
let string = String(format: "%f bpm", self.doubleValue)
self.heartrateLabel.setText(string)
if self.doubleValue & 180.0 {
self.group.setBackgroundColor(.blue)
self.group.setBackgroundColor(.red)
self.setNotification()
return query
func setNotification() {
let localNotification = UILocalNotification()
localNotification.alertTitle = "Elevated Heart Rate"
localNotification.alertBody = "Your heart rate is high. Try to relax for a bit."
localNotification.soundName = UILocalNotificationDefaultSoundName
localNotification.fireDate = Date(timeIntervalSinceNow: 0.0)
// HKWorkoutSession Delegate Methods
func workoutSession(_ workoutSession: HKWorkoutSession, didChangeTo toState: HKWorkoutSessionState, from fromState: HKWorkoutSessionState, date: Date) {
func workoutSession(_ workoutSession: HKWorkoutSession, didFailWithError error: Error) {
I am new to iOS development and VFL is giving me a huge headache. I am trying to translate the following constraints into VFL for a simple view as a study case but my width is never inferred and unless I explicitly specify a width, the view never shows up.
H:|-50-[v0]-50-|
V:|-20-[v0(100)]
As I understand, these expressions should translate to the IB constraints in the image. What am I doing wrong here?
Entire constraints declaration:
scrollView.addConstraints(
NSLayoutConstraint.constraints(withVisualFormat: "H:|-50-[v0]-50-|", options: NSLayoutFormatOptions(), metrics: nil, views: ["v0": bigFrameUIView]))
scrollView.addConstraints(
NSLayoutConstraint.constraints(withVisualFormat: "V:|-20-[v0(100)]", options: NSLayoutFormatOptions(), metrics: nil, views: ["v0": bigFrameUIView]))
I would like to be able to deliver specific content to specific apps, like a push notification, and have that information stored and displayed in the app in a table format.
For example, if I wanted to send specific news to the phone via my app, without it going to a website to pull the data, I would send the data to it via Push Notification, it would display the notification on the phone and then when the user goes into the app and looks at the 'News' tab, the notification would be there.
Is that possible?
If so, could you point me two where I could learn about this?
I have a project to develop a Android App and probably in the future I will also develop the app for iOS. I have seen that Visual Studio 2015 has the option for develop in both platforms. For Android I have always used Android Studio.
Do you recommend me to use Visual Studio in that case?
Can I do the same things that I do with Android Studio?
The language used is C#?
Currently I have 2.3 and I need these three functions that are in Swift 3.0 to be converted to work with Swift 2.3.
Autocomplete is not taking me anywhere so far...
func apply(transform t: CGAffineTransform) -& CGVector {
return point.applying(t).vector
error: 'applying' doesn't exist in 2.3
return point.vector.apply(transform: t)
func clip&T : Comparable&(_ x0: T, _ x1: T, _ v: T) -& T {
return max(x0, min(x1, v))
error: Extraneous parameters
func lerp&T : FloatingPoint&(_ v0: T, _ v1: T, _ t: T) -& T {
return v0 + (v1 - v0) * t
errors: Extraneous parameters/ 'FloatingPoint' doesn't exist in 2.3
I'm working with Swift 3, Xcode and SpriteKit
I have a SKCameraNode named cam, and I put a node at the camera's position to check it:
var cam: SKCameraNode!
let cameraNode = SKSpriteNode(imageNamed: "hx")
override func didMove(to view: SKView)
cam = SKCameraNode()
camera = cam
addChild(cam)
cam.position = CGPoint(x: playableRect.midWidth, y: playableRect.midHeight)
addChild(cameraNode)
And here's what I got :
The red line is the limit of my playableRect.
The white hexagon is the position of the camera. We can clearly see that the camera right in the center of my playableRect as I wanted, but normally this camera should be in the center of the screen, why is it on the left ?
I mean, normally my cameraNode should always be at the center of the screen, it seems logic.
Can you help me ?
currently i'm developing an app for my graduation project. The problem is, that it's not just one app, it consists of an iOS app that is made for the users and a macOS app for the "Owner". In the mac App the owner can create a file that should then be red in the iOS app.
Until now I have made a script that has all the necessary variables to transport the information, it can serialise and deserialise a file and assign it to the UI. Everything worked fine as long as I was working on the macOS app, the files can be created, deserialised and so on, however when I tried to go to the iOS app, I copied the exact same script that serves as the dataModel into the project and when I tried to deserialise a file created in the macOS file the app crashed and gave me an error saying:
cannot decode object of class (ExcursionCreator.ExcursionDataModel)
for key (root); the class may be defined in source code or a library
that is not linked'
I investigated on the error and found out that i cannot just copy the script from one project to the other, so I found a source that said that I should create a framework with just this file, however i haven't found any useful topics that talk about frameworks for cross platform.
So my question in a few words is, is it true that I have to create a framework for this purpose and if so how would I do it so it works on macOS as well on iOS. Any other advice would also be greatly appreciated.
Thanks in advance Jorge. :)
Does anyone know if the .Net Framework 4.6.2 Web Installer support Windows 10 or not. On , it doesn't mention Windows 10 as a supported version.
Thank you All
I've been trying to add check mark when asset is selected.
Here is the Framework's GIT rep
I can't find a way to add it and also change the background color.
Thanks in advance!
After I added new dependency to my project and run pod install, I have duplicate target in my workspace(.xcworkspace) as below:
And this is the pod file structure:
platform :ios, '8.0'
use_frameworks!
pod 'AFNetworking', '~& 2.6'
pod 'Fabric'
pod 'Crashlytics'
pod 'SocketRocket'
I restart the project and also Xcode, but it does not help. What is the reason and how can I solve the problem?
after a deletion of $HOME/. pod install
my xcode workspace is somehow corrupted. My project folder (which my application code) is not available anymore. Instead a folder "Products" is available which contains the .app files of the builds (which are usually on root level). The folders "Pods" & "Frameworks" are inside the workspace, also the pod project looks good.
Does anybody have these issues and maybe know how to solve this? I tried to add the folder manually to the workspace (since it exists on file system), but the references were wrong (all files plain inside the workspace).
I am using the latest xcode version and cocoapods 1.0.1
One more hint: If I open after a deintegrate the original workspace file, the main project folder is also missing. So I guess that my workspace is somehow corrupt...
Thanks in advance!
To make things easier. This is what I have but I can't use '#import SwifterIOS' in Xcode, its not identified:第一个,没看懂。一开始还以为是不支持iOS7的缘故。
dyld: Library not loaded: @rpath/libswiftCore.dylib
Referenced from: /var/mobile/Applications/9D80DFDC--B0BF-DE4/swift02_project.app/swift02_project
Reason: no suitable image found.
/private/var/mobile/Applications/9D80DFDC--B0BF-DE4/swift02_project.app/Frameworks/libswiftCore.dylib: code signature invalid for '/private/var/mobile/Applications/9D80DFDC--B0BF-DE4/swift02_project.app/Frameworks/libswiftCore.dylib'
  未解决。第二次运行,就没有这个报错了。
在安装CocoaPods的时候提示的。
[!] Pods written in Swift can only be inte add `use_frameworks!` to your Podfile or target to opt into using it. The Swift Pod being used is: SwiftyModel
  意思是说:CocoaPods在Swift里面,只能以framework的形式使用,所以要加这句话。那么这句话在哪里加呢?在Podfile里面,在写完所有的语句之后,加上这句,示例如下:
platform :ios ,'8.0'
pod 'SwiftyModel', '~& 0.1.0'
use_frameworks!
  再重新install就可以了。  
can't convert value of type 'AnyObject' to specified type 'NSMutableArray'
  报这个错的原因,我认为是因为,这个字典不想让乱七八糟的东西,成为自己的关键字。所以在后面,要加个类型说明。
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -& UITableViewCell {
let cell = self.tableView!.dequeueReusableCellWithIdentifier("cell")
let sectionArr:NSArray = self.dataDic.allKeys
let sectionText:String = sectionArr.objectAtIndex(indexPath.section) as! String
let rowArr:NSMutableArray = self.dataDic.objectForKey(sectionText) as! NSMutableArray
let rowDic:NSDictionary = rowArr.objectAtIndex(indexPath.row) as! NSDictionary
let cityName:String
= rowDic.objectForKey("city") as! String
cell?.textLabel?.text = cityName
return cell!
  这样就可以了。在后面标明被取出来的数值,将会以什么样的形式显示,就可以了。
Views(...) Comments()XCode真机调试APP时报dyld: Library not loaded: @rpath/XXX等错误 - 简书
<div class="fixed-btn note-fixed-download" data-toggle="popover" data-placement="left" data-html="true" data-trigger="hover" data-content=''>
写了36848字,被413人关注,获得了381个喜欢
XCode真机调试APP时报dyld: Library not loaded: @rpath/XXX等错误
最近用了XCode7之前,有时侯会时不时地出现这种错误,有时是@rpath/libswiftCore.dylib,有时是@rpath/Appirate.framework,等问题,实在让人纠结.对于@rpath/libswiftCore.dylib这个问题,Stackoverflow上评分最高 的答案是这样的:在Build Setting里面搜索Embedded,出现在 Content Contains Swift Code这个选项,其默认值是No,改成Yes就行
里面评论说这个对很多人来说有效果,解决了问题.但是今天我碰到了另一个情况,并不是@rpath/libswiftCore.dylib,而是@rpath/Appirate.framework,我使用了Cocoapods来管理第三方库,Appirate是我使用的一个库.从网上找了很多解决方案都不能解决.后来看到Stackoverflow有一个人这样回答.就是将Keychain里的相关证书由Trust改成SystemDefault,我恰巧把一些证书由SystemDefault改成了Trust,难道是这个问题?
这里我用了别人的图.我改的是调试证书,不是发布证书.,再重新删除iPhone上的APP,再清空项目.再启动调试,没想到成功了.今天又出现这种情况了并且多个引用的第三方库报错.主要原因是我使用Podfile里面删除了部分第三方库,再用Cocoapods执行命令pod Update, 后出现这种情况.仔细分析并执行了以下步骤:
1.Clean the product,清空项目-&无效2.在真机上删除APP,再重新安装调试-&无效3.检查项目里的Frameworks文件夹,如果出现该Framework,删除掉 -&无效
4.选择Target-&自己的项目-&Build Settings-&搜索 search -& 选择Header Search Path再在里面删除相关引用的头文件. 再调试-& 还是无效
5.再在Build Settings-&搜索 Other Link Flags 选择相关的Framework,删除掉.再调试-& 成功了
所以如果再出现这种莫名其妙的dyld: Library not loaded: @rpath/XXX等错误,基本上可以用以上方式解决以上以记录我iOS开发中的疑难杂证
如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
打开微信“扫一扫”,打开网页后点击屏幕右上角分享按钮
如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
选择支付方式:我们的项目用的是oc,然后因为开源库的原因,我们的项目中也用到了swift,某天在联机调试的时候,Xcode报了一个很神奇的错误
dyld: Library not loaded: @rpath/libswiftCore.dylib
Referenced from: /var/containers/Bundle/Application/295BD35B-CF6C-6D60E4E4C5/PPStocks.app/PPStocks
Reason: no suitable image found.
/private/var/containers/Bundle/Application/295BD35B-CF6C-6D60E4E4C5/PPStocks.app/Frameworks/libswiftCore.dylib: mmap() errno=1 validating first page of '/private/var/containers/Bundle/Application/295BD35B-CF6C-6D60E4E4C5/PPStocks.app/Frameworks/libswiftCore.dylib'
google了一下,找到了一个很有用的链接dyld: Library not loaded: @rpath/libswiftCore.dylib里面有人提到了一个很关键的build setting
Embedded Content Contains Swift Code
这个设置项一定要设置为YES
官方的QA在这里,说得很清楚了,这个设置项就是为了让Xcode知道,你的App需要oc和swift混编了,把swift相关的库打包到你的App中。
然而,Xcode是一个坑货,即使你的设置项是对的,还是可能会遇到这个提示。解决的办法是:
先设置为NO
build一次到手机,肯定会crash
再build一次,问题解决了
热点阅读:
小主,按键盘右方向键 → 翻页可以跳过片头呢
本文标题:
原文链接:
和本文相似的内容:
编辑推荐 &&
妖怪研究所系列其一:山童? 李家怪事绵延大青山,茫茫烟苍几百里,这里的树木相当繁茂,遮天蔽日,林中更是鹿鸣呦呦,空山绝响,充满了无限的生机和神秘。大青山下大青庄,有山民100余户。俗话说,坐山吃山,这里的人们多为猎户,平日里青壮男子外出打猎

我要回帖

更多关于 not at all 的文章

 

随机推荐