Is there any way to use WebKit for developing iOS applications in xCode? I'm pretty sure you can use WebKit for making Mac applications, but how about iOS ones?
Yes, just drag out a UIWebView from the Library. You have less control over the content but it works to display webpages and javascript. However it may or may not suit your needs, depending on what you're looking for—you haven't specified.
Documentation: http://developer.apple.com/library/ios/#documentation/uikit/reference/UIWebView_Class/Reference/Reference.html
You can check my open source code here as a start project : https://github.com/sylverb/CIALBrowser
Related
Sorry if I use the wrong terminology, I'm not an iOS developer so I'm mapping everything back to equivalent features in Windows ...
If I write an iOS application that creates controls using standard UIKit functions, and I run that exact same application on various versions of iOS, will the application look slightly different on the different versions of iOS? Or does the application always use the styling of the version of iOS I select for the target version in Xcode?
And in a related question, is there a web site somewhere showing how the various controls have changed their look through the various iOS versions?
Generally no. Since iOS7 to current iOS release - all standard UIKit controls look the same. On iOS6 and lower things are drastically different. If you target iOS7 and up (As most devs do now since hardly anyone is on iOS versions lower) - you can be rest assured that all usage of standard UIKit controls will look exactly the same.
For Android I see there is a very good solution Json2View:
https://github.com/Avocarrot/json2view
for creating Android app UI on the fly. Is there any similar solution available for iOS? Is there any constraint is having JSON based UI concept for iOS, the way json2view does for Android? Or best would be some common open source library that has flavor for both Android and iOS.
Using React Native you can accomplish the same.
Strictly speaking, its not Json to View but its JavaScript to View.
Whatever views you create in ReactJS, will be created using native UIKit Framework.
For example, if you use scrollview component in JS, it will use a scrollview subclassed of UIScrollView.
Please check this link for in-depth overview
https://facebook.github.io/react-native/
https://github.com/facebook/react-native/issues/823
You cannot do anything like this, you will get apple rejected because of using any kind of code injection.
I've been reading about UI automation using instruments, and the old documentation suggested that this is done using a javascript library to access frontmost app, then access UI view hierarchy.
I see that an iOS8 device has "Enable UI automation" option in the developer menu in settings. I also see that there's some documentation on the UIAutomation framework in iOS8, which seems to me like it allows to do UIAutomation from code.
Are there examples of using iOS8 UIAutomation framework from code that I can look at to understand if this is the framework for me?
I see this screen when looking for the info on UIAutomation framework, and I think it confused me into thinking that it is available in Obj-c or Swift, because of buttons on top. Can someone confirm that this framework is NOT available in either swift or Obj-c and is still a javascript framework?
.
I believe UIAutomation is still a JavaScript only testing framework. We would have heard otherwise at WWDC or in the release notes, if any other language was supported.
Concrete evidence of this however, is that the "Automation" Instrument used when profiling an app has no language drop downs to indicate another language is possible (like say, you do when creating a new class in Xcode and there's a drop-down for Swift and Objective-C).
If you use the automatic recording functionality built into the Automation Instrument, the code you see is JavaScript. The lack of options to select another language is telling. Instruments did get a minor visual tweak with Xcode 6 too, and this fact did not change.
The UIAutomation framework, sadly doesn't seem to get a lot of love of late (not much of anything has changed since the release in 2010 with iOS4, leading some to speculate there's a major revamp in the works or it's being forgotten).
To see what JavaScript code looks like that's aimed at writing tests for iOS, check out Alex Vollmer's Tuneup JS library: http://www.tuneupjs.org. His library provides a higher level abstraction, while still in JavaScript, over Apple's UIAutomation JavaScript classes.
He has a sample project linked there that runs tests on Apple's own UICatalog example application.
Using a library like Tuneup JS is a better way to go than the more primitive JavaScript classes that Apple provides, which are really just a starting point.
You should look into Subliminal. It's a testing framework which is built on top of UIAutomation that allows you write your tests in Objective C or Swift.
https://github.com/inkling/Subliminal
We have UIAutomation working in iOS 8 using the Illuminator framework (which I wrote), and use it in our CI. It is a set of extensions to the Javascript that UIAutomation provides.
Currently, Javascript is the only language for UIAutomation that Apple supports.
I'm interested in such a thing - are there some tools, libraries, etc which will allow to design native iOS UI (UILabels margins, etc.) with the help of CSS? I am not talking about libraries such as PhoneGap or Appcelator. I'm interested in something like CSS parser which will allow me to transform CSS code into Objective-C UI code or Interface Builder.xib files. Let's say I have a good web-designer fluent in CSS and HTML and I want him to write UI code for my iOS application in CSS+HTML and then I transform it in Objective-C UI code or IB .xib files.
I think my question is clear and I hope for some good answers.
Services that allow you to design "native apps" or, more accurately, "hybrid apps" are actually bare bones app dominated by a web view or frame for a webpage so that you provide content and styling on a website that is being displayed by the app. It expands the capabilities of the "app" and allows you to put an app in the store but it is not on a par with true native apps.
There is no elegant conversion from HTML to Objective-C.
Seriously, if you want a native app, make an actual native app. Otherwise, just stick with a web app.
http://www.nativecss.com/docs/tutorials/intro/ios
for native ios development,it is very good tutorial for ios+CSS
Also check out: http://www.pixate.com/
It's not free but let's you do exactly what you're looking for.
The reason for PhoneGap, AppCelator etc. to exist is the reason that HTML+CSS (in other words "web pages") cannot be converted into Objective-C easily.
I suggest you take the straightforward way. Teach your designer to use the Interface Builder. It's just a WYSIWYG editor, nothing complicated even for a designer.
Are the development environments the same? Does iPad support Java development?
For developing for iMac and iPad you can use Xcode for both. The project types will differ though.
I wouldn't worry about Java if you are working on the Apple platforms. Use Objective-C instead.
For Mac desktop you'll typically use the NSFoundation and the Cocoa frameworks. For the mobile devices you'll use the NSFoundation and UIKit frameworks. Notice that basic data types reuse the same framework (NSFoundation) but the frameworks for the GUIs are different. What this means is that you can create common code if you are only using NSFoundation. But you won't be able to use the same code for working with GUIs. This makes sense as the way GUIs work for desktop and mobile are very different.
The iPad only supports C++, Objective-C, and JavaScript. It's in the developer agreement. Also, on the iPad you will probably be using the cocoa touch framework which is different from the cocoa interface on Macs.
You can use Apple's XCode IDE to develop applications for both Mac OS X and the iOS platforms. I do not have a Mac, so I cannot give you much more insight as to if there are any differences when coding for one device or another, though I would imagine an app could be made fairly portable.
Unfortunately, Java is not supported on the iPad, and probably never will. The reasoning is the same as the reasoning Apple decided not to include Flash.
I hope this helps.
You can use XCode/Objective-C for both, but at least the user interface code would be completely different. You may be able to share some backend code and libraries.
Java is not supported on the iPad. You are down to C/C++/Objective-C and JavaScript.