XIB doesn't open when app launches in mac application - macos

I am a newbie in Mac development as I am trying for the first time to port my iPhone app on mac.
This might look a silly question to all experienced developers but please be fair with me as I don't know much about Mac programming.
I started a new project on mac and it was all good.The application was opening and I could see the window opened.
As I wanted to implement a movie player I followed Simple Movie Player Tutorial by Apple and after that tried to open the app.Now when app launches I can't see window of the application.I need to open a video from File menu which makes the application window to appear.I want the window to appear right at the app launch!
Please help as all my search got in vain and I strongly feel that this is the right place to get the right direction.
Thanks!

That appears to be the way that particular app works. It requires a movie file. There's no such thing as a new, untitled document for that app. From the bottom of the page you linked to: "When the player launches, you can open and play any QuickTime movie of your choice. Simply locate a .mov file and launch the movie from the File > Open menu in your media player application."
It appears that the recorder application that you will build in later steps of the tutorial opens a window at launch.
One other thing to be aware of: as of Lion, due to the application resume feature, launching an app will not always open a new, untitled document. Lion will try to restore the application to the state it was in when you quit it. Since this tutorial was written before that feature existed, it doesn't have explicit support for it.

Related

How to run Swift Terminal app on another Mac

This is my first Swift app. Most of my coding experience is in C++ and C#, but I’m fairly new at programming.
I made a Terminal app, called PhotoSorter, using Swift. After building it, I pulled the executable out of the product folder in Xcode and ran it. It works great on my own laptop, but when I try to run the executable on another Mac, I get the following error:
“The alias ‘PhotoSorter’ can’t be opened because the original item can’t be found.”
Question: How are you supposed to create a Swift executable in Xcode that can be ran on any other Mac? Ideally, I want something that the end-user can just right-click/double-click to open.
Looking at your question again, I see you're using Xcode. In that case, the best way to distribute your program is to choose "Archive" from the "Product" menu, and when your app is done building, click the "Distribute App" button in the window that appears. Then you can choose your code signature and create a code-signed version of your app (or distribute via the App Store if you're into that sort of thing).
The immediate answer to your question, though, is that you're making an alias instead of copying the file. I assume you've used the mouse to drag and drop out of Xcode's "Products" pseudo-folder. The default action when you do that is to make an alias (which is like a shortcut on Windows). You can override that by holding down the Option key while you drag, but it's better to go the Archive route.

Can't get icon to load on Mac Store from binary

So I tried both the old standby - here:
Attempt 1:
How can I set the icon for a Mac Application in Xcode?
Attempt 2: Also tried the new way, which is filling out the Images.xcassets...
Results: both times in the App Store the icon is greyed out. Both times the art is shown on the Mac binary .app that's placed in my production folder.
Would sure appreciate an answer!!
Ah found the answer... another post had the solution...
Mac app icon not displayed in itunes connect
Looks like iTunes currently has a bug that needs you to submit the app in order to get the icon loaded. no biggie.

After starting an application for the second time, the splash image does not disappear

I am using Worklight v5.0.5 and have created a Worklight Hybrid application; I am running the app on iOS v5.1.1, compiled with Xcode 4.6.
When I execute the application in the iPad from Xcode - the iPad connected with the USB cable to the Mac - the application starts fine, I see the splash screen and then the login page.
If I disconnect the USB cable I'm not able to run the application again. Once I kill the application from the iPad, or stopping it ib Xcode before disconnecting the USB cable, I'm not able to start it again, the application does not go past the splash image.
Similarly, if I generate an .ipa and I install the it via the IBM Worklight Application Center then the first time I start the application it is fine, but if I kill the application (click twice the home button and so on...) then the next time I start the application it won't go past the splash image as well.
Any hint?
I have noticed similar behavior, not the same scenarios as you have described. For me, this helped:
After disconnecting the device from the Mac, I have made sure to exit the app in the same manner you have and to also close the iPad (not shut down, just clicking the power button to close the display) and then try to run the app again. You can also try shutting down the iPad. If that helps, this is not a Worklight issue...
Based on comment #3 to this answer, which revealed the issue at hand:
Once creating an application - for example with the name "newApp". this value, "newApp" is referenced in several locations throughout the project - the HTML filename, in application-descriptor.xml, references to the CSS and JS files of the applications and possibly another one or two references.
Changing this value is not supported. Changing it can indeed cause what is described in this question, and other oddities. Revert the change, and the application will work.

Adobe AIR application GUI not working on Mac OS

We have an Adobe AIR app, which was created by a 3rd party contractor, that we have been using successfully on Windows. The application runs full screen automatically and, for the most part, primarily is chrome for displaying some web pages.
On windows, it works perfectly. Only now, 9 months after development, has someone asked to try to run it on a Mac. We figured it would work since AIR is cross platform. It installs just fine (latest AIR SDK on OSX Lion). When we run the app, it launches but only shows the name of the app next to the Apple symbol in the upper left. No window or other chrome appears on the screen. I can Quit the app from the menu, but not much else.
Any thoughts as to why it's behaving this way on the Mac and not Windows? We do not have access to the original developer, and I am not a Flash/Flex person, but I do have the source and a copy of Flash Builder 4, so I could make basic tweaks. Any pointers would be very appreciated.
Have you tried to call maximize() after creation complete? I had the same problem (main window not showing up on Mac OS, everything is fine on Windows). Hope this helps.

How do I initialize IKImageView?

I am completely stumped with this one: I'm new to Xcode, coming from Windows. I create a brand new Cocoa app, place an IKImageView in Interface Builder, save and launch the app. Xcode shows the app icon bouncing forever, never launching. If I trace into it I get application crash right away.
I've downloaded examples from Apple but I cannot see how they initialize IKImageView, if that's what I'm failing to do. I've been searching for a solution for hours. Help?
The problem is that you are not including the required frameworks that are used by IKImageView. Just follow the instructions that are found in the Image Kit Programming Guide, in particular the section labeled Using the Image Kit in Xcode and you should have no problems.

Resources