remirobert / Dotzu

:iphone::eyes: In-App iOS Debugging Tool With Enhanced Logging, Networking Info, Crash reporting And More.
MIT License
1.8k stars 142 forks source link

[COCOAPODS] Dotzu added, black circle & crashes #2

Closed edasque closed 7 years ago

edasque commented 7 years ago

Hi,

I added Dotzu (0.1) via CocoaPods & inserted Dotzu.sharedManager.displayWindow() to the AppDelegate didFinishLaunchingWithOptions method. A black disc appears when running the app on a device and clicking it causes an immediate crash (or at least, it goes back to the Springboard).

Error follows. It seems to be missing a storyboard, maybe something that's not included in the CocoaPod? Bonne chance.


2017-02-04 18:24:00.204 MobileNZB[12734:376722] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Could not find a storyboard named 'Manager' in bundle NSBundle </Users/ed/Library/Developer/CoreSimulator/Devices/29CB8703-06DF-41BC-B233-9484356CDA49/data/Containers/Bundle/Application/C46F1471-E990-4BA7-85D5-ACF4BD54F913/MobileNZB.app> (loaded)'
*** First throw call stack:
(
    0   CoreFoundation                      0x0000000109d4ad4b __exceptionPreprocess + 171
    1   libobjc.A.dylib                     0x00000001097ac21e objc_exception_throw + 48
    2   UIKit                               0x00000001081f299f -[UIStoryboard name] + 0
    3   Dotzu                               0x0000000107247d05 _TTOFCSo12UIStoryboardCfT4nameSS6bundleGSqCSo6Bundle__S_ + 85
    4   Dotzu                               0x000000010724d3e2 _TFC5Dotzu21ManagerViewController12didTapButtonfT_T_ + 194
    5   Dotzu                               0x000000010724f7ef _TTWC5Dotzu21ManagerViewControllerS_19LogHeadViewDelegateS_FS1_12didTapButtonfT_T_ + 63
    6   Dotzu                               0x00000001072378eb _TFC5Dotzu11LogHeadView3tapfT_T_ + 123
    7   Dotzu                               0x0000000107237932 _TToFC5Dotzu11LogHeadView3tapfT_T_ + 34
    8   UIKit                               0x0000000107f61409 -[UIGestureRecognizerTarget _sendActionWithGestureRecognizer:] + 57
    9   UIKit                               0x0000000107f691a8 _UIGestureRecognizerSendTargetActions + 109
    10  UIKit                               0x0000000107f66c77 _UIGestureRecognizerSendActions + 227
    11  UIKit                               0x0000000107f65f03 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] + 891
    12  UIKit                               0x0000000107f51f7e _UIGestureEnvironmentUpdate + 1395
    13  UIKit                               0x0000000107f519c3 -[UIGestureEnvironment _deliverEvent:toGestureRecognizers:usingBlock:] + 521
    14  UIKit                               0x0000000107f50ba6 -[UIGestureEnvironment _updateGesturesForEvent:window:] + 286
    15  UIKit                               0x0000000107a96c1d -[UIWindow sendEvent:] + 3989
    16  UIKit                               0x0000000107a439ab -[UIApplication sendEvent:] + 371
    17  UIKit                               0x000000010823072d __dispatchPreprocessedEventFromEventQueue + 3248
    18  UIKit                               0x0000000108229463 __handleEventQueue + 4879
    19  CoreFoundation                      0x0000000109cef761 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    20  CoreFoundation                      0x0000000109cd498c __CFRunLoopDoSources0 + 556
    21  CoreFoundation                      0x0000000109cd3e76 __CFRunLoopRun + 918
    22  CoreFoundation                      0x0000000109cd3884 CFRunLoopRunSpecific + 420
    23  GraphicsServices                    0x000000010ff3aa6f GSEventRunModal + 161
    24  UIKit                               0x0000000107a25c68 UIApplicationMain + 159
    25  MobileNZB                           0x0000000106d2c97f main + 111
    26  libdyld.dylib                       0x000000010ab7268d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) ```
remirobert commented 7 years ago

I have an issue with the storyboards, xibs, and xcassets

edasque commented 7 years ago

Explique?

remirobert commented 7 years ago

With cocoapods, I need to add this static resources in a bundle. I have try several things without success for the moment.

I added this line to my podspec :

s.resource_bundles = { 'Dotzu' => ['Dotzu/*.xcassets', 'Dotzu/*.storyboard', 'Dotzu/*.xib'] }

On the pods I can see the different files. But impossible to call them programmatically.

edasque commented 7 years ago

Maybe https://github.com/Cosmo/TinyConsole does something similar?

remirobert commented 7 years ago

No the framework doesn't have any storyboards of images. It's probably a very bad idea to had storyboards, xibs, and images in a framework.

But what if you have to ? For example can create a framework with specific UI and assets you can share between your apps.

remirobert commented 7 years ago

Fixed with the version 0.6. Thanks again for reporting the issue.