I just recently got started with he Google Cardboard SDK for iOS and I'm looking to create an simple app in Swift that displays a 3D (Stereoscopic) VR video.
First, I adapted the VideoWidgetDemo Sample in the SDK (https://github.com/googlevr/gvr-ios-sdk/tree/master/Samples/VideoWidgetDemo) from its original Objective C to Swift 4 and it performs well. It uses GVRKit to create a GVRSceneRenderer with a GVRVideoRenderer.
But then I came across a blog post on the Ray Wenderlich site (https://www.raywenderlich.com/136692/introduction-google-cardboard-ios) that uses GVRSDK's GVRVideoView instead, which feels simpler and easier to use. However, there is a very noticeable performance difference. The video displayed by this app stutters/jitters much more than the GVRKit version.
I'm puzzled by the fact that the official Google VR reference documentation site (https://developers.google.com/vr/ios/reference/) doesn't even mention GVRKit, even though all the official samples from the GitHub repo use it instead of GVRSDK. So the samples follow one approach and the reference docs cover a different one.
I haven't been able to find any guidance for when to use one or the other (or even both together if it makes sense), so I'm hoping that someone on StackOverflow can shed some light on this choice.
I'm also curios about the performance difference I'm experiencing with the two different approaches. It would be great if there is a way to achieve the same level of performance with the GVRVideoView than with the GVRVideoRenderer.
Thanks in advance for your insights and suggestions.
Seem that the SDK is deprecated.
I've posted an issue about a GVRSDK on GitHub, and they say that the SDK is deprecated and developer have to switch to GVRKIT.
Here the GitHub issue:
https://github.com/googlevr/gvr-ios-sdk/issues/298
If your goal is to display 360 video in a simple app, check this Cordova plugin:
https://codecanyon.net/item/cordova-ionic-vr-plugin-photo-360-video-360-player-with-cardboard/20392357
It seems that Google came up with a new SDK because Daydream is now deprecated.
The Google Cardboard SDK offers a streamlined API, improved device
compatibility, and built-in viewer profile QR code scanning.
Quickstart : https://developers.google.com/cardboard/develop/ios/quickstart
Github : https://github.com/googlevr/cardboard
I want to use apple maps in Swift to be able to put in, lets say, 3 addresses. And then the program will sort out the quickest route. My problem is that i can't even find the apple files that show using maps in swift.
I looked here
The Swift Programming Language - Basics
(not just the intro, most of it).
And in the intro it says
Location services are provided by the Core Location framework, which defines Objective-C interfaces..."
I can't find example code for using the maps for at all what I'm looking for so i guess what I'm asking is:
Will this work in swift?
Do you know of any files that may help or websites with example code of how to accomplish this?
What's the problem here? E.g. the documentation for CLLocation -startUpdatingLocation includes a description of its Swift binding as well:
func startUpdatingLocation()
You may be looking at a situation where Apple just did not update a Programming Guide since Swift has become available and you may typically infer "Objective-C and Swift" where it mentions "Objective-C".
I want to create a button with the background. But I want to set using the xml file as same like android have.
Is there a way to achieve this ?
Simply put, you cannot directly port your Android specifics or liberties in XCode/Objective-C. You must learn atleast the basics.
For your specific query, you can use the following answer
Set a button background image iPhone programmatically
Also, I would firmly suggest you start learning Objective-C. There are ample resources out there:
APPLE.
Ray Wenderlich
Cocoa Dev Central
iPhone Dev SDK
Geeky Lemon
and many many many more ...
I need to develop with BLE technology. I found some introductions and source code:
http://processors.wiki.ti.com/index.php/Category:IPhone4SBLEDemo
but I didn't find any tutorial to start from scratch with this technology (CoreBluetooth framework) from choose the sensor for testing, also WWDC 2011
Is there any tutorial to start with BLE technology on iOS?
Many Thanks!
Unfortunately there isn't much out there for the core bluetooth framework as it is relatively new. I would suggest acquiring a very solid understand of how bluetooth low energy works before writing any code.
A couple of decent resources:
Research around this site to start seeing where services and characteristics are located, and what they do.
http://developer.bluetooth.org/gatt/Pages/GATT-Specification-Documents.aspx
This site has the actual firmware implementation code of the services you will see on the bluetooth sites along with a more thorough explanation of how these things work with the supplied documentation.
http://www.ti.com/tool/cc2540dk
If all of that makes sense to you then I would obtain a device and start hacking away. The core bluetooth framework has sparse documentation but relies heavily on delegation. You will find that once you start discovering services in the delegate methods, that discovering and using characteristic values is a piece of cake.
You should look at the following:
CBCentralManager
Here is the Sample Code you can start with:
Temperature Sensor Example from Apple.
Also Make sure: You signed into Apple for Developer Provisiong profile in order to test your application into your iPhone.
Hope this helps.
I am just starting iOS development. I read some tutorials, watched stuff on iTunes U and wrote some sample code myself. Now I want to take the next step. I want to learn about best practices for iOS development in XCode.
Are there any well written and well organized iOS projects that one could take a look at?
(As I see it, iOS is not exactly the place for open source enthusiasts, however.)
Thanks
Mike.
I agree with several of the other answers that state that looking at many, many projects for mini-examples of what you want to do in your own app is the way to go.
However, you asked for an example of an app demonstrating best practices.
You could do worse than to read Matt Gallagher's blog, Cocoa with Love from beginning to end. However, the app example you asked for is right here.
Not only will it show a variety of techniques, some novel design and best-practices, but also he points out where he feels that he might have done something better.
It's a great read.
I would suggest the following process: (it worked for me)
Think of an advanced app. that you eventually want to be proficient enough to create.
Make a top-down problem-solving tree containing the necessary skills required to build your final app.
Use this tree to divide your final app. into 'sub apps'. Start at the bottom of the tree, find a tutorial specifically for that skill, and make a "Hello World" app. that uses that skill.
Keep progressing upwards, creating 'sub apps' as you go.
When you are finally ready to make your final app. (it will take a while), you will have a good handle on how iOS development works. It will also be a great test of your knowledge via direct application!
Getting the hang of iOS development can be tricky; it really does require a top-down approach, and every online resource I've found takes a linear one. The only way that I think a linear approach to learning iOS development would be manageable, is to take it one small task at a time.
As for specific resources, I always google "[what I want to do] iPhone SDK" and browse the tutorials and forum posts that come up.
Here are some open source iOS apps. However, they aren't very well documented and are also very advanced.
TKAWebView - A subclass of UIWebView that handles authentication and downloading.
Welcome to your Mac - An iOS app. to VNC into a PC/Mac and do some cool stuff.
InAppSettingsKit - A settings screen creator for your apps.
Good luck!
The people behind the Parse platform have made two complete projects.
For each project there is the complete source code, a tutorial and the resulting app is also available from the AppStore.
Anywall: https://parse.com/anywall
Anypic: https://parse.com/anypic
They both rely heavily on the Parse platform as the data source, but you still get a feel for an iOS project.
Molecules is a great open-source app that uses 3D OpenGL to render complex models of molecules.
Just keep coding my friend. You'll learn over a period of time. The best way to get dirty in a mud fight is to jump into it... Weird analogy but you get the point.
Maybe someday, we all will learn from you then !
Like you said there many and many source codes are available internet, but most are incomplete.
I found some Open source codes of REAL application currently available through Apple app store are given here
Free iPhone App Source Codes of real apps
and also, you can find many answers here on stackoverflow question - Are there any Open-source iPhone applications around?
You can download free IOS sample projects from http://devcodemarket.com
I realize this is an old thread but I've also been looking for good objective-c code examples recently and I just realized that TextEdit's source code is available at the Mac Developer Library webpage.
Also, here are some popular objective-c libraries that have caught my attention:
CocoaPods
AFNetworking.
you can also go through UICatalog from Developers Library and download the sample code. just google it and you will find a project containing all basics of iphone.
I don't think there is any perfect project that can demonstrate all the qualities of great code. Developers have stylistic preferences and may make mistakes. That said, you should look at a lot of different projects and try to look at the conventions used.
I'd suggest starting on GitHub. Besides for seeing code, you'll see what libraries are out there, which may help further your projects later on. Here's the Objective-C page on GitHub.
(Also, I (GitHub link) think you're wrong about iOS devs not being in favor open source. Yes, there's money to be made, but you can't sell a CSV paring library on the App Store as is.)
Have a look at https://github.com/mozilla/firefox-ios
That is Firefox for iOS, written in Swift.
Cocoacontrols has a wide range of controls written using Objective-C & Swift.
I believe these days, this is one of the most famous website for iOS Developers.
But, before you jump onto this, you have to learn Objective-C & Swift very well, so that you will understand how to use the controls in your app which makes your app smooth.