Uploading files to the iPhone?

Is there anything in Unity that will allow me to move a file to the iPhone? I have a way to do it without Unity, but since I’m using unity and it prevents me from linking in my own code I need a solution and I don’t see one in the documentation.

No, Unity doesn’t provide you with a way to move files on to your iPhone (even Unity can’t do that, we rely on XCode for the build-and-install process). Look at doing this in XCode and including assets as part of your overall application build.

Hi HiggyB. I already have the functionality I need from CocoaHTTPServer which is an open source project. Uploading content to the phone is a requirement for me. Is there no way to have plugins in the advanced version of Unity iPhone? I assumed that Unity would at least let me open a socket and pipe bytes to the phone and persist that as a file in my Documents folder on the phone, but I can’t do that since I don’t have access to the underlying network implementation Cocoa classes.

Moving content to the phone is a simple matter of moving bytes around - we can’t do this?

Perhaps more care with language is needed here. :stuck_out_tongue: When you use the phrase “upload”, my brain immediately went to the notion of you wanting to “upload” content from your local computer on to the iPhone. What it now seems you’re after is to download content from a server somewhere on to the iPhone at run-time in your content. In that case you can use either the WWW class (Basic or Advanced) or .NET sockets (Advanced only, but for now there are some issues waiting to be fixed in the next update).

Separately we are most definitely planning on including support for custom Objective-C code in your XCode project for folks to implement various extensions and customizations on their own. Look for that in a future update (free udpate) to our existing product.

This touches on the very next thing I need to ask about.

Is there a tutorial or doc that covers how objects created in the Unity IDE for iPhone are communicated with and between other objects problematically?

For example I have created a GUI Texture name ‘Title’ with a default image named ‘appTitle’. How do I find that object and then act upon it from inside XCode?

Up to this point I’ve been able to do everything in my demo from inside the IDE to make things really rock I need to do code level customization.

You don’t. We don’t yet have a clear bi-directional communication layer between XCode and your Unity iPhone content. We are planning on adding support for custom Objective-C code in your XCode project and to expose that code to your scripting as well as some ability for that code to probe the scene a bit.

In the enhancement pack, I have been able to create bitmaps in obj-c, save them to a file in the app’s sandbox directory, and the pass that filename to Unity for loading and display on an object. (http://forum.unity3d.com/viewtopic.php?t=18614) But I’m not sure about going the other direction. You may have to wait for the next release to add those features to your game.

We don’t yet have a clear bi-directional communication >layer between XCode and your Unity iPhone content.

Look forward to the enhancement. In the meantime, your statement seems to indicate there is some kind of communications possible, even if it is only one way.

What does exist, if anything?

See Rob’s post. There are some abilities, but they’re not well documented as they’re not in a “ready for public consumption” state (translation: I don’t have specifics nor docs available to reference as none of this is quite yet a “released feature”).

His pack is next on my list of things to buy.