Monday, September 22, 2014

Manual install of apps on iPhone 6 simulator

Source:
https://forums.adobe.com/thread/1571152

Well, I'll describe what I did, but I don't know why exactly it works like this, nor can I guarantee it will work for you 
1. Install a native app on the simulator of choice (e.g. iPhone 6+) with Xcode 6.
2. Build the an ipa file for the simulator with Flash (this crashes Flash for me, but it builds the ipa before crashing), and unzip it so you can access the .app file in it.
3. Locate the directory of the simulator you want to use. In ~/Library/Developer/CoreSimulator/Devices you will find several folders (with names that look like hexadecimal), each with a simulator. Check the device.plist file in each to find the simulator you want. The one for iPhone 6+ contains the string "com.apple.CoreSimulator.SimDeviceType.iPhone-6-Plus".
4. In that folder, go to data/Containers/Bundle/Application, where you should see another folder with a hexadecimal name, containing the .app file of the native app installed in step 1.
5. Next to that folder, create a new folder for your app. I named that folder after the app bundle ID. Copy your .app file from step 2 into that new folder.
6. In the folder of the native app (step 4), open the hidden file named .com.apple.mobile_container_manager.metadata.plist and change the string under MCMMetadataIdentifier into your app's bundle ID. I didn't change the other stuff in there as I don't know what it means. Save this changed file into the newly created folder next to your .app file.
7. Open the simulator (located at /Applications/Xcode.app/Contents/Applications) and in it the chosen device in the hardware menu. On the 2nd page you should hopefully see your app icon. If not, then it means that one of the many other things I tinkered with had an effect as well...

Thursday, July 17, 2014

Passing parameters to javascript action methods

http://stackoverflow.com/questions/8442552/passing-parameters-to-a-jquery-function-from-a-button-click


Wednesday, July 9, 2014

Re-codesign iPhone apps (.ipa files) with Enterprise Certificates

http://avinashdongarwar.blogspot.com/2013/12/re-codesign-iphone-apps-ipa-files-with.html

Pre-Requisites

1)   Download the distribution certificate from iOS Developer Enterprise Program account. Include it in keychain by double clicking on downloaded .cer file. 
2)   Download the provisioning profile for the app that needs to be resigned from  iOS Developer Enterprise Program Account.
3)   Have the .ipa file of the app that needs to be resigned.

How to Re-sign -
 Lets say Application.ipa is the one we are re-signing.
Open terminal  and -
1)  Unzip the .ipa file.
unzip Application.ipa 
2)  At this stage, you will be having a directory named “Payload” in your working directory with a file with .app extension inside.  In this case it will be Application.app.
3)  In case you want to check the signing authority of the app -
 codesign -dvv Payload/Application.app
4)  Remove old code signature.
rm -r "Payload/Application.app/_CodeSignature" "Payload/Application.app/CodeResources" 2> /dev/null | true
5)   In case Bundle identifier used for registering the application while creating provisioning profile through Enterprise account differs from what was used while signing the app for the first time, we need to change Bundle               identifier using Plistbuddy.
/usr/libexec/PlistBuddy Payload/Apps.app/Info.plist
Use following commands -
a)  Set :CFBundleIdentifier
b)  Save
c)  Quit
6)  In case app uses OS capabilities like Shared keychain, SSO, push notifications etc. we need to add an entitlements property list while resigning in order to enable App Sandbox for the application. For example:
. A new entilements file can be created using –
     /usr/bin/codesign -d --entitlements :entitlements.plist Payload/Application.app
7)  Open the entitlements.plist and edit it.
a) vi entitlements.plist
b) Press i.
c) Entilements.plist looks like -
UTF-8
"?>
http://www.apple.com/DTDs/PropertyList-1.0.dtd
">
        application-identifier
        XXXXXXXX.
        get-task-allow
       
        keychain-access-groups
       
                XXXXXXXX.
                XXXXXXXX.< keychain group id>
                …………..etc………..
       

In the above chunk, XXXXXXXX part has to be replaced with team ID of the Enterprise Account.
d)  Press esc
e)  :wq!
8) Replace embedded provisioning profile.
cp "" "Payload/Apps.app/embedded.mobileprovision"
9) Re-sign








 /usr/bin/codesign -f -s "" --resource-rules "Payload/Application.app/ResourceRules.plist" --entitlements entitlements.plist "Payload/Application.app"
Certificate Authorities can be even checked in "Keychain Access" Utility application on MAC systems. Open "Keychain Access"  and search with keyword "iPhone Distribution".
  
10) Repackage
    zip -qr "Application.resigned.ipa" Payload

Wednesday, July 2, 2014

Resigning an application

http://avinashdongarwar.blogspot.com/2013/12/re-codesign-iphone-apps-ipa-files-with.html

Friday, June 6, 2014

Crashing avd emulator

http://timvoet.com/2013/01/04/avd-emulator-crashes-on-mac/

Wednesday, April 23, 2014

Enable syslog server on Mavericks

http://stackoverflow.com/questions/5510563/how-to-start-syslogd-server-on-mac-to-accept-remote-logging-messages

Tuesday, April 22, 2014

Installing geoip to mavericks

http://www.krishnasunuwar.com.np/2014/02/installation-maxmind-geoip-python-library-in-os-x-10-9-mavericks/

Steps to installing GeoIP for django

1.  Install C Library
2.  Download binary database and put it in share folder
3. Download python library GeoIP 1.3.1 (pip install geoip)
4.  Configure Django settings.py
    'django.contrib.gis',

Tuesday, February 4, 2014

OSSIM Custom Collectors

http://santi-bassett.blogspot.com/2012/09/hands-on-3-creating-custom-ossim-plugin.html

Wednesday, January 29, 2014

Dynatables custom column sort

https://github.com/alfajango/jquery-dynatable/issues/27

Monday, January 27, 2014

iOS Provisioning Profiles location

/Users/$(username)/Library/MobileDevice/Provisioning Profiles/

Monday, January 20, 2014

Update Android SDK command line

 android update sdk --no-ui