Showing posts with label iOS. Show all posts
Showing posts with label iOS. Show all posts

Saturday, July 25, 2015

Capture packets from iOS devices on Mac OS with Wireshark

RVI (Remote Virtual Interface)

1. Connect your iOS device to a Mac with USB
2. Open terminal and enter "rvictl -s deviceUUID" to start device with interface rvi0
3. Run wireshark and start capturing the packet on interface rvi0
4. Sotp interface rvi0 by enter "rvictl -x deviceUUID"

PS. deviceUUID is the UUID of your iOS device

Wednesday, October 31, 2012

application executable is missing a required architecture


The minimum Target supported for XCode 4.5 is iOS 4.3 which means iPhone 3G is no longer supported since the highest iOS version for iPhone 3G is iOS 3.1.3)
So to fix this problem:
. Change iOS Development Target to "iOS 4.3"
. Remove armv6 from the "Architectures" and "Valid Architectures"

Friday, February 24, 2012

[iOS Developer] How to use TestFlight to distribute your beta app

1. Create an account on TestFlight (http://testflightapp.com) and with "Developer" option checked.
2. Log in to the TestFlight web site and "Add a team" for your app.
3. Add teammates, either testers or developers. (PS. Recruiting testers from public is also available)
4. Ask your teammates to register their iOS devices following the instructions in the Email. (Do it on their iOS devices)
5. Once they accepted to being the teammates and registered their devices, you will be able to see their devices information such as device model, iOS version, and UDID.
6. Add their devices/UDIDs to your Provisioning Portal -> Devices.
7. Modify the Ad-Hoc provisioning profile to include the newly added devices and install the updated provisioning profile to your XCode.
8. Build your app in Ad-Hoc mode and locate the YourAppName.ipa.
   . For XCode 4: http://support.testflightapp.com/kb/tutorials/how-to-create-an-ipa-xcode-4
   . For XCode 3: http://support.testflightapp.com/kb/tutorials/how-to-create-an-ipa-xcode-3
9. Log in to TestFlight web site, click "Upload Build" and follow the instructions to finish uploading the app.
10. Your teammates will be able to install the app you just uploaded to their devices with TestFlight app on their iOS devices.

Friday, November 11, 2011

Xcode build setting variables


For all the build setting variables, refers to http://developer.apple.com/library/mac/#documentation/DeveloperTools/Reference/XcodeBuildSettingRef/1-Build_Setting_Reference/build_setting_ref.html

To reference a build setting value in a build setting specification, use the name of the build setting surrounded by parentheses and prefixed by the dollar-sign character ($). For example, the specification of a build setting that refers to the value of the Product Name build setting could be similar to The name of this target's product is $(PRODUCT_NAME).

Thursday, October 13, 2011

How to convert p12 files to pem files for Push Notification

Example: Development certificate
1. Download the certificate from iOS Provisioning Portal. Double click to install it.
2. Once installed, it should get listed in Certificates of Keychain Access.
3. Locate "Apple Development IOS Push Services:" and right click on it, select "Export xxx" and name it  dev-cert.p12 (leave the password blank for exporting)
4. Expand "Apple Development IOS Push Services:" to find the private key. Right click on it, select "Export xxx" and name it dev-key.p12 (leave the password blank for exporting)
5. Convert certificate to pem file format
   openssl pkcs12 -clcerts -nokeys -out dev-cert.pem -in dev-cert.p12
6. Convert private key to pem file format (password cannot be left blank, so key in 1234 and we will remove it in next step)
   openssl pkcs12 -nocerts -out dev-key-password.pem -in dev-key.p12
7.  To remove the password of dev-key-password.pem, run following command. (password will be asked, enter 1234 as we set in step 6)
  openssl rsa -in dev-key-password.pem -out dev-key.pem
8. Now we have both the certificate and private key (no password) converted in pem format.
9. That's it!

Wednesday, June 8, 2011

Create rounded corner view

1. #import <QuartzCore/QuartzCore.h>
2. Create a view, ex. named v
3. [v.layer setCornerRadius:8.0f] ;
4. [v.layer setMasksToBounds:YES] ;


Make sure you DO include QuartzCore/QuartzCore.h even compiler doesn't complain about it.

Check clients which connect to Mac OS X Wi-Fi Internet Sharing

arp -i bridge100 -a bridge100 may be different on your Mac OSX