Can we share controll file in an univarsal (iPhone, iPad) Application?
I developed a univarsal application,(iPhone, iPad). But later I tried to make them sepret, so i copied my folder in another directory and then linked my iPhone's control file with iPad's XIBs, and delegated them with Outlets, (my controll file remained in the iPhone folder, i just link them in iPad), after it i removed iPhone XIBs from this folder.
Now my project is working properly, BUT only if I execute the iPhone version first(even from that different directory), and then execute my iPad version, coz it share's the build file of iPhone.
But when I try to execute it Initially (after deleting prior installed version from simulator), it doesn't work, as it terminate after throwing following exception.
2011-04-23 10:56:01.831 Tuscany[1837:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSURL initFileURLWithPath:]: nil string parameter'
*** Call stack at first throw:
(
0 CoreFoundation 0x01683be9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x014785c2 objc_exception_throw + 47
2 CoreFoundation 0x0163c628 +[NSException raise:format:arguments:] + 136
3 CoreFoundation 0x0163c59a +[NSException raise:format:] + 58
4 Foundation 0x000d6b12 -[NSURL(NSURL) initFileURLWithPath:] + 90
5 Foundation 0x000d6aa0 +[NSURL(NSURL) fileURLWithPath:] + 72
6 Tuscany 0x0003572c -[SplashScreenViewController readyPlayer] + 77
7 Tuscany 0x00035a62 -[SplashScreenViewController viewDidLoad] + 296
8 UIKit 0x003e865e -[UIViewController view] + 179
9 UIKit 0x0035e026 -[UIWindow addRootViewControllerViewIfPossible] + 51
10 UIKit 0x0035d511 -[UIWindow _setHidden:forced:] + 303
11 UIKit 0x0035d301 -[UIWindow _orderFrontWithoutMakingKey] + 50
12 UIKit 0x0a2ac110 -[UIWindowAccessibility(SafeCategory) _orderFrontWithoutMakingKey] + 56
13 UIKit 0x0035bfb5 -[UIWindow makeKeyAndVisible] + 39
14 Tuscany 0x00003205 -[AppDelegate_iPad application:didFinishLaunchingWithOptions:] + 1472
15 UIKit 0x0033b1fa -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1163
16 UIKit 0x0033d55e -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 439
17 开发者_StackOverflow中文版UIKit 0x00347db2 -[UIApplication handleEvent:withNewEvent:] + 1533
18 UIKit 0x00340202 -[UIApplication sendEvent:] + 71
19 UIKit 0x00345732 _UIApplicationHandleEvent + 7576
20 GraphicsServices 0x01ce3a36 PurpleEventCallback + 1550
21 CoreFoundation 0x01665064 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
22 CoreFoundation 0x015c56f7 __CFRunLoopDoSource1 + 215
23 CoreFoundation 0x015c2983 __CFRunLoopRun + 979
24 CoreFoundation 0x015c2240 CFRunLoopRunSpecific + 208
25 CoreFoundation 0x015c2161 CFRunLoopRunInMode + 97
26 UIKit 0x0033cfa8 -[UIApplication _run] + 636
27 UIKit 0x0034942e UIApplicationMain + 1160
28 Tuscany 0x00002b30 main + 102
29 Tuscany 0x00002ac1 start + 53
)
terminate called after throwing an instance of 'NSException'
here to mention i have worked hard with the line i'm establishing connection, and as i told same code run properly when I execute iPhone version first and then the iPad.
so please guied me with this,
thank you
What it says.
In the readyPlayer method you are trying to give a nil value to the fileUrlWithPath method.
You need to check why the path is nil.
精彩评论