Converting iOS application to mac application using Xamarin - ios

I am very new to Xamarin. I have built a simple iOS application (iPad actually) for testing. It is employee add. User puts in firsname,lastname,employee position int textfields and clicks save and it should save to DB. It works fine. Can i write/make a Mac application out of this iPad application using the same code base? Please explain me. If you need more info, please ask.Thanks.

You can reuse SOME of your code to create cross-platform apps. If your App is well designed, with non-platform specific code (services, domain logic, data access, etc) separated from the UI and platform specific functions, then you should be able to reuse that code across platforms. Things that are platform specific (particularly UI) will need to be customized for each platform.

Related

How can I create hybrid apps on IOS?

I see on Android that apps exist to create android apps. I understand nothing like this exists on IOS because of apple's terms. On IOS however, some apps, pythonista for example, allow the user to create scripts that run similar to apps. Is this functionality currently available for hybrid frameworks, IE phonegap/cordova, react native, etc? Barring this, is there some method whereby I can code and test such apps on my iPhone/iPad?
Bottom line, I want to code apps while commuting, etc, on IOS. I understand I need a computer to compile the final product, that's ok, it's just the coding/testing process I want to do on IOS.
I am up for any hack you can think of to make this work, so long as it is accessible with VoiceOver, apple's screen reader, as I cannot see at all. One example of something I thought of that won't work is using remote desktop software, there is no such software that is accessible as it uses an image of the remote screen, I have no access to this.
I am looking forward to your creativity, so far this has me stumped.
Thanks in advance.
Similar to the playgrounds answer, but if you wanted to use Xamarin you could use Continuous .NET. It’s a C# IDE for iOS. You could then use Working Copy to to keep the version on your computer in line.
The other option is to VNC into your computer at home, but if you’re on the train that might not be a great option.
It's not a solution for your problem, but if you have an iPad, you can write parts of apps in Swift Playgrounds. There you have access to all the UIKit stuff. Unfortunately some of the frameworks you can use in iOS are missing.

How to migrate existing Xamarin.iOS project into Xamarin.Forms code?

I want to move my development completely into Xamarin.Forms. Currently, everything was developed using Xamarin.iOS and now i want to move to Forms due to some requirements. How to use my existing Xamarin.iOS code on Xamarin.Forms?
There is no easy way for this. You need to redo your application in Forms/Xaml, which takes time. You can use some iOS specific code in Xamarin.Forms renderers specifically for iOS specific styling.
There is no easy way for this unfortunately.
No Automation available. You need to do it manually. and its not going to be simple. You will have to rewrite almost all code involved with UI. you can reuse code written for business logic but for all other, you need to rewrite with Forms/Xamml.

React-Native Select List Overley

If I have a component/container form that allows a user to select a group, I am not hip to what the component/ux should be for this, but I would imagine a select list overlay type deal, am I wrong in assuming this? Why is this not available in the react-native core? The picker for android offers this, but it seems like the iOS version is just the slot machine style picker. Am I missing something?
Is the Picker only the slot machine on iOS or is there a way without bringing in a third party component to provide this functionality for both iOS and Android?
I assume you understand that React Native is not hybrid application like phone-gap. React Native actually pulls out the native controls off of operating system. That is why, you are seeing slot-machine like picker in iOS and material-style picker in Android.
What you need to grok is that React Native is not meant to build cross-platform applications with "same" codebase. The codebase will change a little bit depending upon the OS.
You'll want to keep your business logic separate from the UI components or views, so that you can reuse the business logic in Android and iOS. UI components will differ for obvious reasons. For eg. You will not need Android Toolbar in iOS application, because there is no such thing as toolbar available natively in iOS. Similarly you will not find NavigationBarIOS in Android.
Bottom line- keep your UI components separately in a "components" folder. You can pull out desired components from "components" folders depending upon the OS.
For reference, please go through this. This is my example project back from the days when I was learning react-native. So do expect it to be very amateur-level code. Repo. You can see how I have kept things separately. Good luck!

What is Fast&Easy way to migrate Flex 3.5/4 Web App to Flash Builder 4.6 for Mobile iOS?

I currently have a fully working web app built in Flex 3.5/4 using java back end with Spring Framework using TomCat.
I need to migrate or convert this project into Flash Builder 4.6 to create a mobile iOS application and use the same SpringFramework with TomCat. How can i do this?
Do i just copy code over and adjust?
Do I export from flex 3.5/4 and import into flash builder 4.6 and adjust for mobile?
Is there a certain export feature that exports to mobile?
Do I have to change the code to mobile components by hand? Is there anything automated?
I have spent about 3 days trying to search and figure out specific detailed information on what to do, but oddly enough, I have not found anything that is helpful. I say it is ODD because Adobe claims that with Flash Builder 4.6 and 4.7, migrating to different platforms, will remove about 70% of the work with the latest Flash Builder. However, I have found no tutorials or steps on exactly what to do. I don't even know if the spring framework would work with TomCat for an iOS app.
Here's what I have found out through my research:
1. Migrating to mobile, I will have to change various code to use the mobile optimized components for performance.
What do I need to do?
EDIT: I even tried adding mx.swc to my library path just for testing purposes to make things easier for the migration/conversion and it still doesn't fix my error in Flash Builder 4.6 mobile project with mx:Application:
http://i.stack.imgur.com/dFdIk.jpg
Lots of things to cover; and I'm not sure where to start. First, I want to clarify that the browser based app you developed for a 72-ish dpi 15+ inch computer screen may not easily migrate to 3.5/4 inch iPhone or 9.7 inch iPad screen. Keeping that in mind
Do i just copy code over and adjust?
I would start there, yes. Even better if you move the 'shared' code into a library project so you can use it for your web app and your mobile project. Flex 3.5 does not formally have mobile support; so I would not expect great performance on a mobile device. You'll also have to add some "non-mobile optimized" libraries to the library path manually in a Flash Builder Mobile project. The MX.swc is probably the big one, as you already mentioned.
Do I export from flex 3.5/4 and import into flash builder 4.6 and adjust for mobile?
In Flash Builder 4.6 mobile projects are different than web projects. Most likely you'll want to move as much shared code as possible into a library project and then create a web project--for maintenance of your current application--and a mobile project for deployment to iOS and other mobile devices.
Is there a certain export feature that exports to mobile?
If you have created a Flash Builder Mobile project; then yes you can export to iOS, Android, or Blackberry.
Do I have to change the code to mobile components by hand? Is there anything automated?
Yes, you'll have to change code to mobile components by hand. That is if you are replacing a non-mobile optimized component with a mobile optimized one. However, if you are using a Spark Component [introduced in Flex 4], such as a List, then you can use the spark list with the default theme in the web project and a spark list with the mobile theme in your mobile project without any changes.
...Adobe claims that with Flash Builder 4.6 and 4.7, migrating to
different platforms, will remove about 70% of the work with the latest
Flash Builder.
I am not aware of such claims. But, I do believe that you can reuse a lot of code between mobile projects and non-mobile projects. It took me 3-4 months to build a mobile game using AIR/Flex. It took me less than a day to port the code to work in a web browser.
I don't even know if the spring framework would work with TomCat for
an iOS app.
If you want you're iOS app to make calls to a server, then yes it will work without issues.
If you want to deploy Tomcat and Spring onto an iOS device I would not expect that to work.
This question is a bit non-specific; but I tried to help. If that doesn't point you in a direction, then I may ask what have you tried and what problems have you run into?

Different versions of IOS app

I have an app which is base in sqlite DBs and I need to create different versions of it. Each version is using different dbs, the name of them and the url to update them, and some other parameters but the code is develop to be the same in any version.
My question is how to do that keeping it simply. On android I have done several projects as library and I create a new project for each version. the new project is only a class extending from application in which I set the parameters for the name of the dbs and other strings which are defining the url etc. However in IOS I am not sure how to do that and having only one source to update for all versions.
I was reading a bit about targets but I am not sure if this is the best way, even I am not sure how to do it.
What do you recommend me? using targets? how to setup them to change the properties in the original project like the name of the database? Or do you have a better way to do that?
Every thing in the app to change the HMI or the content is in the DBs this is why I use different DBs for each version. Even I use the same DBs for the android versions.
Thanks for your help.
PS: just to clarify a bit more, the two versions has the same functions, it is just the content what is changed, and this content is in the DBs. I am not trying to have a pro and a lite version.
I think the different targets option is perfectly valid in this case, since you can decide which files go into which application. I have a similar app that shares most of the code but there are some specific resources that are specific for each application.
Just be sure that when you add new files to the project the correct target is selected, or if it's a shared resource, then all the targets are selected. You can do so in the utilities panel in XCode.

Resources