Comments (59)
Could not load the "errorIcon" image referenced from a nib in the bundle with identifier "org.cocoapods.SwiftMessages"
from swiftmessages.
@annjawn It's fixed.
from swiftmessages.
Guessing it can't find the framework's resource bundle. Are you on the latest version? There was a recent fix that might be related #2. Otherwise, could you provide some context around how you're building (e.g. Cocoa pods, Carthage, etc.)? I'd like to be able to reproduce the problem on my end.
from swiftmessages.
Hi @wtmoose!
Thanks for the quick reply!
I'm using SwiftMessages (1.1.2)
with CocoaPods.
So far this crash happened once with a user, can't reproduce using an iPhone or iPad on my end.
from swiftmessages.
Gotcha. Hmm. Thanks for reporting. I'll look into it, though I'm at the try! Swift NYC conference for a couple of days. How are you building the library (e.g. Cocoa pods, Carthage, etc.)?
from swiftmessages.
As a workaround, you could copy the image into your project and write your own config method that sets the image instead of having SwiftMessages set it.
from swiftmessages.
I built the library with CocoaPods, using Fastlane.
The library works great, and the alerts show on the App Store version on my iPhone 6. Maybe it is isolated to iPod Touch?
from swiftmessages.
Are you on CocoaPods 1.0.1?
from swiftmessages.
Yep!
$ pod --version
1.0.1
from swiftmessages.
Any idea if the device in question was jailbroken? Just asking because #12 is reporting a similar-sounding issue and the device in question is jailbroken.
from swiftmessages.
Hi @wtmoose,
Thanks for the follow up.
Yes, 100% jailbreak according to Fabric 👍
from swiftmessages.
@wtmoose Any hint on why it crashes on Jailbroken device?
from swiftmessages.
No. I don't have a jailbroken device. I've been waiting for a kind jailbreaker to drop in and help out. Got close with #12, but I never heard back.
Do you have any data on percentage of users affected?
from swiftmessages.
@wtmoose Yes, 100% of my JB users are experiencing this crash.
I don't have a JB device as well :(
from swiftmessages.
Do you have a percentage of all users affected?
from swiftmessages.
@wtmoose just JB users
from swiftmessages.
Minor update: we tried to pin down a jailbroken device last week, with no luck. None of our devices are on a version of 9.x or 10.x that can be jailbroken.
We did try a "partially" jailbroken 9.4 device, but couldn't reproduce the crash. If and when the latest version of 10.x is jailbroken, we'll give that a try. Beyond that, I'm not sure what else can be done until someone with a jailbroken device lends a hand.
You can probably work around the issue by copying the .nib file into your project and removing or changing the image referenced by the image view.
from swiftmessages.
Still jailbroken device iPhone 6s on 9.3.3 crash on your library.
Crashed: com.apple.main-thread
0 SwiftMessages 0x1009b5e88 _TFO13SwiftMessages9IconStyle5imagefT5themeOS_5Theme_CSo7UIImage + 1556
1 SwiftMessages 0x1009a1654 _TFC13SwiftMessages11MessageView14configureThemefTOS_5Theme9iconStyleOS_9IconStyle_T_ + 28
2 Events Near Me 0x100089c1c specialized locationViewController.showAlertCancel() -> () + 4295121948
3 Events Near Me 0x100086f60 locationViewController.(getData((Resulty<()>) -> ()) -> ()).(closure #1) (locationViewController.swift)
4 Alamofire 0x1003501e8 _TTSg5GV9Alamofire22DataResponseSerializerP__GS0_P__S_30DataResponseSerializerProtocolS____TFFFC9Alamofire11DataRequest8responseuRxS_30DataResponseSerializerProtocolrFT5queueGSqCSo13DispatchQueue_18responseSerializerx17completionHandlerFGVS_12DataResponsewx16SerializedObject_T__DS0_U_FT_T_U_FT_T_ + 232
5 libdispatch.dylib 0x1811a14bc _dispatch_call_block_and_release + 24
6 libdispatch.dylib 0x1811a147c _dispatch_client_callout + 16
7 libdispatch.dylib 0x1811a6b84 _dispatch_main_queue_callback_4CF + 1844
8 CoreFoundation 0x18170cd50 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
9 CoreFoundation 0x18170abb8 __CFRunLoopRun + 1628
10 CoreFoundation 0x181634c50 CFRunLoopRunSpecific + 384
11 GraphicsServices 0x182f1c088 GSEventRunModal + 180
12 UIKit 0x18691e088 UIApplicationMain + 204
13 Events Near Me 0x1000880b0 main (AppDelegate.swift:17)
14 libdyld.dylib 0x1811d28b8 start + 4
any workaround yet?
from swiftmessages.
@kwstasna No. I can't get my hands on a jailbroken device. Can you help?
from swiftmessages.
@kwstasna Let me clarify that "no". I don't have a workaround I can implement in my library. There is a likely workaround you can implement in your project, as I mentioned in the comment directly above your's.
from swiftmessages.
this was from Fabric Crashlytics. Although i will try to find a jailbroken device to try your possible work around soon.
Thanks :D
from swiftmessages.
One of my users told me that he made my app working by installing Nosu b
on his Cydia, which doesnt let cydia substrate to run when the application is open!
Don't know if that helps you!
from swiftmessages.
@kwstasna Good to know. Thanks.
from swiftmessages.
Hi,
I have the same problem (on a regular device not a jailbreak one). This issue is random.
Here are the logs in Xcode and I put a screenshot of Xcode too :
Could not load the "errorIcon" image referenced from a nib in the bundle with identifier "org.cocoapods.SwiftMessages"
fatal error: unexpectedly found nil while unwrapping an Optional value
from swiftmessages.
@csurbier the only time I've seen this on a non-jailbroken device is when an old version of CocoaPods is used. Make sure you're at least on 1.1.0. If not, upgrade CocoaPods, clean your project, install pods and then see if it works.
Also, what do you mean by "the issue is random"?
from swiftmessages.
Thanks for your quick answer.
Here is my version of cocapods used for building the app:
pod --version
1.2.0
This issue is random, meaning the bug happens sometimes and sometimes not (for a same version of the app). I don't know why.
I'm seeing it because I'm receiving crashlytics reports.
from swiftmessages.
@csurbier can you post a screenshot of the Crashlytics device stats?
from swiftmessages.
Sure. Here are some screenshots of Crashlytics.
from swiftmessages.
@csurbier Can you click "View all session" and post a screenshot of a specific device stats?
from swiftmessages.
from swiftmessages.
Yep, thanks. Not sure how to fix an issue I can't duplicate. But since you're seeing this on non-jailbroken phones, I think it's time to remove image references from the nib files :(
In the meantime, you can copy the nib file into your project and remove the image reference yourself.
from swiftmessages.
yep this bug is strange. I can't always reproduce.
Ok so I will copy everything in my project and will modify your code.
Thanks for your help
from swiftmessages.
No problem. All you need to do is copy the nib file into your project and remove the image reference. You don't need to touch the SwiftMessages code.
from swiftmessages.
yep 👍
from swiftmessages.
@csurbier My comment
I think it's time to remove image references from the nib files
doesn't make any sense because I was thinking of a different crash related to the image referenced in the nib file. I don't have a fix for your crash and I can't reproduce it. I really need help from someone who is able to reproduce it on their device.
I don't know much about jailbreaking, but I'm wondering if the version of Crashlytics you're using isn't correctly reporting jailbroken 10.2.1, which is relatively recent.
from swiftmessages.
Hi,
I have seen this bug multiple time on my personal iPhone which isn't jailbreaked. I'm not able to reproduce since it happens randomly... Anyway I have included the source code/images in my project and it seems to solve the problem.
Thanks anyway
from swiftmessages.
You can probably work around the issue by copying the .nib file into your project and removing or changing the image referenced by the image view.
I copied the CardView.xib in my project, but I'm not sure I get the "change the image referenced by the image view" part. Do I have to copy all the xcassets in my project as well?
EDIT: Do you mean to only clear the errorIcon image input field?
from swiftmessages.
Do I have to copy all the xcassets in my project as well?
My suggestion is don't use any resources in the framework bundle if you want to avoid crashes on jailbroken devices. The MessageView.configureTheme()
method specifically loads images from the framework bundle, so don't use it. Just configure the image view directly using message.imageView?.image = ...
and copy any images you want out of the framework into the main bundle.
from swiftmessages.
@wtmoose I see! Well, I made a release today with the CardView.xib in my project, but didn't copy any images. we'll see how it goes! Icons were showing up correctly, but I can't test it on a JB device..
from swiftmessages.
Aw. Sorry it took me so long to reply
from swiftmessages.
@wtmoose No worries, open source does not pay the house :)
You confirm I should be safe with the nib in my project (i cleared the UIImageView image) without the images? From what I see, icons are showing correctly and no crash.
from swiftmessages.
I think it will probably crash if you're still calling IconStyle.image(theme : Theme)
because this ends up trying to load an image from the framework bundle.
from swiftmessages.
@wtmoose Just to confirm, you mean crash on a JB device, correct? Because it doesn't crash on a non JB device, with the xib in my projects and the image loaded from the framework bundle.
Thanks!
from swiftmessages.
@allaire I haven't personally witnessed a crash on a non-jailbroken device, so yes.
I'm interested in trying a potential workaround: move images out of asset catalog and switching from pdf to png. If I made that change on a branch, would you be willing to ship that version at some point?
from swiftmessages.
@wtmoose I only use pdfs as well. I'll report back if I see any crash with the nib in the project (but without the icons/pdfs). I only have 2-3 crashing users, all JB.
from swiftmessages.
same problem on Jailbreak device,how to resolve ?
from swiftmessages.
@crossle workarounds are discussed in this ticket. To summarize, if you're concerned about jailbroken phones, don't use any resources in the SwiftMessages framework. Copy anything you want to use into your project.
from swiftmessages.
I came across this tickets on the CocoaPods library, which seems potentially relevant:
from swiftmessages.
Hey I got the same issue after updating Google Maps Pod from version 2.2.0 to version 2.5.0.
I finally changed Google Maps Pod version back to 2.2.0 and everything went back to normal.
I guess there was a conflict somewhere with this Theme enum but I didn't have time to focus on that, sorry. I saw this PR #35 and I think this could fix your issues.
Hope this will help 🙌
from swiftmessages.
Here's the crash report: http://crashes.to/s/b56939d1ae3.
The crash message was also Could not load the "errorIcon" image referenced from a nib in the bundle with identifier "org.cocoapods.SwiftMessages"
from swiftmessages.
@victor-sarda I can't see how a Theme
enum namespace clash would have anything to do with this since the code wouldn't compile.
See the active discussion in #128 as we've identified a fix.
from swiftmessages.
Oh, cool I didn't see the last comments, good news so!
from swiftmessages.
Just got the same crash recently for a user on my app.
I did the workaround to avoid the crash and have the image.
But there is a quickfix to avoid the crash. Just remove the force unwrap
public var image: UIImage? {
return UIImage(named: rawValue, in: Bundle.sm_frameworkBundle(), compatibleWith: nil)
}
It's better to have no icon than a crash for jailbroken users
from swiftmessages.
@Mycose it is fixed on the head of the develop branch. Always get the icon. No crash.
from swiftmessages.
@wtmoose oh okay cool !
from swiftmessages.
@wtmoose Should I close this then? I'll try to cut a release with the master branch and see how it goes 😄
from swiftmessages.
@allaire No. I'll close it when I release 4.0.1, which should be in the next few days.
from swiftmessages.
Should be fixed in 4.1.0 (though I can't verify). Reopen if you continue to see an issue.
from swiftmessages.
I am still designing all my alerts using SwiftMessages, and almost all my alerts are custom xib files (made from CardView.xib), is this issue isolated to the default theme based alerts only? Just want to confirm? Or has this been resolved?
from swiftmessages.
Related Issues (20)
- Signing for "SwiftMessages-SwiftMessages" requires a development team HOT 2
- Cannot find type 'WindowScene' in scope HOT 5
- SwiftMessages disable buttons tap event when show with presented view HOT 3
- How to send swift email
- Message view is not showing sometimes after update of '9.0.6' HOT 16
- Crash during animation HOT 2
- Can you add a function to display priority based on weight? HOT 5
- Identifiable collision HOT 1
- No such module 'SwiftMessages' HOT 2
- Crash while clicking two times to hide the presenting controller HOT 3
- SwiftUI View ignoresSafeArea HOT 4
- SwiftMessages custom CenteredView extends to the screen's full height HOT 3
- How can I show multiple alert? HOT 2
- Safe area insets are not respected when setting overrideUserInterfaceStyle on a MessageView in iOS 17 HOT 3
- How do I show a message that appears above the keyboard, when the keyboard is already visible? HOT 5
- Xcode warnings in two swift files HOT 2
- window being accessed from background thread when dequeueNext is called HOT 12
- EventListeners not called ? HOT 5
- Support for SwiftUI Mac OS HOT 1
- SwiftUI message shown under navigation bar is clipped at top HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swiftmessages.