4

Every time I run my iPad app through Xcode, I get this error message in the console after didFinishLaunchingWithOptions: returns and before any code is run in my initial viewController class:

Unable to load string table file: CFBundle 0x134518370 </private/var/mobile/Containers/Bundle/Application/3B879FF9-02CD-48A1-A250-7A8613AE84EA/PedRampInv_Management.app> (executable, loaded) / Manage: The operation couldn’t be completed. (Cocoa error 3840.)

My app seems to be running just fine, and no other warnings, errors, or exceptions are thrown. Can anyone tell me how to 'fix' whatever bug is causing this error to appear at launch?? I am going to get this on the Apple app store soon, and want to make sure that this won't be a problem.

wildBillMunson
  • 284
  • 4
  • 11
  • Are you loading any local files in the app? Post some source code, will be easier to troubleshoot. – Yan Dec 01 '14 at 05:31
  • Yes there are a number of files in the bundle, including .png, .pdf, .txt and .sqlite3 files. All files are working as expected. The error I'm getting appears after didFinishLaunchingWithOptions return and before my initial viewController runs any code. As I'm stepping through the underlying code, this is the last line that fires before the error appears: ___UIApplicationExtensionGetAccurateShareServicesExtensionForIdentifier_block_invoke_2 – wildBillMunson Dec 01 '14 at 05:38
  • can you post the exact line of code that gets the error. Are you sure all the files are loading correctly? After doing few online searches seems that error comes from not loading a file correctly. – Yan Dec 01 '14 at 05:43
  • It's happening somewhere in UIKit`-[UIApplication _callInitializationDelegatesForMainScene:transitionContext:]: but this code is all happening underneath my code. There really isn't a 'line' of my code that I can point to. – wildBillMunson Dec 01 '14 at 05:57
  • Does the error show before you load any local files? Also are you loading any JSON files? – Yan Dec 01 '14 at 06:00
  • Sorry can't help much more with out seeing any code. – Yan Dec 01 '14 at 06:09
  • Yeah this one is tricky. Cause it happening "in between the lines" of my code. I think it may be a bug with Xcode. The only local file that has been accessed by this point is the launch image (which is appearing as it should). It seems to suggest it can't load the string table file for myProject.app. This makes no sense, since it's running fine. I'm not using or parsing any JSON files either. Hmmm...it's a mystery. – wildBillMunson Dec 01 '14 at 06:12
  • Have you tried to run it on the device? There is also an option in Xcode under product -> clean that solves some issues – Yan Dec 01 '14 at 06:16
  • Yes I always run my apps on my iPad since they use CoreLocation and other services that simulator doesn't provide. And yes, I tried a clean but that didn't help. Thanks though! – wildBillMunson Dec 01 '14 at 06:18
  • After further investigation, it seems to be happening as the UIWindow property of appDelegate is being set up behind the scenes. I got the error right after -[UIWindow makeKeyAndVisible] was called. – wildBillMunson Dec 01 '14 at 06:29

2 Answers2

6

OK so the problem was that the localizable strings file from my storyboard was empty. All I had to do was turn off the localization (thus removing the file) and turn it back on again, which automatically created a completed localizable strings file. Now my app runs without any errors.

wildBillMunson
  • 284
  • 4
  • 11
0

Same problem may be caused by storyboards outlet with warning (looking to nowhere).

dlobanov
  • 51
  • 5