I want to change the default behavior of XCode (4) for aligning brackets from this:
- (BOOL)someValue {
return _someValue;
}
To this:
- (BOOL)someValue
{
return _someValue;
}
I've reviewed the docs here:
http://developer.apple.com/library/ios/#documentation/DeveloperTools/Reference/XcodeUserDefaultRef/100-Xcode_User_Defaults/UserDefaultRef.html#//apple_ref/doc/uid/TP40005535-CH3-SW57
But I still dont' understand how to make the change. Any help?
First off, the documentation you referred to is for XCode 3.1 (I've linked the introduction page which says so clearly). Judging by the number of comments on devforums.apple.com about this, I think the XCCodeSenseFormattingOptions key no longer exists under the new XCode4 defaults (which are stored under bundle ID com.apple.dt.XCode). If you want this particular feature restored, file a bug with Apple.
Secondly, you might be able to do what you're looking for by modifying templates. I discovered this very related question, but there's no tacit confirmation there that the suggestion actually succeeded.
You could try using an application called Snippet Edit that allows you to easily edit all of the supplied code snippets. You will need to be using Xcode v4.3 or later though if you wish to use it.
The application can be found at http://cocoaholic.com/snippet_edit/
Related
I'm working on a Visual Studio Code extension, where some settings are required for it to work properly. Right now, in case the user has forgotten something, I'm showing a warning message indicating this, and telling them to fix this property in the settings. I would, however, like to add a button that opens the settings page of that property.
However, after looking around for over an hour, I can't seem to find any support for this in the Api, or anyone else asking this question (which I find a bit weird?). If it really doesn't exist, I'd still expect at least 1 other person asking this somewhere, but as far as I can see there's absolutely nothing.
Is it possible to open the settings window (preferably even filtering them down to only my extension's properties/the one property that has to be filled in) from code?
Thanks in advance
I found it out myself after digging through the keybinds window. You can use the following to open the settings:
vscode.commands.executeCommand("workbench.action.openSettings2");
I did not, however, find how to pass a search query into it to open a specific place in the settings.
EDIT: You can use openSettings & add the search query as an extra argument to executeCommand. For example - if your property is defined as my.extension.property in package.json, you can use this:
vscode.commands.executeCommand("workbench.action.openSettings", "my.extension.property");
I was not able to find a working example using the new NFCTagReaderSession functionality that has been introduced in iOS 13.
Perhaps some one could post one here.
please have a look at this stackoverflow entry -
it already contains some more infos:
"Missing required entitlement" for NFCTagReaderSession
e.g. after adding the entitlement, and the plist entry, you should focus on a supported polling option like iso 14443
I'm trying out RxBluetoothKit and one of the bullet point features is "Documentation", but the link for that leads to a page which is just a copy of the README with a sidebar saying "Error Parsing Pod Could not find Objective-C Classes."
The README is quite detailed, and the sample code is useful, but an API reference would be nice for the more tricky details. For example, the README has an example with this code:
peripheral.connect()
.flatMap { $0.discoverServices([serviceId]) }
I have no idea what type serviceId is - I presume it's not a string.
All of the documentation is written above the methods so while typing discoverServices in Xcode you should be able to click on method with options key and little popup will come up with formatted documentation. Our doc is formatted by the CocoaDocs - it appears that it has some problems. I'm working on fixing it - here you can find the issue Github issue
And here you could find proper link to documentation: RxBluetoothKit documentation
Now I have some files in the Document folder,and I use [UIDocumentInteractionController interactionControllerWithURL:myFileA]; to get the doc controller and the I use [UIDocumentInteractionController presentOptionsMenuFromRect:inView:animated:]; to present one options sheet.So now I have 2 questions:
[1] How can I give the doc controller more than one File URLs? Is there anyway to achieve this?
[2] I find that the method [UIDocumentInteractionController presentOptionsMenuFromRect:inView:animated:]; works fine in iOS6 or later, but not in iOS5.1. Why?
Hope your answers.Thanks a lot first!
1st question: I don't think you can do that, with that particular API, looking at the documentation.
2nd question: As stated by the documentation,
The options
menu may not be displayed in cases where there are no appropriate
items to include in the menu.
These include files with unknown extensions. iOS6+ however does handdle this well.
I had a similar experience to your problem in [2] while testing presentOptionsMenuFromRect:inView:animated: on iOS 5.1 and 6.0. In iOS 6.0 I got a full menu with apps and other options depending on the file. In iOS 5.1 I had a somewhat different experience than you: I got a menu with only one option.
The solution for me was to use presentOpenInMenuFromRect:inView:animated: instead for iOS 5.0. This at least gave me more than one app to open the document in.
For [1] I agree with the others that this isn't possible as of yet.
In my view.designer.cs my outlets are generated by xcode.
When starting debug I have a null reference exception on my properties when adding bindings, in the code bellow this.SampleText is null.
public override void ViewDidLoad ()
{
base.ViewDidLoad ();
this.AddBindings(
new Dictionary<object, string>()
{
{ this.SampleText, "{'Text':{'Path':'VMText'}}"}
});
}
I noticed the following error in Application's output :
"Application windows are expected to have a root view controller at the end of application launch"
what did I miss ?
It sounds like you might have a more general problem with your iOS setup - possibly some issues with the XIB file synchronisation between xcode and MonoTouch.
Before you try to add the MvvmCross binding take a look at the MonoTouch layer - if this.SampleText is null in the MonoTouch layer then you need to solve that before you can add the MvvmCross binding code.
The MonoTouch soft debugger is an excellent tool to help debug this - and the debug cycle with the simulator is pretty quick - so this often helps solve these problems.
From your partial answer to this question, it does sounds like you were trying to use a XIB in a Dialog based UI - that's probably not going to work - I think MonoTouch.Dialog is always based on a single Table - so it's not expecting a XIB (at least, that's my experience!)
As for "Application windows are expected to have a root view controller at the end of application launch" that sounds more like a general problem in your AppDelegate.cs perhaps. Alternatively it might be a problem in the presenter. Which presenter are you using?
That error message itself has a lot of hits on StackOverflow - e.g. Applications are expected to have a root view controller at the end of application launch - but I'm not sure which of these is appropriate to your case right now.
I must admit everything is not clear for me with iOS and MVVMCross
For coders coming from a C# background I don't think this is unusual - I think the jump from VS on Windows to MonoDevelop on Mac (with a little xcode) is a non-trivial leap. It takes more time to switch from WP to iOS development than it does from WP to Droid - this is the case independent of whether you use MvvmCross - if you are doing MT development you are doing native code, so you do have to take some time to understand iOS a bit (in my experience/opinion!).
For the most part, I've personally written tens of thousands of lines of code, authored hundreds of blog posts and stackoverflow answers, and presented maybe ten sessions on mvvmcross. I've done this across five distinct operating systems, four of which I've learnt as I've coded and all of which I've battled against platform and tooling bugs and idiosyncrasies.
I'll continue to post as much as I can - and continue to operate for 'free'
I do also encourage every user to post and blog about their experience too. In this way I hope knowledge will be generated and shared. To anyone who is reading this, using mvvmcross and learning something about cross platform coding - good or bad - then please do consider sharing that knowledge. For inspiration, check out some of the presentations and blog posts users have written - I try to list them on http://slodge.blogspot.co.uk/p/mvvmcross-quicklist.html. Thanks :)
Also, when asking questions, please can you indicate which version of mvvmcross you are using and which sample(s) you're basing your code on - there are differences between master and vNext and there have been fixes over time - so posting this info will help me try to understand and/or replicate the errors you are seeing.
Thanks :)
I know this is a little old, but I was just having the same issue.
My outlet properties in my View.designer.cs file were null when I attempted to access them when ViewDidLoad was called.
Turned out that my xib file in Visual Studio was no longer set to a Build Action of InterfaceDefinition.
Hopefully, this helps someone else who stumbles upon this issue.