Repository: SwiftKickMobile/SwiftMessages

Issue #9: Crash on jailbroken iPod Touch 6G
Created: 2016-09-01T12:34:23Z
Got the following crash:
iPod Touch 6G on 9.3.3
Crashed: com.apple.main-thread
EXC_BREAKPOINT 0x000000010170847c

Crashed: com.apple.main-thread
0  SwiftMessages                  0x10170847c IconStyle.image(theme : Theme) -> UIImage (Theme.swift:37)
1  ios                            0x1000fccdc static MessageManager.showInfo(String, body : String) -> () (MessageManager.swift:71)
2  UIKit                          0x18783d944 -[UIPresentationController transitionDidFinish:] + 1320
3  UIKit                          0x18796e418 -[_UICurrentContextPresentationController transitionDidFinish:] + 44
4  UIKit                          0x187840b3c __56-[UIPresentationController runTransitionForCurrentState]_block_invoke_2 + 188
5  UIKit                          0x187611114 -[_UIViewControllerTransitionContext completeTransition:] + 116
6  UIKit                          0x187610f00 -[UITransitionView notifyDidCompleteTransition:] + 252
7  UIKit                          0x1876109fc -[UITransitionView _didCompleteTransition:] + 1164
8  UIKit                          0x18761055c -[UITransitionView _transitionDidStop:finished:] + 124
9  UIKit                          0x18751bc28 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 312
10 UIKit                          0x18751bab0 -[UIViewAnimationState animationDidStop:finished:] + 108
11 QuartzCore                     0x184e75998 CA::Layer::run_animation_callbacks(void*) + 284
12 libdispatch.dylib              0x181dd547c _dispatch_client_callout + 16
13 libdispatch.dylib              0x181ddab84 _dispatch_main_queue_callback_4CF + 1844
14 CoreFoundation                 0x182340d50 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
15 CoreFoundation                 0x18233ebb8 __CFRunLoopRun + 1628
16 CoreFoundation                 0x182268c50 CFRunLoopRunSpecific + 384
17 GraphicsServices               0x183b50088 GSEventRunModal + 180
18 UIKit                          0x18754a088 UIApplicationMain + 204
19 ios                            0x1000ec280 main (AppDelegate.swift:24)
20 libdyld.dylib                  0x181e068b8 start + 4```

Duplicate issue #59: Crash on calling configureTheme 
Created: 2017-01-19T04:04:02Z
Hey,
I recently saw a crash on Crashlytics, which happens when we call configureTheme method. The logs are pasted below.
The OS is 9.3.3 and the device is iPhone6
`Crashed: com.apple.main-thread
0  SwiftMessages                  0x100f08ff4 _TFO13SwiftMessages9IconStyle5imagefT5themeOS_5Theme_CSo7UIImage + 1864
1  SwiftMessages                  0x100ef24c4 TFC13SwiftMessages11MessageView14configureThemefTOS_5Theme9iconStyleOS_9IconStyle_T + 28
2                         0x1004815a4 specialized static PPNotificationsController.showInAppCustomNotificationWith(title : String, body : String, userInfo : [AnyHashable : Any]?, onTapCompletion : ([AnyHashable : Any]) -> ()?) -> () (PPNotificationsController.swift:223)
3                     0x100481fcc specialized static PPNotificationsController.showLocalNotificationWith(title : String, body : String, badge : Int?, userInfo : [AnyHashable : Any], identifier : String?, application : UIApplication, onTapCompletion : ([AnyHashable : Any]) -> ()?) -> () (PPNotificationsController.swift)
4                    0x100482b30 specialized PPNotificationsController.didReceiveRemoteNotification(with : [AnyHashable : Any], principalController : PPPrincipalController, application : UIApplication, onTapCompletion : ([AnyHashable : Any]) -> ()?) -> () (PPNotificationsController.swift)
5              0x100455d5c specialized AppDelegate.application(UIApplication, didReceiveRemoteNotification : [AnyHashable : Any], fetchCompletionHandler : (UIBackgroundFetchResult) -> ()) -> () (AppDelegate.swift)
6                    0x1004504a4 @objc AppDelegate.application(UIApplication, didReceiveRemoteNotification : [AnyHashable : Any], fetchCompletionHandler : (UIBackgroundFetchResult) -> ()) -> () (AppDelegate.swift)
7  UIKit                          0x1893ee1a8 -[UIApplication _handleNonLaunchSpecificActions:forScene:withTransitionContext:completion:] + 2676
8  UIKit                          0x1893dbf84 -[UIApplication workspace:didReceiveActions:] + 136
9  FrontBoardServices             0x1859777ac FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 36
10 FrontBoardServices             0x185977618 -[FBSSerialQueue _performNext] + 168
11 FrontBoardServices             0x1859779c8 -[FBSSerialQueue _performNextFromRunLoopSource] + 56
12 CoreFoundation                 0x183f8d09c CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 24
13 CoreFoundation                 0x183f8cb30 __CFRunLoopDoSources0 + 540
14 CoreFoundation                 0x183f8a830 __CFRunLoopRun + 724
15 CoreFoundation                 0x183eb4c50 CFRunLoopRunSpecific + 384
16 GraphicsServices               0x18579c088 GSEventRunModal + 180
17 UIKit                          0x18919e088 UIApplicationMain + 204
18 App                        0x1000beff0 main (AppDelegate.swift:15)
19 libdyld.dylib                  0x183a528b8 start + 4`
This is how i'm using SwiftMessages
static func showInAppCustomNotificationWith(title: String, body: String, userInfo: [AnyHashable: Any]?, onTapCompletion: (([AnyHashable: Any]) -> Void)? = nil) {
    `//Show SwiftMessages view here
    
    let view: MessageView
    
    if #available(iOS 9.0, *) {
        view = MessageView.viewFromNib(layout: .CardView)
    } else {
        view = MessageView.viewFromNib(layout: .MessageViewIOS8)
    }        
    
    view.button?.isHidden = true
    view.configureTheme(.info)
    view.iconImageView?.image = UIImage(named: "ic_stat_notify_large")
    view.configureDropShadow()
    view.bodyLabel?.numberOfLines = 2
    view.configureContent(title: title, body: body)
    
    var config = SwiftMessages.Config()
    
    config.presentationContext = .window(windowLevel: UIWindowLevelStatusBar)
    config.presentationStyle = .top
    config.duration = .seconds(seconds: 4)
    
    view.tapHandler = { _ in
        
        if let userInfo = userInfo {
            onTapCompletion?(userInfo)
        }
        
    }
    
    SwiftMessages.show(config: config, view: view)
    
}`

Any ideas as to why this might be happening?
Any help is greatly appreciated.

Closing comment (2017-01-19T10:56:37Z): Your crash log is really hard to read, but this sounds like a duplicate of #9. SwiftMessages is known to crash on jailbroken devices and given that I don't have a jailbroken device to test and nobody has attempted to solve this on their own, I don't have a fix. There is a workaround discussed in #9.