I have a somewhat frustrating problem with exporting a compiled copy of a Mac App to my desktop and have it run. First some background...
The app contains two referenced subprojects. The first project creates an archive and the second one creates a framework. They are both used by the main project to perform certain functions.
The app runs fine within Xcode. The problem start when I archive it and try to export it to my desktop to see how well it runs on it's own. I use the regular procedures for this but when I try and start the app from my desktop, it won't load. There's a message saying that the dynamic loader can't find the framework object. The part of the error report that looks most helpful says this...
Dyld Error Message:
Library not loaded: #rpath/JXLS.framework/Versions/A/JXLS
Referenced from: /Users/USER/BuntingSimulator.app/Contents/MacOS/Baseball Situation Simulator
Reason: image not found
JXLS does exist but it's definitely not in the exported Mac app bundle. Anybody have any suggestions on where to look or what to look for? My suspicions lay in the value of #rpath and how the subproject is referenced or built within the main project.
Thanks in advance.
This was added in after I got the answer below. In case anyone needs to use this I thought I'd illustrate the changes made to the project as they are a bit obscure...
First, need to add a copy files step into the build phase into the main target. What does that mean?
The detail steps are:
1: click on the main target for the main project
2: select buid phases
3: click on the plus sign to add a build phase
4: will get a pop up box (select New Copy Files Phase)
5: change 'destination' selection to 'frameworks'
6: drag the framework object from the left panel into the name section of the
new copy phase you just created
Second, need to go into the 'build settings' of the framework target and replace #rpath to #executable_path/../Frameworks
If you are doing this for your own use, make sure you copy the JXLS to /System/Library/Frameworks.
Otherwise, look at this answer.
Related
It doesn't work if I try to add multiple pages to UNO SOLUTION. There are a lot of mistakes coming out. Only the UWP project is running. One of the mistakes.
LIST
First create a Page (Uno Platform UWP) then copy the body.
I also fixed the error in the same way.
To fix InitializeComponent error in Uno, you could refer to the following steps that are from the official document.
You could build your project once, close the solution and reopen it. It is also important to note that Uno uses a multi-project structure, for which each project has to be build individually for errors to disapear from the Error List window (notice the Project column values).
In order to clear the Error List window, build the whole solution completely once. Thereafter, build a specific project and prefer the use of the Output tool window (in the menu View -> Output), taking build messages by order of appearance.
I have recently finished building a mini-app using IntelliJ IDEA in javaFx. It is my first time using this ide and language, so I am having difficulties manufacturing an exe file. I watched all sorts of youtube videos and different methods.
It does generate an exe file but when I click it, nothing happens.
Any idea?
I do know that with IntelliJ Ultimate edition you can build down with an EXE file.
There are a couple things you need to double check.
First, is that in your project structure under artifacts, you have the "Type:" set to JavaFx Application(which is on the top right of the window).
Secondly, switch to the Java FX tab and make sure Application class is set to your main class.
Thirdly, Select "all" under Native bundle: which is located towards the bottom of the window.
Lastly, Select the Output Layout tab and move all your available elements to output root then click on the module of your application and look at the settings that appear at the bottom. "Make sure that main class setting is in fact the main class to your application.
Side note: make sure you delete your artifacts build folder just to start from a clean slate. Also make sure your Environment variables are set to the system path correctly.
Like many of the prior 'MainStoryboard missing in NSBundle' questions, I've got the same prompt but have found no issue with naming and no issue with if the storyboard exists within an area XCode likes.
All the pointers lead to the same file, I've changed my .plist a good 5 times to make it responsive to the same call as found in Build Stages. Now I'm all kinds of tired of this crap because I just want to program, not debug compiler screw ups.
It happened in an instant and now I've been a day and a half without an interface that works. How should I proceed?
I got the following similar error in XCode 4.3.3:
Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: 'Could not find a storyboard
named 'MainStoryboard'
I fixed it by doing the following:
Make sure your -info.plist has Main story board file based name = MainStoryboard
Right Click on your Story Board file in Xcode and select Delete then References Only
Right Click on your project and select Add Files to [Your Project]
Navigate to the story board file, found in the en.lproj folder in your projects directory and add it
Clean, Recompile and Run and you should find it works.
Got the idea from this SO post: XCode 4.2 MainStoryBoard Not Found
Just as a reference to other first timers like me reading through all the SO questions about missing storyboards:
Don't put ".storyboard" at the end of your file name in your plist file. It should look like this:
Main storyboard file base name: MainStoryBoard
When you create a new *.storyboard file, Xcode (version to date) doesn't automatically add it into your build resources. To fix this you must add the file under "Copy Bundle Resources".
Select the Xcode project icon and navigate to: Targets > Build Phases > Copy Bundle Resources
Click the + button at the bottom to add the storyboard file.
After cleaning my Projekt i have every time this Problem......
My solution is:
move the Main.Storyboard intro trash.
Then "Add Files" select your soryboard, after moving the Main.stpryboard from trash zo your desktop.
and, voila. The Error ist gone.
Considering that there is not too much information about your problem, My best bet would be to go to the package Info, and see if the Main Storyboard is set to whatever your main storyboard is.
As of iOS 9 use just "Main" for storyboard name, worked for me.
Ralph Willgoss's steps didn't work for me. I managed to solve it by copying all the viewcontrollers in the storyboard, deleting it (Move to Trash, not Remove Reference), making a new one (rightclicking the project folder and clicking New File, selecting Storyboard) with the same name as the one I deleted and then pasting the copied contents into it.
This may be a bug report for Adobe, but thought I'd ask here for workarounds...
When I create a new Flex Library Project, a .swc is automatically created in the /bin folder. When I add a new class, the .swc is updated (I can tell by looking at the 'last modified' timestamp of the .swc). When I edit that class, the .swc is also updated. This is all as expected, since Project > Build Automatically is checked.
However, as soon as I paste in other classes, I can no longer update the .swc.
The datestamp does not change, no matter what edits I perform.
Unchecking and re-checking Project>Build Automatically does nothing.
Even worse, Project>Clean deletes the .swc file, and I cannot recreate it!
Is there any way to force Flex Builder to build a .swc?
I figured it out. The classes I pasted into the Library Project had dependencies on other classes that were not present in the project. This caused build errors. Those build errors caused the .swc compile to fail silently.
I didn't notice the build errors in the Problems pane, and Flash Builder didn't notify me that the compilation failed, so I was floundering around looking for answers in the wrong places.
More here:
http://words.transmote.com/wp/20120511/flex-library-project-build-errors/
Please show me how I can add and implement the libPusher library to my Objective-C iOS project
This is my first post on StackOverflow
I've just started working in Objective-C iOS app development for a company that I co-founded with a couple of colleagues. Our first app needs to have the libPusher library implemented in its porject. Right now, I'm at a crossroads completing the following task of adding and implementing it on Xcode 4.2:
Simply copy libPusher-combined.a and the contents of the headers directory into your Xcode project..
Source: http://github.com/lukeredpath/libPusher/wiki/Adding-libPusher-to-your-project
What does it mean by "copy"ing those files, and where should it be copied to? Can anybody who has experience with libPusher give me specific details as a list and source code on how to execute this so I can understand it better? I would truly appreciated any help, it will get our company up and running for us getting our app functioning and ready for reviewing submission to Apple Developer staff. The link I've provided will tell you more on what I'm talking about, if I need to specify anything I'll create a new post. Thanks!
What "copy" means in this context is that you want to drag and drop the .a (library) file and the header files (all the .h files) into your new Xcode project (to be precise: the file inspector is the list of files along the left side of the workspace window).
To copy anything to an Xcode project, find it in the finder, highlight all of the files you want to copy over (or just take the folder it comes in), then drag everything over the Xcode icon in the dock.
If Xcode is full screen (lion), the icon will kind of blink, then enter Mission Control mode, you then hold the files over the correct project and drop them into the Xcode file tree.
Make sure that your application is checked as a target for those files!!
If Xcode is not full screen, just drag the files or folder into the Xcode file tree and they will be added.
To link to a static library, just navigate to the name of your project>Info>Framworks. Click the plus, then select your framework if it isn't already there.