swift - Xcode builds app correctly, but unable to launch? -


I'm running 10.10 with Xcode 6.1.

And I'm having trouble getting an app. I was written to work, after a few hours and hours, I finally accidentally messed up with something to make it properly Got it, but now I'm getting an error, I do not have permission to view the file (if I open directly in Xcode) or if I try to open it, it tells the searcher that the app is damaged or corrupted and opencan not be done. If it means that it is written in Swift.

I have really spent 6 hours on this (just trying to make it) so that any help would be appreciated! Austen

Anyone needs to take a look if Xcode workspace, project, files, and a build:

There are many problems here I can not help you with all of them, but I can keep you on the right track.

The app will not launch because it was not created correctly. In particular, no actual binary executable is manufactured. APP You can choose it by right-clicking on server checker.app and selecting package contents . Contains a content folder; In that open it should be a folder called MacOS , in which your actual binary will be executable. But it's not there. It's not really an app at all.

The reason for this is that you have a custom build rule for fast files that are not compiling them at all. Delete it, you do not need it.

In Xcode, click on the top-level item of the project (this server chalker says something like 1 target, OS X SDK 10.10). After that, under Targets, select ServerCafe. Click Build rule, the thing that uses the "Swift source file script" says, that we do not need it, click a little X in the upper-right corner, and then click Delete. Try again now.

You will get an error:

  Undefined symbols for architecture x86_64: "_main", referenced from: built-in access to the main executable / start  

Since you do not have a main .Swift file, your app does not have a main entry point. In Swift, you will either need to provide the NSApplicationMain function (usually in the main), or you can declare your app representative as a NSAPplighty management, which will be included in the NASAPPlaymentMan Calling is the effect of I recommend the latter.

Open AppDelegate.swift, and add @NSApplicationMain to your AppDelegate class. It should look like:

  @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate {...}  

Now your app should be recreated again. Right-click there to verify that there is actually an executable binary and show package contents

The app will still not work It appears that someone on the launch An error occurs that no library can be loaded.

Hope that helps you move forward, anyway. I really need to work back now. :)


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -