All posts by Paul

oAuth2 with iOS (Part 4)

Within this post we continue working on the iOS app. For previous posts in this series, see here :).
In this part we are going to add all network functionality we need to have our app working.

Like before, all code can be found in GIT. The code like at the end of the project can be found here.

Due to the time since the previous part (Sorry :(!), iOS was upgraded a few times. With this part, everything is tested under iOS 8 BETA 4 with xCode BETA 4 as well.

We are going to implement certain ways for refreshing data into our app. First off, we add a manual refresh, including code for doing the refresh. After that, we creating new Demos, including refreshing, and we create a simple background fetch.
Continue reading

oAuth2 with iOS (Part 3)

Within this post we continue working on the iOS app. For previous posts in this series, see here :).
Within this third part we will start with integrating oAuth2 into the app.

Like before, all code can be found in GIT. The code like at the end of the project can be found here.

To implement oAuth2 into our app, we are going to use a library from Toto.  So lets add this as submodule into our git repo:

MacBook-Air-van-Paul:Symfony iOS Oauth Demo paulsohier$ git submodule add https://github.com/nxtbgthng/OAuth2Client.git
Cloning into 'Symfony iOS Oauth Demo/OAuth2Client'...
remote: Reusing existing pack: 1858, done.
remote: Counting objects: 31, done.
remote: Compressing objects: 100% (25/25), done.
remote: Total 1889 (delta 16), reused 10 (delta 6)
Receiving objects: 100% (1889/1889), 463.92 KiB | 341.00 KiB/s, done.
Resolving deltas: 100% (1193/1193), done.
Checking connectivity... done.

Continue reading

oAuth2 with iOS (part 2)

Within this post we continue working on the iOS app. For previous posts in this series, see here :).
Apple announced the second BETA for iOS8 last tuesday, and due to that, the devices I use for this example are upgraded to this second BETA.

Like before, all code can be found in GIT. The code like at the end of the project can be found here.

So, what are we going to do in this second part? First, we are going to create some basic functionality in the app to add a new demo. Second, we are going to write some tests, including some performance tests, to make sure everything works, even after we are modifying it to work with our network code (Which will be later in a next part). Creating tests for apps (And other code as well of course) is always a great idea. With the next xCode feature apple introduces in iOS8/xCode6 you can do lots of great stuff. I am going to use some of these features to do testing of this demo app.
In a other post, which is not within this series, but still interesting, I will explain how to use xCode server for continues integration with iOS8 and github, because that is (badly enough) not as straight forward as it can be.

Creating a new item in a core data model isn’t very difficult. Because we overwrite the Demo class anytime we generate it, that is not a good location to add it, isn’t it? well, it actually is, but we are adding a category for that demo class, and use that instead.
So lets create a new Cacao class, and name it Demo+Create. Last time, we had a problem creating a new category. This issue doesn’t seem to be fixed yet in the second BETA, so we need to do it by hand. Continue reading