Can the pkgbuild window be made larger? - pkgbuild

Our pkgbuild installer properly shows the "The installation failed." window when an error occurs. But above that headline there appears the smaller Apple text line
"There were errors with the installation. You may want to try"
but the rest is cut off by the window edge. Is there a way to make the pkgbuild window larger so it's not cut off? Or is there another solution?
Thanks!

This is a bug and there is no solution to this as of now. I have also seen this in some of my installers. I investigated and found that it has nothing to do with pkgbuild. pkgbuild is the tool to build the installers (.pkg files).
When you run these .pkg files, these files get open with an app "/System/Library/CoreServices/Installer.app". This is the app that opens the installer window and it has this bug.

Related

Xcode Source Editor option not displayed in Extensions

Is there a way to activate Xcode Source Editor option in System Preferences > Extensions? For some reason, it's not showing on my Mac (the last option).
If the Xcode Source Editor is missing from the left pane (see image above), try one of these solutions before resorting to a reinstallation:
In the Applications folder, rename Xcode and then change the name back to Xcode, or move Xcode.app out of the Applications folder, then back in, as described by this Stack Overflow answer.
Move the Xcode app to the Trash and re-install it from the AppStore.
I install the Xcode manually that's why not found on Extensions.
To fix quickly:
Quit Xcode
Rename Xcode in the applications folder temporarily with any name.
Launch renamed Xcode
Quit Xcode
Name it back to the old value ("Xcode")
Go back to Extention you will find the Xcode
The entry is shown if the system detects that both Xcode and at least one Xcode extension is installed. Yet the code to detect Xcode has a few issues.
If you install Xcode first and don't have an extension, the entry is not shown. If you then install an extension, the system re-checks if Xcode is still installed and if yes, it should add the entry. However, the check code will fail in some situations. E.g. if you renamed Xcode.app to something like Xcode_13.4.app (as you need to manage different versions of Xcode), the detection code may not find it. It also may not find it if you moved Xcode to a different location outside of /Applications. And even if not renamed and still in the default location, the detection code sometimes fails and the exact reason why that happens is unknown (it may have issues with certain ownership, certain file permissions, case-sensitive file systems, etc.)
In all these situations, renaming Xcode causes it to be re-detected by the system and then the system sees that Xcode and at least an extension is installed and the entry appears immediately. No need to reboot or start the renamed Xcode; you rename it, you rename it back, and the entry is there and will stay there (even after deleting all extensions, it stayed on my system).
If you first installed any app with an extension and then Xcode, the problem does never appear as in that case you immediately trigger the rename-fix above, because the moment you install Xcode, the system will always detect it correctly (regardless how the app is named or where it is located or any other issue the scan code might have) and detecting Xcode and knowing there is an extension, the menu entry appears at once. The code that detects Xcode extensions seems to always work correctly.
This is probably one of the issues where the Xcode detection code has not been tested very well by the Apple but since it seems to work for the vast majority of users, Apple sees no reason to further investigate why it would sometimes fail.
It will get activated by default if any plugin are added in Xcode.
You have to download XcodeClangFormat plugin from GitHub and follow the installation steps. Then Xcode Source Editor will be visible automatically.
Please refer this link

Xcode project crashes after .png file is added

I am building a simple Swift based project in Xcode 9.2. I would like to import a .png image file into my project, to display within my app. I attempt to do this by dragging a .png file into the Xcode Navigator. A dialog box appears, asking me to "Choose options for adding these files:". I select the "Copy items if needed" box, I select the "Create groups" radio button, and then I press "Finish".
The .png file now appears in my project, however my project no longer builds. Instead of "Build Succeeded", I get "Build Failed". The only change is adding the .png file.
The "Build Failed" message says that I have a "Code Sign Error". Clicking on this message, I get the following additional detail:
Debug/FourBarVisualizer.app: resource fork, Finder information, or similar detritus not allowed
Command /usr/bin/codesign failed with exit code 1
Deleting the .png file fixes the problem.
Adding .txt files or .jpg files the same way doesn't cause any problems.
Any help or insight would be greatly appreciated. I'd prefer not to have to convert all my .png files to .jpg. Am I doing something wrong, or is this an Xcode bug? Thanks.
I can't be certain this applies in your case, but I just suffered the identical problem and was all ready to blame the recent Xcode 9.3 update, but StackOverflow suggested your question as being similar to the one I was in the process of writing.
I was just about to use ImageMagick to convert the PNG to another PNG in the hope of removing whatever upsets Xcode and I noticed that it had the hide extension attribute set. Unchecking that (before adding to the project) fixes things for me.
Having discovered that, I can now see what the additional text in the error was getting at ("resource fork, Finder information, or similar detritus not allowed"), even if it wasn't quite enough to guide me immediately to the solution.

How do you add an icon to a OSX console app with XCode 6?

I give up, I can't figure it out. I'm new to mac, and this is driving me insane.
The steps outlined here are not sufficient:
https://developer.apple.com/library/mac/recipes/xcode_help-image_catalog-1.0/chapters/AddingIconSets2.html
The result: the blocky "exec" icon.
What else do I need to do? The .xcassets files I created have been added to the "Copy Bundle Resources" build phase. However, the executable isn't any larger.
I also created an .icns file, and I was never able to get that to work either. I think these are deprecated?

How to build screen saver in Xcode 4?

I'm making an OSX screen saver in Xcode (Objective-C, ScreenSaverView class, etc.), and it runs within Xcode correctly. When I navigate to the build output folder and double-click on the the .saver file, it opens System Preferences/Desktop & Screen Saver and asks if I want to install it. All correct.
But when I email the .saver file to myself and open it, System Preferences opens but not to Desktop & Screen Saver and no option to install it is presented. I think it may have to do with the fact that when I build it (with, as far as I can tell, build settings specifying "Release" instead of "Debug"), the output file is still in /Users/Me/Library/Developer/Xcode/DerivedData/ScreenSaver/Build/Products/Debug/ rather than a release folder.
What am I missing here? I have very little experience with configuring build settings, compiler flags, etc.
Edit:
For what it's worth, it seems to work if I compress the output .saver file as a .zip and email that instead. Not a great solution though.
As described in the comment above, apparently it's being built correctly; email messes up binary file attachments so to have it work correctly it should be encoded (e.g. by zipping it) before attaching.

.app file not get install using package installer

I have created a package installer using Xcode's PackageMaker. I want to install a .app file into the applications folder, but when i am running installer package, it's showing that the software is installed succesfully. When i checked the applications folder, the application i m installing is not there. Can anybody help me to solve this?
While the Installer is still running you can select the Window menu and choose the Installer Log option. In the Installer Log dialog select the 'Show All Logs' from the drop down control. This might help you determine where the Installer put your .app or what happened.
BTW I'm seeing the same thing with a .pkg I have written and would love to hear if you find a solution.
I ended up getting things working with my .pkg by making it install into /Applications/ with the trailing slash. I had previously been just using /Applications. Maybe that works for your package?
The issue is that the installer can upgrade packages even if their not located in /Applications. So if there is an application with the same name or it already exists on your hard drive it will try and install over that. To fix it click on the item your trying to install in the content pane then click on the components tab and make sure the "allow relocation" check box is unchecked. Should work perfect after that

Resources