Send data to windows from iphone using Xamarin - ios

I'm trying to write an IOS app using Xamarin that sends data to PC using TCP. I want it to do this with Cable or WiFi. I have been researching around the net for sometime now. But couldn't find any good tutorials. I'am aware that I should be using NSNet and Bonjour Windows SDK but I couldn't find anything more than that. Any suggestions or directions on how to achieve this would be very helpful. Thanks in advance.

If you are using Xamarin then the more preferred choice would be to write things using System.Net.Sockets namespace. This way you can reuse the code with other C# clients, including Android (if needed).
Plenty of examples on TcpClient/TcpServer.
https://msdn.microsoft.com/en-us/library/vstudio/system.net.sockets.tcpclient(v=vs.110).aspx

Related

Add map with list to Form for mobile app?

This is a very basic question, but I have no idea how to be begin, so please bear with me.
I'm a C# software developer, so I'm very familiar with the VS IDE and with Windows and Web development. But I have never developed a mobile application.
With that said, I came up with an idea which is essentially a screen with a map and a bunch of pins, and a list that represents each pin. It will run in an iphone and android phone. It will look something like below.
I decided to develop it in Xamarin because 1) I've worked with VS for many years so I understand how it works, 2) I can develop one app in Xamarin that can run both in ios and android.
I understand that it may be a very basic question, but I have no idea where to start. I also have experience with development, so I don't want to go thru the Hello World example. Finally, I also have a full-time job, so my limited free time would be used to completing this particular app.
So my question is: where do I start?
First thing first. You should get yourself familiar with Mobile Development(app life cycle, patterns etc.) by creating few sample applications (since you stated you were developing in Visual Studio using c# before it should be quick procedure for you). You can find documentation and sample codes on official Xamarin site:
Xamarin Website
Next get yourself familiar with MVVM pattern and MVVM frameworks to write applications using modern patterns and modern practises. I personally recommend MVVMCross or MVVMFresh.
Data Binding from Official site
FreshMVVM with Samples
Then get yourself familiar with Xamarin.Forms maps. It's a nice library that allows you to use one code and share them across 2 platforms. Google Maps official apis are also good but they are platform specific.
Xamarin Forms Maps
Enjoy and welcome to the Dark Side ;)

Native Windows Phone app vs Jquery Mobile + PhoneGap?

I am new to mobile programming, and I want to build a mobile app to fill few forms, offline, and then sync them later, when internet access is available, with a database on an online server through a VPN connection.
At first, I thought about learning Windows8 Phone App development, but then I heard/read about Phonegap and Jquery Mobile! and I am a bit confused which one would be better to use, considering two things:
1- Which one you think would be good for my app's functionality
2- Which tool would be more beneficial on the long run (in the mobile programming world).
Any advice would be very much appreciated.
With these functionality I don't thing you don't need many mobile dependent features rather you need more web features. For your first question, answer could be that technology in which you are more comfortable. But it also depends how you want to sync your data. In background or when the app is open. If you want to sync data in background that means app is closed, you have some data to send in server, and internet access is there, then you'll need some native windows phone code. In that case if you use phonegap ultimately you will need some native code to deal with it, may be you'll need to write a plugin to communicate between phonegap and native code. And if you don't need background process, if you want to send data to server only when your app is opened,phonegap can work like a charm. It'll be easy to communicate between 2 web technology.
For your second question, ofcourse phonegap is great technology to learn to deal with cross platform. If you need to make apps not only for WP rather for all platforms then phonegap is great. Having said that it's necessary to mention phonegap has it's quirks too. Native code always has it's benefit. Phonegap can't completely overcome native code. But if you are willing to compromise a bit, then it's easy to learn phonegap,a familiar tech than all those platform dependent techs like objective-c, android etc.
(N.B. I'm not an expert, it's just my experience so far)

Can i call a web service from FireMonkey for iOS?

I'm new to iOS, have been developing in Delphi for many years.
I don't know FPC well and i find it very hard to figure out which classes are available on iOS.
is there any FireMonkey classes for calling web services and parsing xml?
Yes you can call a webservice :)
No it is not simple :(
You need to access the iOS framework directly...
The following code fragments will help...
First a pascal example of how to send/receive data via TCP
https://forums.embarcadero.com/thread.jspa?messageID=397346
Secondly, you will need to wrap the call using the relevant headers. See...
http://books.google.com.au/books?id=0nTYIL3-0yoC&pg=PT518&lpg=PT518&dq=beginning+ipad+development+webservices&source=bl&ots=cYniLvL8z2&sig=Ci6HskHgMvUeIrjyUbDecd7fBCQ&hl=en&ei=0_KdTpzBB4nOrQfwzM29CQ&sa=X&oi=book_result&ct=result&resnum=6&ved=0CEAQ6AEwBQ#v=onepage&q&f=true
It is a fair bit of work, but it can be done. Good luck!
You can also try to use RealThinClient (RTC) SDK to allow your Delphi XE2 FireMonkey iOS client to connect to a RTC SDK server. Not SOAP, but I've managed to send data back and forth between the two layers (just in case you do not have to use SOAP, but are merely looking for some way to connect an iOS client to a server)...

iOS Network Packet Analyzer app

I need to start developing an iOS application which will need to capture and analyze network traffic by connecting to certain devices. It will be replacing a java based desktop application which does the same thing using JPCAP: http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html
From what I can find out, JPCAP uses a C/C++ library to get the job done. The problem I am running into is not knowing how I can use JPCap in my iOS applications since it is java based even though it is based on C/C++ which Objective-C is a superset of.
If anyone can give me any ideas on how I can get this done or if there are any other API's
native to Objective-C, I would greatly appreciate it.
Thanks

Microsoft/Ford Sync SDK

Just got a car with the Microsoft sync system in it. Did a quick search online and was curious if anyone is aware of any SDK that may exist, sample open source add-on applications, etc.
Thanks in advance.
UPDATE:
Looks like Ford has finally released their SDK:
https://developer.ford.com/
Ford has a website SYNC Mobile Application Developer Network but the SYNC SDK does not look to be available yet (their site mentions possibly later this year). It appears they are stilling working on the API before releasing it. All they are offering now is a way to register to be notified of new info as it becomes available.
From their About page:
Ford is hard at work developing an API
to allow developers to integrate their
Smartphone applications with SYNC. The
Developer Program website will educate
developers about the Ford SYNC
platform and how to interact with it
via the API. There will be a full set
of documentation, example
applications, reference libraries, and
even a developer forum so you can
reach out to the community for quick
help.
With the available SYNC API's, mobile
application developers will be able to
do some of the following:
Create a voice UI for your application using the in-vehicle
speech recognition system.
Write information to the radio head display or in-vehicle touchscreen
Speak text using text-to-speech engine.
Use the in-vehicle menu system to provide commands or options for
your mobile application
Get button presses from the radio and steering wheel controls.
Receive vehicle data (speed, GPS location, fuel economy, etc.)
The official API and full website
launch is set to be targeted for later
this year.
It looks like the SDK is coming very soon. The story was just posted on Engadget:
http://www.engadget.com/2009/12/18/ford-to-give-sync-some-app-store-flavor-opening-api-to-devs-in/
Now just imagine what you could do with access to your automobile functionality!
I don't think there is any. Its a closed ecosystem.
http://www.autoblog.com/2009/01/09/ces-2009-sync-could-one-day-add-app-development-like-iphone/
From what I understand it is based on the CE 6.0 platform using windows automotive 4.1, but I could be wrong. We really need a forum to get this going. Hurry up Ford! Release the SDK!
Given the way Windows automotive is there is only two ways of putting a ROM on Sync. Using JTAG to put your own custom bootloader (forget it), or though the USB. Which you will need to know how to sign the file so sync will think it is an OEM ROM. So at this point even if you were able to come up with your own custom rom by using Microsoft eMbedded Visual C++ you would still have no way to get it on there.
BTW, the SDK they are talking about releasing will only be to develop apps for applink. (not modifying the OS). However, to upload the apps we might be able to find out how to sign the .bin file for sync to accept a ROM through the USB.
Then again this is just from my understanding... I am no great developer or anything.
Ford launched sdk in ces, check it out: http://techcrunch.com/2013/01/08/ford-launches-its-openxc-sdk-and-hardware-specs-to-let-developers-access-its-cars-sensors-and-metrics/

Resources