Xcode: how to create .app from a cocoa project? - objective-c

I have a cocoa project and I would like to create .app package for that. Maybe it's a silly question but I was unable figure it out.

In Xcode, in the menu bar. Product->Archive When that is done it should take you to the Organiser (with the new archive selected), select share, and you can export it to the format you choose.

Have a read of the Xcode 4 User Guide which tells you how to do this for iOS and for Mac OS.
It also tells you a lot of other stuff that you'll find useful as well.

Related

Migrate app to ios11 for Iphone X

I need to update my app and make it look good on the iphone X. I've seen a couple of answers on stackoverflow and on the internet regarding the new safe area option (Use Safe Area Layout Guides).
According to what I've read the app should adapt automatically using autolayout as well but what I've got is this:
If I start a new project it all works fine. The project is quite big, so starting all over again is not an option. What should I do?
Thanks
I just had the same problem, and in my case, the problem was that my app didn't have a Launch Screen.storyboard, it was using a image as launcher. So adding a new Launch Screen.storyboard and selecting that one fixed it, maybe the rest of the app takes some settings from that Launch Screen.storyboard

Xcode 8.3 macOS Project without storyboard

I am trying to find a way to start a project in Xcode 8.3.1 (8E1000a) using .xib files instead of storyboards in Objective-C on macOS.
There isn't a clearcut way to do it, and everything I've seen is iOS using single view storyboard application.
I'm hoping you guys have a fix or at least a quick hack.
Thanks in advance.
A workaround is to keep a copy of Xcode 8.2 around to create new projects. Create the project in 8.2. Develop the project in 8.3.
If you're going to use Xcode 8.3 to create new projects, you'll have to manually remove the storyboard and add xib files to the project. You'll also have to tell the project to use one of your xib files as the main interface file for the project. The following discussion on Apple's developer forums shows you how to do this:
Did Xcode 8.3 update eliminate the basic AppDelegate project template?
Update in 2018: In Xcode 9, the Use Storyboards option is back!
This does not apply to all templates, for example the Game template, but it is in the normal Cocoa App template.
You can't. Basically Xcode is proposing you some templates when you create a new project.
And there are all using Storyboards.
However, you can definitely use xib files in your project.
I myself use xib files because it is so much simpler when your project is under version control.
Storyboard + Version Control = Mess

NSUserNotification don't show application icon in notification [duplicate]

I'm using OSX's Notification Center APIs for the first time and can't seem to figure out how to make my app's icon to show up in the Notification badge.
The default "your app doesn't have an icon" icon keeps showing up:
Here's what I've done so far
I have created an icns file that includes 512, 256, 128, 32 & 16px versions
dragged the icon into the "App Icon" section of the target's summary
I made to sure to check the box to copy the icon into the project
the plist's "Icon file" section references the correct icon name (minus the .icns) part
Any ideas? The icon doesn't show up when I run the app thru Xcode or when I export an archive either.
I also have extracted the Sparrow.icns file from Sparrow.app and tried using that one instead of the one I made. That didn't work either.
I was able to fix this issue by incrementing the Build number in the General section for the build Target.
You can force the Notification Center to refresh all of the icons by deleting the Notification Center database file (~/Library/Application Support/NotificationCenter/SOME_UUID.db) and then killing the Notification Center process (e.g., from Activity Monitor).
Unfortunately this has the side effect of deleting your notification history, but this wasn't too much of an issue for me.
There's actually an ongoing debate on Apple's developer forums (link, link for people with access) about this. As far as I know, there's currently no real solution, but you can try the following:
Change your app's bundle ID and try it again. If you change it, clean your app, and change back, some people have reported success with seeing their icon show up.
Log in as another user. The caching Notification Center uses may be per-user, so you might be able to get the properly-iconned notifications as a different person.
The folder location has been moved for OSX 10.10+.
Following command takes to you to its new location:
$ cd `getconf DARWIN_USER_DIR`/com.apple.notificationcenter/db
and then
$ open .
Easiest way that I managed to get the icon to show up is change the Bundle Identifier in your project. This works on OSX 10.10.5 and XCode 7.2
(Once notification center picks up the change, you can change it back to your original bundle identifier if you already have a provisioning profile associated with it)
I have solved the issue by archiving my app and adding a copy to my applications folder. When the app is in Application folder, the icon is always visible even you run the app from XCode...
I tried all of the above suggestions but the only thing that worked for me on 10.14 was to delete DerivedData:
rm -rf ~/Library/Developer/Xcode/DerivedData
If anyone still having this issue, and none of the methods above worked, here is how I solved it:
open Notifications from the System Preference (easiest is to open Alfred or spotlight and type Notifications)
find your application and remove it (press backspace/delete button)
NOTE: this may remove all notifications
I am using Xcode 11.5 and I had the same problem. In my case tough, it was sufficient to clean build output, close and reopen the project. Then do a fresh build and let it run again. The icon was there afterwards.
Side note: I've placed the app icon for every size in the assets.xcassets file, except 1024 x 1024 pixels. Don't know if this is relevant or not. Hope that helps.

How to create code signing and IPA-file in xcode4.3?

I'm building my first app in xcode4.3 on lion. Now I want to beta-test using testflight. I've looked at the tutorial:
"http://help.testflightapp.com/customer/portal/articles/402782-how-to-create-an-ipa-xcode-4-"
But I get stuck at the 2nd step when I'm about to create an Entitlement. In xcode I don't have the "code signing" alternative in the "IOS" template list and am unable to continue the guide. And all the other tutorials I've found are outdated. I would really appreciate a step-by-step guide that works with xcode4.3.
If you want to find the Entitlements file, you can do like this:
Click your project, then Targets- Summary, at then end you can see 'Enable Entitlements', check it then you can see a new file named yourApp.Entitlements appeared in your project.
That tutorial is outdated, with xcode 4.3 you dont create an ipa and upload with uploader as in that tutorial. Create your app ID, code sign, and you will be asked during the process whether you want to distribute to Appstore or create ipa. Just follow the process and you will be presented with that option towards the end, then you can create your IPA

Location of iTunes/Xcode 4 icons?

I've been looking for the Play icon shared by iTunes and Xcode, plus others and can't find them. This reply seems to apply to Xcode 3 but not Xcode 4.
The image resources are located within private frameworks inside the following folder:
/Xcode4/Library/PrivateFrameworks/
(Note, your path may differ if you chose to install Xcode 4 at the default location, /Developer/).
IDEKit.framework seems to have most of the new UI-related images in vector (PDF) form. There's also XDInterface.framework and DevToolsInterface.framework.
I don't know the exact location, it's not in the Resources folder.
If you only need the play button, use NSToolbar and NSToolbarItem with this PNG.