When I updated xCode and build on iOs 9, during all my synchronisation requests, my screen is black. It is working, but it seems that threads are not handled the same way. I am using AFNetworking and PromiseKit pods.
I did not updated PromiseKit (my current version is 1.6.0) because the last version is in Swift and I have an error
dyld: Library not loaded: #rpath/libswiftCore.dylib
Referenced from: /Users/[user]/Library/Developer/Xcode/DerivedData/Build/Products/Debug-iphonesimulator/PromiseKit.framework/PromiseKit
Reason: image not found
For that error I tried
Runpath Search Paths
$(inherited)
#executable_path/Frameworks
#loader_path/Frameworks
Embedded Content Contains swift Code to 'YES'
'OU' parameter in my certificates
updating cocoapods, xcode
deleting derived datas, reinstalling my pods, cleaning
Do you think black screen could be fixed only by updating PromiseKit or could be another reason? Do you have any idea how to fix libSwiftCore issue ? Thanks !
Related
I'm using SDWebImage with CocoaPods, and the app I'm working on must support iOS7.
After installing SDWebImage version 4.0.0 with CocoaPods, I import it into a class with #import <SDWebImage/UIImageView+WebCache.h>.
I use one of the category's methods, sd_setImageWithURL:, to asynchronously download an image.
This works fine on iOS8-10. But for some reason (only on iOS7), the app crashes saying that the sd_setImageWithURL: is an unrecognized selector.
Why would the category not load properly on only one OS? This doesn't make any sense to me at all. :/
Update:
I ran an analysis on the project, and I noticed this warning:
ld: warning: ignoring file <path/to/file>/libSDWebImage.a, file was built for archive which is not the architecture being linked (armv7): <path/to/file>/libSDWebImage.a
(The path was really long. I replaced it with <path/to/file>)
As I suspected, this warning does not show up when running on newer versions of iOS, which also use a different architecture, arm64.
So, it looks like the library libSDWebImage.a is being build for arm64. What can I do about this?
I set Build Active Architecture Only to NO in Build Settings, then did the "deep clean" as suggested by the answer here: Undefined symbols for architecture armv7: cocoaPods iPhone 5
That seemed to solve the issue for me.
I have installed the Realm Objective C Framework (2.0.3) by simply dragging it into my project created in Xcode 8. When I first tried it on simulator I got the typical dyld error.
dyld: Library not loaded: #rpath/Realm.framework/Realm
Referenced from: /var/containers/Bundle/Application/89F5987A-F3F0-45F2-9014-6BA662135E00/RelamDemo.app/RelamDemo
Reason: image not found
So I tried to fix it using the following suggestion:
https://github.com/realm/realm-cocoa/issues/1681#issuecomment-120749962
And it worked on iOS 10 Simulators.
But when I tried to run the same project on a device (iOS 10/9.3.2) I got the same dyld error again.
I have checked that I have copied the Realm.framework in my project. Now how can I solve the problem?
You need to ensure that Realm.framework is also copied to the 'Embedded Binaries' section of your app as well.
You can find that section in the 'General' tab of your project's settings.
(Screenshot courtesy of this iOSDevCenter post)
I am seeing the following error when trying to run a project on a real device, in the simulator it runs fine.
error: WatchKit App doesn't contain any WatchKit Extensions. Verify that the value of NSExtensionPointIdentifier in your WatchKit Extension's Info.plist is set to com.apple.watchkit
Things which may or may not be relevant
I am using cocoa pods in both the watch and main app target
The project is mostly objective-c but has a few swift files
Xcode 8.1 (8B62)
Device Software Versions: iOS 10.1.1 & WatchOS 3.1
Deployment Info > Deployment Target: iOS 10.0 watchOS 3.0
Things I’ve tried
I have checked several times that all the correct files belong to the watch target. I may have missed something here, but I assume it wouldn’t run on the simulator if this was the case
Bundle identifiers
main app’s identifier: < app id >
watch app’s bundle identifier: < app id >.watchkit
watch app’s WKCompanionAppBundleIdentifier: < app id >
watch extension’s bundle identifier: < app id >.watchkit.extension
watch extension’s NSExtension>NSExtensionAttributes>WKAppBundleIdentifier: < app id >.watchkit
NSExtension>NSExtensionPointIdentifier: com.apple.watchkit
WKWatchKitApp is set to YES in both the Watch Extension and the Watch App
I have removed and re-added the .appex from Build Phases>Embed App Extensions
Ensuring Mach-O Type is set to executable in all targets
Re-installing pods as described in this answer
Clearing derived data
Clearing build folder
Restarting Xcode
I tried an archive and this failed with the same error
In lieu of an answer, advice on debugging / troubleshooting this would be appreciated too.
I've seen this intermittently, but usually rebuilding a second time fixed it. I've never got to the bottom of why.
I've always assumed it's a bug in Xcode.
Sorry can't be more help, but you're not alone in seeing this.
I encountered this error, with 3 other errors.
Turned out the problem is that Valid Architectures is set incorrectly. Under Build Settings, make sure Valid Architectures includes i386 and armv7k.
Once that is fixed, the watch extension will be build, and all errors gone.
All of a sudden, and through no apparent changes on my end, I am now getting the following error from an image in my asset catalog:
2013-10-30 14:44:46.629 MyApp[38590:a0b] CUICatalog: Can't find rendition for name: LoginBackground scale factor: 2 device idiom: 1 device subtype: 0
2013-10-30 14:44:46.638 MyApp[38590:a0b] Could not load the "LoginBackground" image referenced from a nib in the bundle with identifier "com.mybundleid"
I have tried removing the image assets and re-adding them, to no avail. The issue is happening in the simulators as well as devices. And oddly enough I can still see the image in the storyboard. Adding the images directly to the project worked as well.
Has anyone else ever seen this error? What's going on?
Update: CocoaPods 0.28.0 appears to have resolved this issue.
Are you using CocoaPods to manage your dependencies? It's possible a recent update has caused this.
I encountered the same issue with a universal app recently. Image sets that included separate, device-specific resources only included assets for a single device type after build. I similarly had made no apparent changes to the project around these assets and my storyboards appeared correct.
After Googling around, I discovered issues with Asset Catalogs reported on the main CocoaPods project (https://github.com/CocoaPods/CocoaPods/issues/1520) and realised that perhaps updating CocoaPods could be the change that wasn't apparent.
Rolling back my installation of CocoaPods from 0.27.1 to 0.26.2, the release before support was included for compiling xcassets in Pod dependencies, appears to have fixed this issue for now. I'll be keeping an eye on upcoming releases as it seems there is very active development in this area.
I downgraded cocoapods to 0.26.2 and it fixed the issue for me.
I added Social.framework in my application in the same way i use to add the other frame works. I have downloaded xcode 4.5 and iOS 6 . but my application crashes with follwing error only on device. It works fine on simulator.
dyld: Library not loaded: /System/Library/Frameworks/Social.framework/Social
Referenced from: /var/mobile/Applications/FC88291D-2052-45D6-A7BB-65CE340F07BF/Uploading Image.app/Uploading Image
Reason: image not found
I was getting this exact error. My app currently has a deployment target of 5.1. I wanted to add Facebook sharing. I found this old post, Conditionally including a library for different iOS SDK versions?. All I did was set "Social.framework" to 'optional' and it did the trick, then my app would run on ios 5.1 and ios 6.0. Of course you need to do checks at runtime for what OS the device is running otherwise you could run into a crash if you try to access social.framework in ios 5.1 or earlier. Hope that helps!
In Xcode go to targets, Go to build phase and search for Social frame work you will find that under "Link Binary with Libraries" section. There select social frame work and see there is an option on right hand side required/optional in that just change required to optional. Now you are able to run on all ios devices without any crashes.