Migrating from Classic to Unified API breaks my project

LeileiWuLeileiWu Leilei WuAUMember

My company (MnetMobile) recently migrated an iOS app developed using Xamarin from Classic to Unified API using command “Migrate to Xamarin.iOS Unified API” in project menu. After migrating, we found the app no longer runs on both device and simulator. The app failed to start with the following error message in the console of Xamarin Studio (mac)

Objective-C exception thrown. Name: NSInvalidArgumentException Reason: Could not find a storyboard named 'MainStoryboard_iPad' in bundle NSBundle </Users/leilei.wu/Library/Developer/CoreSimulator/Devices/9F3440A4-34D9-404C-BCE6-E186709DE123/data/Applications/75E2CAA0-2A37-45D1-AA9C-B5C94070A6BA/OneSchooliOS.app> (loaded)

We've checked the project files and we were sure the storyboards the app tried to load were there and were set correctly in the project configuration.
We tried to create a new storyboard and start the app from it, but failed with the same error message.

We were stuck by this problem and wish Xamarin could help us find this problem.

Regards,
Leilei Wu
MnetMobile

Best Answer

Answers

  • JamesMundyJamesMundy James Mundy GBMember

    I've just encountered this as well. Unfortunately using your solution doesn't make any difference and I still receive this error.

    Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInvalidArgumentException Reason: Could not find a storyboard named 'MainStoryboard' in bundle NSBundle </Users/james/Library/Developer/CoreSimulator/Devices/EAB0D69F-919C-47C0-8A04-9901216A4168/data/Containers/Bundle/Application/5CF64101-4FB4-4B2E-A2F2-2272DE0E05B2/Pinpoint.iPhone.app> (loaded)
    at ObjCRuntime.Runtime.ThrowNSException (IntPtr ns_exception) [0x00000] in /Developer/MonoTouch/Source/maccore/src/ObjCRuntime/Runtime.cs:156
    at ObjCRuntime.Runtime.throw_ns_exception (IntPtr exc) [0x00000] in /Developer/MonoTouch/Source/maccore/runtime/Delegates.generated.cs:100
    at at (wrapper native-to-managed) ObjCRuntime.Runtime:throw_ns_exception (intptr)
    at at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
    at UIKit.UIApplication.Main (System.String[] args, IntPtr principal, IntPtr delegate) [0x00005] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:62
    at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:46
    at Pinpoint.iPhone.Application.Main (System.String[] args) [0x00008] in /Users/james/Documents/GitHub/Game/iOS/Pinpoint.iPhone/Pinpoint.iPhone/Main.cs:17

  • DannyNLDannyNL Danny van Luijpen USUniversity ✭✭

    Solution did work for me. @JamesMundy: folder and file are read-only. If you don't grant write access up front, the file will not be saved with the added property...

  • KlasBKlasB KlasBroberg USUniversity ✭✭

    Yey! Solved my problem Thanks!

  • Jorny33Jorny33 Nathan Joraanstad USMember

    This solution did not work for me. I continue to receive the "Could not find a storyboard" error. I have also checked to make sure the Build Action is InterfaceDefinition on my Storyboard.

    Any other ideas? This certainly needs to be fixed within my application. Crashes on start-up every time.

  • LeileiWuLeileiWu Leilei Wu AUMember

    It works for me.

    But you may find you don't have permission to write to
    /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Xamarin.iOS.Common.targets

    My solution for this is:

    1. rename Xamarin.iOS.Common.targets to a different file name
    2. make a copy of this file and name it as Xamarin.iOS.Common.targets.
    3. Change Xamarin.iOS.Common.targets
    4. Restart Xamarin
  • GingerAppGingerApp Cristian Orto ITMember

    Not work For me!!!!

    I tried different solutions but nothing, I'm stuck with a job

Sign In or Register to comment.