I really need to see the xml of the plist in monodevelop or in xcode.
Currently the plist file doesn't appear in xcode only in monodevelop and i cant find a way to edit the xml directly.
As a general rant monodev is great but why have this gui editing of xml at all when probably one key reason why people are avoiding xcode is because of its insistence of this obfuscation.
Thanks for any pointers
It might work depending on what software you have installed.
E.g. from MonoDevelop I can right click on my Info.plist, select Open With and choose Dashcode.app.
This works (for me) because I still have my old Xcode 4.2 installed (on OSX Lion) and that ships with dashcode as a separate .app.
AFAIK MonoDevelop queries the operating system for any application that can open .plist files. So if you have an application that can read them (or XML) you should be able to create this association (using Finder) and have MonoDevelop open it.
Anyway you should fill a bug report (enhancement) on MonoDevelop so it can open those .plist files using it's own XML editor.
Related
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
I want to create a Safari Extension Companion, but the option to create a Safari extension doesn't appear.
What is the right way to create an extension?
To create a Safari app extension, you add a new target to an existing project in Xcode. — mentioned in the documentation.
Launch Xcode and open an existing project containing an OS X application, or create a new one.
Create a new target by choosing File > New > Target.
In the New Target sheet, look in the sidebar on the left and select OS X Application Extension.
From the list of templates on the right, select Safari Extension and click Next.
Enter a Product Name for your extension, such as “My Extension.”
Make sure that your application project is selected in the Project menu, and that your OS X application target is selected in the Embed
in Application menu.
Click Finish.
When Xcode asks you if you want to activate a new scheme for your new extension, click the Cancel button.
Xcode adds a new group into your project, which contains several new files, including an Info.plist file, a variety of supporting source files, an Interface Builder file, a JavaScript file, and a toolbar image PDF.
* There might be a few more steps, although I'm pretty sure you can handle it...
↳ Add a Safari App Extension Target in Xcode
The easiest way is to just install Xcode 7 side-by-side with Xcode 8 - this works fine - and load your project in 7. Create the extension companion target, but don't do anything with it yet. Close Xcode 7 and open Xcode 8 to the same project/workspace, and you'll see the companion. If you use Swift you'll need to modernize the language (Xcode 7 uses Swift 2, Xcode 8 uses Swift 3); the IDE will suggest some of the changes directly when you try to compile but others you may need to change by hand.
Alternatively / more awkwardly, you can create a new target (such as a Safari Extension) in Xcode 8, and then delete the extraneous files (such as JavaScript for content injection) and edit/replace the plist in the extension to the plist of an extension companion. The key property is <string>com.apple.Safari.extension-companion</string> for the NSExtensionPointIdentifier; also make sure that the NSExtensionPrincipalClass implements the extension companion protocol (both of these keys are under NSExtension).
Please be aware that I've had mixed results with this approach. Sometimes it works, sometimes Safari pretends it can't see the extension companion at all, sometimes the extension can't see the companion until you re-load it and then it can... If you can see the extension companion, it should work (but note the warning here about if the companion crashes) and I haven't found any logging that helps troubleshoot these issues. Attempting to debug the extension companion using Xcode 8 doesn't work for me either.
I really wish Apple didn't insist so hard on "thinking different" and just supported Native Messaging like every single other modern browser.
I'm currently translating my application (Mac OS X app) into another language. I've done almost all translations, but now I'm stuck on a pretty strange thing:
I have an additional window for the applications settings and translated the GUI elements the same way I did it for the main window. I imported the translations into my project which seemed to work fine because I can use the preview windows, switch the language of the assistant editor to German and see that the dialog will be localized correctly.
But as soon as I run my application (with "German" as language) and open the settings dialog the whole dialog is still in English (the base language).
The settings dialog's XIB file is located in the base.lproj folder and the corresponding .strings file is located in the de.lproj folder (which should be correct as the preview shows the correct translations).
I don't know what's going on and have no clue what might be the issue.
Does someone have any clue?
I'm using Xcode 6.1.1
I found the reason for this issue: Localizing the settings dialog forced Xcode to move it into the Base.lproj folder. But instead of moving the file Xcode just copied it into that folder - so the XIB file for the dialog existed twice and Cocoa used the old one (which was not localized).
After cleaning the build directory and deleting the derived data for the project the localization works fine now.
I've been trying to set my application's icon following the directions here:
http://qt-project.org/doc/qt-5/appicon.html
If I understand correctly, the process should be fairly simple:
Create an icon file (FlySightViewer.icns) using iconutil. I followed the directions here: https://stackoverflow.com/a/20703594/443822.
Add ICON = FlySightViewer.icns to the .pro file.
However, when I follow these steps, the icon remains the default Qt application icon. I've tried deleting the app bundle and build folder, since I've read that these are sometimes not rebuilt through the usual process. This doesn't seem to resolve the issue.
Looking a bit deeper, when I run qmake from Qt Creator, the generated Makefile contains several instances of FlySightViewer.icns, including this line:
#$(COPY_FILE) ../flysight-viewer-qt/src/FlySightViewer.icns FlySightViewer.app/Contents/Resources/FlySightViewer.icns
The file ../flysight-viewer-qt/src/FlySightViewer.icns seems to be right where I expect it to be. However, when I build the project and look inside the app bundle, the icon is nowhere to be found. The only thing in the Resources folder is empty.lproj.
So it seems to me that the icon isn't appearing as expected because it is not being copied to the app bundle, but I have no idea why that might be.
Any help would be appreciated. I realize this is a fairly common question, but none of the answers I've found here seems to have helped.
Thanks for your time!
Add this line into .pro file:
QMAKE_INFO_PLIST = Info.plist
Then create the .plist and set the icon name there. I won't paste an example .plist because it's quite large, but you can see how it's done by right-clicking a random app and selecting "show package contents".
With older versions of Qt, I settled on changing the icon manually. However, the most recent version of Qt (or macdeployqt) seems to have fixed the problem, so I no longer need to set the icon manually.
This should be an easy one, but surprisingly I could not find any information about it being or not being possible to do.
I have some .xib files created in older versions of Xcode/Interface Builder and I would like to use Xcode 4.4's new features but so far I've only been able to achieve this by deleting the older .xib files and creating new ones from scratch.
You may need to update the older xib files' development target. Select the xib file from the project navigator and open the file inspector. In the file inspector's Interface Builder Document section is a Development menu. Try updating the development target to Xcode 4.4 and see if that allows you to take advantage of the new Xcode 4.4 features.
If updating the development target doesn't work, you'll have to provide some more information about the problems you're having and the features you haven't been able to access.