Hello,
In an effort to use the IGCalendarView in the app I'm currently developing, I installed NUCLiOS 2016 Volume 1 using the .dmg file that's been made available through this website.
The installation path of NUCLiOS is "/Developer/Infragistics/NUCLiOS 2016 Volume 1".
Next, I opened up the SamplesBrowser example project that is part of the NUCLiOS installation using XCode 7.3 (7D175). After successfully building the project, it ran just fine on an iPad simulator.
I then created an empty sample project to which I tried adding the IG.framework (Target -> Build Phases -> Link Binary With Libraries -> Add -> pick IG.framework) and #importing the IG.h header file. That didn't work, as XCode complained it couldn't find IG.h (or any IG header file for that matter). In an attempt to solve this problem, I provided some entries for the settings section Project -> Build Settings -> Search Paths:
However, XCode continues to claim it cannot find IG.h, which is something I cannot get my head around.. Are my project settings somehow incomplete or incorrect? I uploaded the empty test project I mentioned above to Dropbox (link: https://www.dropbox.com/s/v8tq4fdrubadwkb/IGTest.zip?dl=0). Can someone of the NUCLiOS dev team take a look at this project and tell me why the header files cannot be found?
Thanks in advance.
Hi Ingos,
Without looking at your test project I see that the Framework Search Path needs changed to, "/Developer/Infragistics/NUCLiOS 2016 Volume 1/Framework". As this is where the frameworks are stored. Also, you can remove that Header Search Path, as Xcode knows where to look for headers from the Framework Search Path.
Thanks for your reply, Torrey.
You are correct: I simply had to change the Framework Search Path to "/Developer/Infragistics/NUCLiOS 2016 Volume 1/Framework" to enable XCode to find the header files. However, the test project now fails upon execution after throwing the following exception: 'NSInvalidArgumentException, reason: -[UIView setDelegate:]: unrecognized selector sent to instance'.
As you can witness in the test project I have linked to in the first post of this thread, there's an IGCalendarView instance which is instanced by linking it to the Main.storyboard via an IBOutlet. In the viewDidLoad: method of the ViewController I set the delegate of that instanced IGCalendarView to 'self', causing the mentioned exception to be thrown.
For the sake of completeness, here's the call stack:
2016-06-02 15:04:32.744 IGTest[65553:2567367] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView setDelegate:]: unrecognized selector sent to instance 0x79833490'
*** First throw call stack:
(
0 CoreFoundation 0x025a8494 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x00539e02 objc_exception_throw + 50
2 CoreFoundation 0x025b2253 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x024e789d ___forwarding___ + 1037
4 CoreFoundation 0x024e746e _CF_forwarding_prep_0 + 14
5 IGTest 0x00063112 -[ViewController viewDidLoad] + 130
6 UIKit 0x00b0fb72 -[UIViewController _sendViewDidLoadWithAppearanceProxyObjectTaggingEnabled] + 44
7 UIKit 0x00b14692 -[UIViewController loadViewIfRequired] + 1384
8 UIKit 0x00b14ab1 -[UIViewController view] + 35
9 UIKit 0x009c2340 -[UIWindow addRootViewControllerViewIfPossible] + 69
10 UIKit 0x009c2a5d -[UIWindow _setHidden:forced:] + 304
11 UIKit 0x009c2e13 -[UIWindow _orderFrontWithoutMakingKey] + 49
12 UIKit 0x009d6551 -[UIWindow makeKeyAndVisible] + 80
13 UIKit 0x0093a7ef -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4190
14 UIKit 0x00941f0f -[UIApplication _runWithMainScene:transitionContext:completion:] + 2010
15 UIKit 0x00967b2c __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke3246 + 68
16 UIKit 0x0093eb8a -[UIApplication workspaceDidEndTransaction:] + 163
17 FrontBoardServices 0x037e6110 __37-[FBSWorkspace clientEndTransaction:]_block_invoke_2 + 71
18 FrontBoardServices 0x037e5be7 __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 54
19 FrontBoardServices 0x0380327f __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 23
20 FrontBoardServices 0x038030ab -[FBSSerialQueue _performNext] + 174
21 FrontBoardServices 0x038034fa -[FBSSerialQueue _performNextFromRunLoopSource] + 52
22 FrontBoardServices 0x038027e8 FBSSerialQueueRunLoopSourceHandler + 33
23 CoreFoundation 0x024bae5f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
24 CoreFoundation 0x024b0aeb __CFRunLoopDoSources0 + 523
25 CoreFoundation 0x024aff08 __CFRunLoopRun + 1032
26 CoreFoundation 0x024af846 CFRunLoopRunSpecific + 470
27 CoreFoundation 0x024af65b CFRunLoopRunInMode + 123
28 UIKit 0x0093e2da -[UIApplication _run] + 540
29 UIKit 0x00943eb9 UIApplicationMain + 160
30 IGTest 0x0006359a main + 138
31 libdyld.dylib 0x031a8a25 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Ingos,
To solve this issue, follow this instruction: Select Project > Build Settings > Search: Other Linker Flags > Add: -ObjC -all_load
Adding that linker flag solved my problem. Thanks.