Note that there are some explanatory texts on larger screens.

plurals
  1. POPossible bundle problems - Cannot create an NSPersistentStoreCoordinator with a nil model
    primarykey
    data
    text
    <p>I want to integrate the <a href="http://www.aviary.com/ios-documentation" rel="nofollow">Aviary SDK</a> Objective-C library into Monotouch project. I use 'Monotouch Binding Project' template for this. I have built the DLL (Thanks smart people!) The project is compiled and run on the simulator.</p> <p>However I can NOT show the main Aviary view and the following code</p> <pre><code> this.afPhotoEditor = new AFPhotoEditorController(UIImage.FromFile("Images/site.jpg")); AFDelegate afDelegate = new AFDelegate(this); this.afPhotoEditor.Delegate = afDelegate; this.PresentModalViewController(this.afPhotoEditor, true); </code></pre> <p>returns the error:</p> <pre><code>Unhandled Exception: MonoTouch.Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInvalidArgumentException Reason: Cannot create an NSPersistentStoreCoordinator with a nil model at (wrapper managed-to-native) MonoTouch.ObjCRuntime.Messaging:void_objc_msgSendSuper_IntPtr_bool (intptr,intptr,intptr,bool) at MonoTouch.UIKit.UIViewController.PresentModalViewController (MonoTouch.UIKit.UIViewController modalViewController, Boolean animated) [0x00038] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIViewController.g.cs:261 at TestAviary.FirstViewController.&lt;ViewDidLoad&gt;m__0 (System.Object , System.EventArgs ) [0x00028] in /Users/mahmood1/Projects/AviaryBinding/TestAviary/FirstViewController.cs:61 at MonoTouch.UIKit.UIControlEventProxy.Activated () [0x00000] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIControl.cs:30 at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr) at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00042] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:29 at TestAviary.Application.Main (System.String[] args) [0x00000] in /Users/mahmood1/Projects/AviaryBinding/TestAviary/Main.cs:17 [ERROR] FATAL UNHANDLED EXCEPTION: MonoTouch.Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInvalidArgumentException Reason: Cannot create an NSPersistentStoreCoordinator with a nil model at (wrapper managed-to-native) MonoTouch.ObjCRuntime.Messaging:void_objc_msgSendSuper_IntPtr_bool (intptr,intptr,intptr,bool) at MonoTouch.UIKit.UIViewController.PresentModalViewController (MonoTouch.UIKit.UIViewController modalViewController, Boolean animated) [0x00038] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIViewController.g.cs:261 at TestAviary.FirstViewController.&lt;ViewDidLoad&gt;m__0 (System.Object , System.EventArgs ) [0x00028] in /Users/mahmood1/Projects/AviaryBinding/TestAviary/FirstViewController.cs:61 at MonoTouch.UIKit.UIControlEventProxy.Activated () [0x00000] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIControl.cs:30 at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr) at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00042] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:29 at TestAviary.Application.Main (System.String[] args) [0x00000] in /Users/mahmood1/Projects/AviaryBinding/TestAviary/Main.cs:17 </code></pre> <p>It seems this error (<strong>Cannot create an NSPersistentStoreCoordinator with a nil model</strong>) is linked with resource bundle what Aviary SDK requires to add.</p> <p>From <a href="http://www.aviary.com/ios-documentation" rel="nofollow">Aviary iOS Setup Guide</a>:</p> <blockquote> <pre><code>4. Copy resources Make sure AviarySDKResources.bundle is included in your target's "Copy Bundle Resources" build phase. </code></pre> </blockquote> <p>So I added this bundle via 'Add Existing Folder..' menu item in MonoDevelop.</p> <p><a href="http://www.axifile.com/en/71EC96914A" rel="nofollow"><strong>Sources are placed here >>></strong></a> <a href="http://www.axifile.com/en/71EC96914A" rel="nofollow">http://www.axifile.com/en/71EC96914A</a></p> <p>It includes 2 projects:</p> <ul> <li>AviaryBinding (MonoTouch Binding Project)</li> <li>TestAviary </li> </ul> <p>Thank you!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload