How to access SVN through Mac OSX application - macos

I would like to access SVN through a new application I am building for Mac OS X platform, using native cocoa libraries. I believe, I need to invoke the SVN command-line application through NSTask, to run it in the background. I have two problems here
How to pass credentials to SVN?
How to check the status of SVN operation?
Any pointers will be of great help.

You should read the documentation and use Subversion's API to build your application.

Related

Creating a Mac OS application installer from .Net Core project

I am completely new to Mac OS and I have an application written in .Net Core codebase. Now all I want is to get it installed on Mac OS machines. My question is how can I create an installer (.DMG) file? At the moment My Visual Studio on Windows has created a .dll file with all other dependencies in the folder. Also for now most of the configuration values I have hard-coded but in the release build it has to be chosen by an end-user. So how can I prompt them for required directories? If you can provide me a link for documentation tool or any kind of suggestion would be greatly appreciated. At the moment if I want to run my application on Mac I have to use Terminal and then dotnet myApplication.dll in order to run application. My end goal would be to ask user for all required file paths and at the end create a System level Daemon (similar to windows service) to keep it always Alive. Would Xcode help in this situation? I already tried to open my .Net core project using xcode but it failed to load saying unsupported proect type.
Thanking in advance for your help!
If you wanted to use the standard macOS Installer to distribute your .net Core app, you would need to create a .pkg file. There seem to be ways to do this on the console or with Third Party Tools
sudo pkgbuild -install-location /Applications -component /path/to/your/application ./Desktop/YourPackage.pkg
There is an older manpage for pkgbuild, or you can try running man pkgbuild on your Mac.
I haven't tried this, but creating a .pkg is the normal way to install stuff on a Mac for applications where you can't just drag/drop the .app into the Application folder. (macOS applications are actually Directories with a special structure)
A .DMG is just a disk image - it doesn't "do" anything, it's just a container for files. You can create one with Disk Utility.

Subversion client for Diff/Compare (Mac)

I'm looking for a (free) subversion client that gives a complete DIFF/Compare between two revisions. Xcode's Source Control comparison tool only compares one file at a time, and doesn't give you a list of files updated between two revisions.
I tried to use svnX, but i'm unable to configure it with my local repository using:
svn+ssh://username#server-machine.local/Users/Path/subversion/ProjectName/
Any suggestions regarding an appropriate subversion client, and/or how to make svnX to work?
The best tool that I have found is subclipse. It is an add on for eclipse but you can use it to manage your repository as well.
Collabnet also offers a product called Collabnet Destktop that includes the subclipse client.
One major caveat is that you have to install the JavaHL library. Make sure to read the OS specific directions!
You might have to play with it a bit but the repository browser is very powerful.
I use svnX in Mac OS 10.7.5, You can download svnX for Max OS X here.
There are some server they provide free/private Space for subversion. I used this free/private space from Assembla
Here is screenShot that shows how to setup svnX in Mac OS X.
In working copy you can see difference in revision. svnX uses fileMerge to show difference. Its one of the best subversion client for mac os x.

Windows authentication / SSO on using XCode on a Mac OS X machine to Subversion on Windows Server 2008

I have been tasked to come up with a code repository to host our Objective-C code for in-house developed iOS apps. While we do have an existing Microsoft TFS instance, the available solutions to bridge TFS with XCode such as SVNBridge and Team Explorer Everywhere are a bit cumbersome and "hackish" for our requirements.
I'm recommending to use Subversion, but we are mainly a Microsoft house and use Windows authentication/SSO/Kerberos for our authentication requirements. My questions are as follows:
Does SVN support these authentication protocols?
Obviously we need to use Mac OS X/XCode for development - while Mac OS X can support windows domain authentication, how will this work if we need to integrate the authentication with SVN, using SSO?
Thanks in advance!
Doing some further research, I was able to find my own answers and also went further as to create a working proof-of-concept.
Does SVN support these authentication protocols?
From what I learned SVN can support Windows authentication by running SVN within Apache and using the SSPI modules to interact with your windows domain controller. These links were very helpful:
Version Control Using SVN + Apache
http://geekswithblogs.net/flanakin/archive/2005/08/31/51743.aspx
Obviously we need to use Mac OS X/XCode for development - while Mac OS X can support windows domain authentication, how will this work if we need to integrate the authentication with SVN, using SSO?
What's not clear to me here is what Xcode uses to authenticate to SVN - the Mac credentials OR the credentials entered when using svn in the command line. One thing i noticed is that Xcode will not work / connect or authenticate with SVN unless you do a checkout in the command line. I'm assuming Xcode uses these credentials in a way. Once a checkout has been performed and Xcode restarted, I am able to connect to my repositories without a hitch. There is also no need to enter the credentials in the username and password fields of your repository in Organizer.
It is important to note that what happens in the client side (Xcode and svn command-line) in terms of authentication is it's still Basic Auth, so your credentials are sent through the wire in clear base64 encoded text. SSL/TLS should be implemented to circumvent this risk.

Mac compiler on windows

Is it possible to develop cross-platform application on Windows and can also compile for Mac OS X from Windows? I have checked Qt but that requires one to compile from Mac using Xcode.
If this is your priority then one option would be Java as at least a jar file built on one platform can be run on another.
If however you're talking about C or C++...
If you are creating a small command line tool then you might be able to make this work with gcc and a cross compiler, but I think it would be a lot of work.
If however you are wanting to create a GUI application I would urge you to give up now. There are so many issues - you'd have to use Carbon or Cocoa APIs which you can't build for on any other platform, you'd have to link against frameworks which won't exist on your compilation host, you won't be able to easily generate .plist files. Qt won't help as you need to be able to build it, which relies on these same frameworks.
In short, there's no alternative to building on an actual mac.
Furthermore, when it comes to fixing bugs, you will absolutely have to do this on a mac (either physical or virtual).
From what I know , in general you do need a mac to make the executable , even for a simple ansi c program you need gcc for mac.
You can create MacPorts Portfile.(If your application is open source)
A MacPorts port is a set of specifications contained in a Portfile
that defines an application, its characteristics, and any files or
special instructions required to install it. This allows you to use a
single command to tell MacPorts to automatically download, compile,
and install applications and libraries.
Take a look at IMCROSS.
IMCROSS is a simple, scripted method of installing cross-compilers and
cross-compiled libraries on a Linux (or possibly other *nix) system,
so that you can develop programs targeted to run on Microsoft Windows
and Mac OS X at the same time and in the same environment as you
develop Linux versions of those programs.
You can certainly do this using Real Studio. It can create Mac OS X applications on Windows without any trouble.
It cross-compiles for Windows, OS X and Linux. And it does it from any platform. It also can create web apps.
Sounds like you should check it out.

Mutliplatform application: (Automated) Testing for Mac OSX howto?

I have a firefox based application(ff extension) that is supposedly/allegedly working on Mac OSX too. I wish to make the application formally supported in Mac OSX. For that, I need to incorporate automated tests in the build process specific to Mac OSX.
With ubiquitous availability of Windows and Linux as cloud offering, executing automated tests for these platforms is easy. Not so with Mac OSX.
Any suggestions on how to go about the (light) automated testing for Mac OSX?
[PS:I have come across MediaTemple's OSX cloud in private beta. No luck for me in getting an invite.]
I don't know what kind of testing you'd like to perform, but why don't you install OS X on VMWare and test within the virtual machine? See this SO question if that is an option for you:
https://stackoverflow.com/questions/39159/is-it-possible-to-run-osx-in-a-virtual-machine
Maybe a combination of Selenium(www.seleniumhq.org) and Sikuli (http://sikuli.org/) would work for you?
Selenium to drive anything web based in FireFox and Sikuli to do all the rest. The tools work all fine together with Java API support. Both tools platform independent.
Cheers,
Stefan
I don't know what test you are trying to automate, but if it is command line based (as the comments seem to suggest it is php code under test), then you can install a VM with darwin on it and perform your tests there. Mac OS X being based on darwin should give you similar results. However as I don't know what the test entails there is no guarantee.
You can find the darwin release for Snow Leopard here, 10.5 is here, and 10.4 is here
If it were me, I'd look at Selenium Grid. It should be possible to create a set of Selenium RC tests initially then use Grid to run the tests on your various platforms, including OS X as well as Windows and Linux. I haven't tried it with running tests in the cloud, but that might even be a possibility.

Resources