AppCode + swift - no code completion and no quick documentation - ios

Do anyone know how to enable code completion and quick documentation in AppCode(3.1.1) for swift?
I have updated Xcode I've downloaded documentation in Xcode preferences.
I set correct path to Xcode in my AppCode but still I got no support in AppCode regarding to completion and quick documentation.
This support is in XCode but I am java dev so for me better thing is to use Jetbrains tool instead of using Apple one.
Project that I've opened in AppCode was created in XCode.
I've downloaded this documentation in XCode.
I've searched a lot in the net but there are only slogans about features of AppCode
can do that this, is doing this and that
Only one thing related to path to XCode I found in this property
but none of those I can see... I believe that I haven't enabled it yet.
For me AppCode is more user friently tool because like I said I am used to Intellij for Java development and I am trying to use this tool because it is quicker for me to work with sth that I've used to than sth that is completly new for me(conceptually - XCode).
Do you have any advices about that?

I asked my quesetion to AppCode support. They responded:
Rafal, Your configuration seems correct. Please see comments
below: 1) regarding code completion in Swift - we have part of work
done in that area, and part of tasks still in progress. Can you share
a code snippet where you experience issues with completion? 2)
regarding quick documentation - this feature is not yet ready for
Swift. You can track its progress here.
This mean that I can not expect from AppCode features that was advertised in terms of swift language.

Related

MITM attack reported on deprecated NSURLConnectionDelegate

I have an Objective-C project whose .ipa was tested with this tool online: https://www.immuniweb.com/mobile
It reports that my app has a high risk security issue, pointing to the canAuthenticateAgainstProtectionSpace in the NSURLConnectionDelegate protocol.
This method has been deprecated by iOS after 8.0 version. My app is not using it directly anywhere and I suppose this is not used by apple also even indirectly, since it is deprecated.
I tried a sample ipa (new project with nothing in it) with Objective-C project and the same issue came for that as well. But it did not come for a sample ipa which supported Swift. Even if this is just a warning, is there a way to fix other than just supporting Swift language only?
The tool has detected that the .h file that defines the NSURLConnectionDelegate protocol declares the canAuthenticateAgainstProtectionSpace function. This is, of course, to be expected.
It would make more sense for the tool to report implementations of the method, not simply declarations of it
Since you haven’t implemented this method you don’t need to worry about flaws in your implementation.
As for getting rid of the issue...Don’t use the tool? It doesn’t seem very good based on this.
Is there an option to tell it not to scan .h files?
TBH it seems like a bug in the tool if not any of your Libraries or Frameworks internally uses that.
In your test for the sample Objective C project it's reported as bug however for a sample swift project it's not reported Hence I guess it's more of bug from the tool side.
I would suggest you to report this issue to them.Hopefully they will get you back with some suggestions.
or
you can try some other pen-testing tools as well.

How Do You Debug Swift PlaygroundBook?

While I'm exploring Playground Book sample code, like this one, I find it to be very tedious to get the code to run because of Playground Book's limitations in where the code can run: only on iPad's Swift Playground.
There is no way to debug the "Sources" / Auxiliary code in iOS's Swift Playground, since all the source files are shown in un-editable plain text. You have to open the source files in Xcode to edit them, but then you can't compile or run them!
This is especially tedious for the sample code above, which uses PlaygroundValue, a persistence API that requires Playground Book format, so I still couldn't get the code to run by separating all source code into a separate Playground file to run on the Mac.
Since the sample code above is outdated, I find it to be near impossible to debug it right and get the code to run. You'd have to:
Deploy the code on iPad. Run the Book.
See many error messages on iPad.
Go back to Xcode on Mac and debug them one by one, manually.
Deploy the code on iPad again to run. Repeat the process.
Even after all the errors are resolved, you can still be faced with cryptic "Problem Running Playground" without any further concrete explanation.
What's your workflow to productively debug and deploy code with Playground Book? Current workflow seems impractical to me I think there must be a better way, but I'm not familiar enough with Playground Book and my online research doesn't yield any reasonable workarounds.
From a bug report / suggestion I sent to Apple, I got the following reply:
We’ve actually built tools to help debug the auxilliary sources and we did a presentation at WWDC 2018 that demonstrates it. Please view the presentation and get access to the tools here: https://developer.apple.com/videos/play/wwdc2018/413/
Upon further research, I found that they have recently released a Playgrounds Author Template:
The Swift Playgrounds Author Template is a starter Xcode project that will help you create, debug, and produce a Playground book. Using the template you can step through the code for your live view as if it were an app so that you can identify bugs more easily and develop an efficient workflow for developing your Playground books.
This template, requiring Swift 4.1 to run, includes three different targets:
PlaygroundBook
Book_Sources
LiveViewTestApp
You can use the LiveViewTestApp to fully debug your Playground Book right on your Mac with Xcode.
I am not aware of any possibility that does not require you to test the Playground on an actual iPad.
Anyway, you can make developing Swift Playgrounds less tedious by
Using iCloud to synchronize your mac version with the iPad.
Embedding your Playground in an Xcode project as described in one of my previous answers. That way, you can at least achieve autocompletion during development.
Linking your source files to another target, so that compile errors can be caught before running the Playground.
Anyway, you will still encounter mysterious "Problem Running Playground" errors from time to time

Can't see debug info Xcode 6.4?

I think I've accidentally removed some kind of setting or something on a project level. In project A I can see debug info, but in project B I can't see a damn thing while debugging. Local variables can't be expanded to see what they contain, and neither variabels located in self.
As stated earlier, it works fine in one project, but not at all in another. I have no idea what I've done, or how to solve it. I asked around with a few coworkers and none has experienced this before. Kind of need to fix this in order to work efficiently.
Here is a screenshot displaying what I mean:
I don't have any variables in self here, but if I add some or store some, it doesn't work anyway. I can't see anything in self since I can't expand it at all.
Help appreciated!
I found the solution for this. Or rather I found the issue. The issue seems to be with either Xcode 6.4 and above, or GoogleMaps in general. When importing GoogleMaps SDK the debugger stops working properly. Simple as that. Comment out your import of GoogleMaps SDK and the debugger will be back to normal.
Another way of solving this is to bridge GoogleMaps SDK from ObjC to Swift rather than importing it in Swift. I didn't try this, but I saw this as a possible solution here: https://code.google.com/p/gmaps-api-issues/issues/detail?id=8524
Hope it helps someone. Took me days to find this information.

How to share code style between Xcode and AppCode?

We want to start to use AppCode in my team but we want to use same code style between Xcode and AppCode (we're already using Uncrustify on Xcode).
Does someone have experience sharing code styles between Xcode and AppCode? Any tip?
That was exact my problem one year ago.
There is ticket for AppCode to allow uncrustify import.
I ended up with solution that took me one day. Unfortunately uncrustify doesn't have documentation. As well categorisation of formatting in uncrustify is different from AppCode. I made uncrustify config as close as possible for AppCode formatting settings. I didn't succeed 100% but amount of difference is quite small (and still annoying). All configs ended up on wiki and in repository.
Finally all in our team (me and my buddy) are using AppCode and quite rare open Xcode. That was main fix for formatting.

How to make plugin for Xcode6

I want to make plugin for Xcode6 but i don't know how to start and make that.Any one please share any link that explains this in detail for Xcode 6? I find for Xcode 4 but that method is not working for xcode6
I am the creator of IntelliPaste for Xcode.
Plugin development for Xcode is fun but will also be hard at times. There is no documentation that can be found, at least not from Apple. A lot is guess work and look at how other people's plugins are made.
To get started, I would recommend using this template. I haven't used it myself but I wished something like that was around when I got started.

Resources