Posts

Showing posts with the label iOS

Facebook Infer - Detect bugs before you ship

Image
What is Infer? An Opensource tool to detect bugs in Android and iOS apps before they ship -  http://fbinfer.com/ Documentation (Getting Started Guide) -  http://fbinfer.com/docs/getting-started.html Quotes from "Peter O’Hearn" - engineering manager at Facebook When you have to write a software test, often you are going after a specific bug. That means you’ll need to exercise all of the funny cases that will get you to that bug. Static analysis allows you to execute the code symbolically It’s important to know that while things like Infer have made us faster and more successful, they’re not pieces of the Facebook competitive differentiator another huge benefit of open source is in recruiting. By showing you can open source stuff if you built it at Facebook, then you get excellent, independent engineers who don’t require as much ramp up time, since they’re used to working on these open source projects. So there’s far less training. Source: https://c...

Unable to charge the iPad using USB

Image
Now here is a scenario where I am automating applications on an iPad. The iPad is connected to the usb port of a machine which has all other testing devices connected. Problem: There is a known issue with iPad not charging and if you search forums you will notice the solution that says " Charge via a wall outlet if your computer USB port does not support high power output...most older computers do not have high power USB ports, and some of the new models still lack those ports. " This was not a viable solution as I had multiple users accessing this machine and the test devices had to be plugged into the system round the clock. Solution: What I finally did and that helped - ASUS came up with a software to deal specifically with charging issues related to Apple devices. It works by simply increasing the USB port’s power output. This should work with all motherboards and computers (Windows platform only) as claimed by ASUS. Step 1 : Download the software from here...

Modify the IP headers on the iPhone / Bypass or change the ip on any device

Image
Problem: If we need to test an application which is outside the network or with a different IP address how do we do that? we need to be able to use a proxy server that bypasses or replaces some properties that can be then used to modify the way the application is accessed. Solution: Here is an example of how to do that on an iPhone (You can do this for any device) : Go to settings in iPhone and modify the manual IP address. Give it the same IP address as that of the local machine where the proxy server would run and select a valid port : say 8080 To set the IP headers or proxy download the Burp Free edition from here:  http://portswigger.net/burp/download.HTML Go to the Intercept tab and make sure it is off. Go to Options tab and edit the Proxy listeners to local ip of the machine: Scroll down to Match and Replace Pick a Request header not in use and modify that: In our case “Client-Version” to Now check the  HTTP history tab to confirm that the header is re...

Install eclipse on Mac OS X 10.9 onwards / JRE or JDK must be available in order to run Eclipse.

Image
If you are seeing this error while launching eclipse after an update to your Mac machine: "A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse." There are couple of solutions: editing  eclipse.ini , adding in vm /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/bin/java  just before the  -vmargs editing the  Info.plist  and adding the full path to the Oracle SDK, checked if syntax was correct by double clicking and succesfully opening it and verified that the path was correct. adding 4 capabilities to the JDK: CommandLine JNI BundledApp WebStart Applets The eclipse.ini entry must have -vm on a separate line from the path - vm / Library / Java / JavaVirtualMachines / 1.7 . 0.jdk / Contents / Home / bin / java All this after installing JDK7 and on my Mac I still see errors!! What finally wor...

Working on iOS Testing and want to add to the classpath on OSX / Mac

Image
If you want to make a certain set of JAR files (or .class files) available to every Java application on the machine, then your best bet is to add those files to /Library/Java/Extensions. Or, if you want to do it for every Java application, but only when your Mac OS X account runs them, then use ~/Library/Java/Extensions instead. In OSX, you can also set the classpath from scratch like this:export CLASSPATH=/path/to/some.jar:/path/to/some/other.jar Or you can add to the existing classpath like this:export CLASSPATH=$CLASSPATH:/path/to/some.jar:/path/to/some/other.jar Happy iOS testing!

How to create a new Apple APP ID and select the WildCard App ID option and set it to “*”

Image
An application ID uniquely identifies your iOS application within Apple's application services - enabling you to use things like in-app purchasing, push notifications, game center and more inside your app. You can only create application IDs in the iOS developer portal . So first you would need to log-in with a developers access. Once you're logged in, choose the "Certificates, Identifiers & Profiles" link On the next screen, choose the "Identifiers" option on the left Now you can click the "+" icon near the top right to create a new App ID The first thing you're asked to do is provide an App ID description (Just provide something descriptive enough for your needs) You have two options here. Pick the one that says - Wildcard App ID  Choose an App ID Suffix as “*” Select App Services if needed Complete and submit to get a message – “This App ID is now registered to your account and can be used in your provisioning profile...

Check dependencies code sign error safarilauncher.app OR Could not read CFBundleIdentifier from Info.plist

Image
If you are working on Appium and you have followed these step to get an error Now that you have a profile open a terminal and run the following commands: git clone https://github.com/appium/appium.git install npm using brew – brew install npm cd appium ./reset.sh --ios --real-safari –launcher Just cloned SafariLauncher Running Xcode version 5.1 I entered my provisioning profile and my code signing identity Clicked build I got this error  error: could not read CFBundleIdentifier from Info.plist (null) Did a clean and rebuild but got the same error Did a clean and built from ./build.sh and got the same error Solution: Go to Xcode open the project Navigate to the Build Settings Change the Code Signing Identity with your name and iPhoneDeveloper Change the provisioning profile to the correct name  4.   Check if the Bundle Identifier isn't empty