Search code examples
iosglympse

Glympse API I am not able to run the sendTicket (Glympse Lite API) when compiling against iOS 7.1 base SDK


When I envoke '[GlympseLiteWrapper instance].glympse->sendTicket(_glympseTicket, wizardFlags);'

I am getting a debugger breakpoint (exception) in Thread 1: it seems to originate from +[NSBundle(glympse) liteBundle]_block_invoke

Anyone else having this issue or know how to fix this problem?

Glympse API version: 1.0.5

I have used version 1.0.2 on iOS 6 and iOS 7.0 with success, but this problem seemed to appear when building with Xcode 5.1 against iOS 7.1.

I do have the "-ObjC" flag set.

Note: I originally posted this in the wrong location: https://github.com/Glympse/glympse-app-sdk/issues/1#issuecomment-39362544

Edit #1: (I also tried this using iOS 7.0 base, so now I am not sure what is going on) Here is the full stack trace: Thread 1, Queue : com.apple.main-thread

#0  0x036948b9 in objc_exception_throw ()
#1  0x04d09fbb in +[NSException raise:format:] ()
#2  0x011bd78e in -[NSBundle initWithURL:] ()
#3  0x000bc78c in __31+[NSBundle(glympse) liteBundle]_block_invoke at /Users/egorpushkin/Projects/Glympse/ClientAPI/Cpp/Platforms/iOS/controls/GLYCommon/Categories/NSBundle+glympse.mm:35
#4  0x03a154d0 in _dispatch_client_callout ()
#5  0x03a04e12 in dispatch_once_f ()
#6  0x03a04d55 in dispatch_once ()
#7  0x000bc70d in _dispatch_once(long*, void () block_pointer) [inlined] at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/usr/include/dispatch/once.h:68
#8  0x000bc6f5 in +[NSBundle(glympse) liteBundle] at /Users/egorpushkin/Projects/Glympse/ClientAPI/Cpp/Platforms/iOS/controls/GLYCommon/Categories/NSBundle+glympse.mm:34
#9  0x00115df6 in -[GLYConfiguratorViewerOwner ensureWindowCreated] at /Users/egorpushkin/Projects/Glympse/ClientAPI/Cpp/Platforms/iOS/controls/GLYConfigurator/GLYConfiguratorViewerOwner.mm:113
#10 0x0011625c in -[GLYConfiguratorViewerOwner showSendWizard:ticket:intro:flags:listener:] at /Users/egorpushkin/Projects/Glympse/ClientAPI/Cpp/Platforms/iOS/controls/GLYConfigurator/GLYConfiguratorViewerOwner.mm:166
#11 0x00115b7d in +[GLYConfiguratorViewerOwner showSendWizard:ticket:intro:flags:listener:] at /Users/egorpushkin/Projects/Glympse/ClientAPI/Cpp/Platforms/iOS/controls/GLYConfigurator/GLYConfiguratorViewerOwner.mm:80
#12 0x001192ad in Glympse::ControlsFactory::showSendWizard(Glympse::O<Glympse::IGlympse> const&, Glympse::O<Glympse::ITicket> const&, bool, int, Glympse::O<Glympse::IUiControlListener> const&) at /Users/egorpushkin/Projects/Glympse/ClientAPI/Cpp/Platforms/iOS/controls/GLYCommon/ControlsFactory.mm:23
#13 0x002a41a9 in Glympse::GlympseLite::sendTicket(Glympse::O<Glympse::ITicketLite> const&, int) ()
#14 0x00062b02 in -[LiveDataViewController sendGlympse] at /Users/sgano/Desktop/HotAir_v8.0.2/Classes/LiveDataViewController.mm:2845
#15 0x0005a82c in __40-[LiveDataViewController viewDidAppear:]_block_invoke at /Users/sgano/Desktop/HotAir_v8.0.2/Classes/LiveDataViewController.mm:475
#16 0x03a007b8 in _dispatch_call_block_and_release ()
#17 0x03a154d0 in _dispatch_client_callout ()
#18 0x03a029c6 in _dispatch_after_timer_callback ()
#19 0x03a154d0 in _dispatch_client_callout ()
#20 0x03a0be93 in _dispatch_source_latch_and_call ()
#21 0x03a0643f in _dispatch_source_invoke ()
#22 0x03a036b6 in _dispatch_main_queue_callback_4CF ()
#23 0x04d6f43e in __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ ()
#24 0x04cb05cb in __CFRunLoopRun ()
#25 0x04caf9d3 in CFRunLoopRunSpecific ()
#26 0x04caf7eb in CFRunLoopRunInMode ()
#27 0x04a155ee in GSEventRunModal ()
#28 0x04a1542b in GSEventRun ()
#29 0x01546f9b in UIApplicationMain ()
#30 0x000029df in main at /Users/sgano/Desktop/HotAir_v8.0.2/main.m:14

Solution

  • I believe I have just solved the problem! I needed to add the "GlympseResourcesLite.bundle" to the Copy Bundle Resources area of the Target's Build Phases section. Once I did that it cleared up the exception.

    You may want to add that note (and the -ObjC linker flag requirement) to the Client Integration Guide -- it might help out future devs.

    Note: I got this idea from reading abbood's answer to this question: Objective-C categories in static library