Objective-c mac application - images not displaying on other computers - objective-c

I recently made a mac application using objective-c in xcode, and it works fine on my computer (archiving it as an application through Xcode). But when I move it over to another computer via USB (I moved the .pkg file that I generated through Xcode - this usually works fine) the images do not display.
I checked, and when I right clicked to show the package contents of the application, the correct images were there, with the correct names. I also checked and in the Build Phases page in Xcode, the images were there correctly in the Copy Bundle Resources.
Is this a permission issue? Or is it not recognising the files for some reason?
Just to clarify, this worked on the computer I compiled it on, without extra files. All the images necessary are in the package.
Also, the application was not frozen or lagging in any way I could see or notice, so I do not think it was because of a slow processor.
If this helps, the mac it worked on was a 2013 Macbook Air running OSX 10.9, and the mac where the images did not display was a 2010 iMac running OSX 10.8. The application is able to run on OSX 10.8 normally (The Deployment Target is 10.8).
When I open it on the iMac, the application just shows with the default gray background without any images, only text, buttons etc. (I am using a textured window with:
[NSColor colorWithPatternImage:[NSImage imageNamed:#"backgroundImage.jpg"]]
to have the image, as well as image wells).
Also, I am not sure if this is significant, but I went onto Activity Monitor whilst the application was running without images, and I could not see my application on the list, even with a search. (I don't have too much experience with this, so not sure if this is normal)
Thank you, any help would be appreciated.

Related

nwjs builder won't change my exe icon

I am trying to package my app using nwjs builder and it indeed does get packaged but the problem is with the windows icon. The title bar one works perfectly with a png file with a transparent background, but I spent hours on this and followed instructions but still the windows icon won't change.
This is the "main" command line I'm using: nwb nwbuild -v 0.21.2 -p win64 Desktop/app -o Desktop/app2 --production --with-ffmpeg --win-ico icon.ico
When I run this, it does what it does and the app gets packaged and everything but the application icon is the main/default NW.js one. I even tried using resource hacker and replaced the icon, saved and exited but still. The same NW.js icon.
Is this a problem from windows 10 or something? or maybe the ico image I'm using? I tried several ico generators and tried using different icos but still.
Turns out resource hacker works perfectly but I just needed to move the file to somewhere else (cache reasons). But, the nwjs builder win ico option is still a no go and shouldn't be used since it doesn't get anything done and you'll end up wasting your time. Using resource hacker is very very simple and gets the job done.

Cannot load nib/xib file in Mavericks

We have a Mac application we wrote about 3 years ago. We've been maintaining it through all versions of OS X since Leopard (10.5). It's a 32 bit universal binary and is part of a suite of packages, all compiled and built the same way.
All apps are working under Mavericks except one, and only one part of it is broken. In this "broken" app we have a menu option that allows the user to open up a simple logging window. All this thing is is an NSPanel with a text view in it. When we open it, the spinning beach ball comes up and observing the console, it identifies this program as "hung."
This thing has been working for years. It works on both PPC and Intel from Leopard up through Mountain Lion. I thought for sure there was deprecated code in it somewhere, but I went through it and couldn't find any. There's really not much to it anyway. All it does is open up and spit out text. I then traced through the code and found out the nib wasn't loading.
I have Xcode 3.2.5 installed on this system (it's been upgraded since Snow Leopard) without iPhone support and it seems to work. In any case, I thought I'd take a look at the actual contents and window layout to see if maybe I had some unsupported or dated support, and when I double click on the xib file from Xcode, when Interface Builder opens up, it locks up too. We have I think 5 xib files in this application, so I double clicked on all of them and they all open up properly in Interface Builder. The only one locking up is this one. As a test, I opened the xib up in Xcode 4 and it opened up properly.
We can't really move to Xcode 4 because we have a fair number of clients (about 30%) still using Leopard and Snow Leopard. We typically build in either Lion or Snow Leopard. but haven't had any problems compiling and building under Mountain Lion. This app, and all the other we have will compile and build using Xcode 3.2.5 on the Mavericks system. Everything seems to work except this one xib file.
Has anyone ever encountered something like this? Are we overlooking something? Are there changes to the OS we've overlooked? Is this an OS bug?
If you use Retrospect backup, check whether the NIB files have been caught in a backup on the server.
I have recently found several applications which Retrospect cannot handle backing up the NIB files and does not let go of the NIB files until after the backup job has been stopped.

Have I installed Xcode correctly?

After years of custom in-house programming on AIX and Linux, I am completely new to OS X so I have a few ultra-naive questions that I am sure any Mac developer can answer.
I downloaded Xcode without specifying where it should be installed. The .dmg file showed up in my ~/Downloads directory, a disk image icon appeared on my desktop, and an ejectable device named Xcode showed up in Finder. I opened the desktop icon, saw an icon named Xcode.app, and dragged it to the dock. Clicking that opens the Xcode IDE and I can write and run programs there. Everything looks good so far but I just get the feeling that I have not installed Xcode in a standard way because:
1. The root directory of the machine does not contain the /Developer directory that I was expecting from what I have read.
2. There is no mention of Xcode in /Applications where I see OpenOffice.org.app, Safari.app, TextEdit.app, etc.
3. After a fresh login, when I start Xcode from the dock, an Xcode disk icon appears on the desktop, a folder containing nothing but Xcode.app gets opened, Xcode starts.
Question 1: Am I running Xcode straight out of its downloaded image?
Question 2: If it did get installed, where did it get extracted to?
Question 3: If not, how do I install it properly.
Question 4: How do I get Xcode to show up as an Application or in Launchpad?
Thank you,
Brian
You just need to do following steps to solve this problem :-
1) Whenever you click on xcode icon in the dock, it opens a new window containing xcode.app
2) Drag this xcode.app icon to the "Applications" folder of drive "OSX" on your MAC system.
3) It'll take some time to copy the xcode to the applications folder. Once it is done you'll never face the problem again in future.
Cheers!!!

Xcode 4.2 not running my app after rebuilding MacBook (Snow Leopard)

I recently had the MacBook I'm using to develop an app (for work) rebuilt. Xcode failed to launch and there were a number of issues when running 'verify permissions' on the disk. I copied the project to a USB stick and prepared to have the machine re-imaged. Now I have it back, I've re-installed Xcode, copied my project over and it opens - great. I started some alterations to the storyboard and tried to run it in the simulator, at which point it seems to crash and returns me to the Xcode window, debugger running.
I've tried to step through the 'problems' but I can't find anything wrong. This was a working, simple project (based entirely on a storyboard approach, very little code yet as I've been building an interface that was acceptable) and the storyboard still opens fine, all the segue's seem intact etc. It just won't run. I've tried it on another MacBook (running Lion) and it also failed, complaining about 'NSBundle' and 'MainStoryboard' (I'm sorry, that machine is at home and I don't have the exact message) - yet for all intents and purposes looked fine.
The build settings etc all verify and it builds with no issues. The app is stored in a different location on the disk to where it was originally, so perhaps some of that information is stored somewhere and needs to be reset? I've tried this: XCode 4.2 MainStoryBoard Not Found with no change.
Short of me scrapping this and starting afresh, is there anything I can do/try to salvage it? It's not a huge amount of work (probably a day or so, mainly adding text/images to the views) but I'd like to try and save it, hopefully understand a bit more of what's happened? Short of thinking the drive was corrupted and also corrupted the project somehow before I made the backup I'm at a loss.
Any pointers appreciated!
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Could not find a storyboard named 'MainStoryboard' in bundle NSBundle </Users/appdev/Library/Application Support/iPhone Simulator/5.0/Applications/82547437-7BE3-4960-B755-84E0A999A881/testApp.app> (loaded)'
*** First throw call stack:
(0x13be052 0x154fd0a 0x439352 0x151c9 0x15461 0x147c0 0x23743 0x241f8 0x17aa9 0x12a8fa9 0x13921c5 0x12f7022 0x12f590a 0x12f4db4 0x12f4ccb 0x142a7 0x15a9b 0x208d 0x1ff5)
terminate called throwing an exception(lldb)
The storyboard file doesn't seem to be getting put into your application bundle. Select it in the project navigator in the left-hand panel, and check that there is stick against the target in the file inspector in the right-hand panel.
Also, it sounds like you are not using version control. Use version control! If you had been using version control, you wouldn't have had to worry about moving the files from computer to computer, you could roll back to a working version, and you could easily see what the differences are between the old working version and the new broken version.
check the following settings in the xcode: and make sure to clean before building the app and running.
http://postimage.org/image/nk91mrlt9/
http://postimage.org/image/i3kd4zbqv/

XCode Project not saving all my files?

Alright. This is utterly puzzling.
I am developing a game project with Xcode 4.1.
The project files are always with me in an USB stick, because I am constantly developing the project on many different Macs.
So I come to a workstation, paste a copy of the project in the USB stick to the desktop, and start working on that copy. When I am done developing, I delete the project in the USB stick, and then copy the one in the workstation's desktop back to the USB stick.
For some reason, my file GameData.h and GameData.m are not properly updated. But everything else in the project is. Basically, I made some edits to GameData, and when I got back home, I noticed that GameData is not the same as the one I was editing a while back. In fact, it only has code I wrote yesterday.
What could be wrong? Why is that file the only thing that never gets copied properly?
Check to make sure your GameData.m/.h files are where you think they are. Select one of them in the navigator tree, right click, select Show in Finder. Examine the file it points to - is it in the same directory as it's project peers, does it have correct (writable) permissions, is it an alias to another file, etc.?
Sometimes you can get into trouble (usually with libs) by adding them to the project, but not checking the box that says "copy into destination group's folder if necessary". In this case, XCode tries to find the file in that other directory (which may not be on all of your Mac machines) rather than the directory where all the other project files are.
I have noticed that occasionally xCode either fails to save a file or fails to rebuild after a file has been changed. It seems to happen on some projects and not others (I've noticed it mostly on a desktop app, but never on phone apps). I have no idea why this happens.