[MonoTouch] Adding Image with BuildAction Content prevents app from starting

bryan costanich b at wowzer.net
Sun Nov 8 17:24:24 EST 2009


That's interesting. Right now, if you add an image to an MT project,  
you can't see it in IB. I wonder if there's something the MT team can  
do to make them visible to IB through the resources folder.

At a minimum, there needs to be some documentation someplace that says  
"don't name your resources folder, 'resources.'" that's the first  
thing I named mine as well.  I didn't get the runtime error, but none  
of my images worked.

-b

On Nov 8, 2009, at 2:01 PM, "Aidan Reel" <aidanreel at gmail.com> wrote:

> Geoff,
>
> Thanks very much for that.
>
> I am porting an existing Obj-C/Xcode based app over to C# and since I
> had my images arranged under resources in Xcode, it felt natural to
> maintain the existing structure.
>
> This may be related to the fact that Xcode and IB use the Resource
> folder as a form of contact point. Any files placed under this folder
> (in xCode)  can be seen in IB's Property editors. If you add say
> background.png in resources than background.png will appear and be
> available for selection in the attribute editor for image related
> fields such as  Image View's image field.
>
> This might be the 'background' for the behaviour you mention.
>
> Regards
>
> Aidan
> On 8 Nov 2009, at 21:42, Geoff Norton wrote:
>
>> I'm replying on-list as well for the sake of everyone and google-
>> ability.
>>
>> Aidan had his images in a Folder called "Resources"
>>
>> Apple (for some reason) doesn't support this, and in fact silently
>> fails with no error code when we install an application with this
>> folder name.
>>
>> -g
>>
>> On 8-Nov-09, at 12:54 PM, Aidan Reel wrote:
>>
>>> Hi
>>> [MT1.2:MD2.2RC]
>>>
>>> Created iphone monotouch project.
>>> Compiled
>>> Run
>>> Simulator kicks off and app appears on desktop.
>>> App starts.
>>> Quit app via home button.
>>> Add folder to project
>>> Add existing files to folder (some pngs).
>>> selected one png and set Build Action in Properties to Content.
>>> Clean build
>>> Compile
>>> Run
>>>
>>> Simulator:  app  is deleted but not replaced with new version.
>>> App does not start.
>>>
>>> select same png file and reset Build Action in Properties back to
>>> Content.
>>> clean build
>>> compile
>>> Run
>>> App starts up.
>>>
>>> MD shows Build successful in tag line and Application Output tab is
>>> brought forward.
>>>
>>> Any one else have this behaviour?
>>>
>>> Regards
>>>
>>> Aidan
>>> _______________________________________________
>>> MonoTouch mailing list
>>> MonoTouch at lists.ximian.com
>>> http://lists.ximian.com/mailman/listinfo/monotouch
>>
>
> _______________________________________________
> MonoTouch mailing list
> MonoTouch at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monotouch


More information about the MonoTouch mailing list