views:

1540

answers:

2

Hi all,

I am working on a universal app, I used UISplitViewController in doing iPad application. I followed the Universal app guidelines i.e, i keep base SDK as 3.2, iPhone Target OS ad iPhone OS 3.1.3, Taget device as iPhone/iPad. And i used "Adding Runtime Checks for Newer Symbols" for UISplitViewController and UIPopOverController.

Class splitVCClass = NSClassFromString(@"UISplitViewController");

if (splitVC)

{

   UISplitViewController* mySplitViewController = [[splitVCClass alloc] init];

   // Configure the split view controller.

}

I used this in .m files I declared UIPopOverController in .h files also

"dyld: Symbol not found: _OBJC_CLASS_$_UIPopoverController Referenced from: /var/mobile/Applications/9E0CE75F-D2A9-4132-AE56-1780928BCF21/UniversalTasks.app/UniversalTasks Expected in: /System/Library/Frameworks/UIKit.framework/UIKit in /var/mobile/Applications/9E0CE75F-D2A9-4132-AE56-1780928BCF21/UniversalTasks.app/UniversalTasks"

What i have to do can any one help me out

+7  A: 

I am not entirely sure, but maybe this can help:

Class classPopoverController = NSClassFromString(@"UIPopoverController");
if (classPopoverController)
{
  id popover = [[classPopoverController alloc] initWithContentViewController:imgPicker];

  [popover presentPopoverFromRect:CGRectMake(0, 0, popoverParent.frame.size.width, 80) 
    inView:popoverParent permittedArrowDirections:(1UL << 0) animated:YES];
}

Basically you need to replace "UIPopoverController *" with "id", because this symbol is not defined in earlier SDK.

Gnawer
A: 

The correct answer is here: http://stackoverflow.com/questions/3001374/symbol-not-found-objc-class-uipopovercontroller

First you must take the original poster's implicit instructions: move all your iPad-only code (popovers etc) into iPad subclasses etc. Then follow the final answer.

SG1