Skip to content

JaniJegoroff/facebook-ios-sdk

 
 

Repository files navigation

Motivation

This simple example provides one solution for a classic problem: automating Facebook login scenarios for iOS.

Facebook iOS SDK example application Scrumptious is used for a demo.

Problem

When automation Facebook login scenarios application context is switched from native application to a browser. Unfortunately, Calabash does not have a control in that browser window.

Solution

When working with simulators, one solution is to handle Facebook login in a browser utilising Sikuli framework: http://www.sikulix.com/.

See screencast: http://screencast.com/t/BP9IHRjQ1f

Environment

Xcode 6.1.1

Calabash 0.11.4

run_loop 1.1.1.pre3

iPhone 6 8.1 simulator

SikuliX (Build 1.1.0 2014-12-18_01:01nightly)

How to run this example

  1. Install SikuliX
  2. Set SIKULIX_HOME
  3. Download Facebook SDK for iOS and follow setup instructions
  4. Run bundle
  5. Create Sikuli Facebook login script. See example: https://github.com/JaniJegoroff/facebook-ios-sdk/tree/master/samples/Scrumptious/facebook-login.sikuli
  6. Modify Sikuli script path if needed. See https://github.com/JaniJegoroff/facebook-ios-sdk/blob/master/samples/Scrumptious/features/support/utils.rb#L2
  7. Build the project for iPhone 6 8.1 Simulator
  8. Run cucumber

About

Simple Calabash/Sikuli example for a classic problem: Facebook login

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 97.9%
  • Shell 1.4%
  • Other 0.7%