Pages

Subscribe:

Labels

Oct 23, 2011

Jaipho Dynamic iPhone Gallery with ASP.Net c#

few days back i gone through a html/javascript iphone optimized photo gallery at http://www.jaipho.com/
Really cool way to create a gallery that looks awesome on smart phone.
What if you can create this gallery in dynamic way...!!
Here i made a solution that parses xml from a flikr rss feed and shows this on your browser directly. Here is the xml structure of flikr looks like-


You have to parse media:content and media:thumbnail through your server side code and after this you have to send them to client side of the page.
currently if you open index.html file on a editor then you will see the page contain detail of 2 image path and its detail at very end of the page.
so what you have to do, you have to fill dao.ReadImage( 0,'','','',''); method dynamically through server side code. For this you have to create a ASP.Net atmosphere for your project. So create a new asp.net c# project and at you root directory place all files and directories of JAIPHO that contain all files in same structure.
Now your default.aspx file and index.html file should contain in the same base directory.
The next thing you have to copy and paste all code between and tag from index.html to Default.aspx. Now if you will run your Default.aspx file, it should run normally as your index.html file runs. Add 2 text boxes to the default.aspx page with id TextBox1 and TextBox2.
Next step is to start making code for the parsing of the flikr rss. Here is the way i made-
the code above grabs thumb and image urls from the rss feed and appends them with a comma (,). After committing the whole for loop, both of your textboxes has comma separated urls of image and thumb image.
Now come to your .aspx file. Comment all lines than contains sets of image path and titles i.e. dao.ReadImage( 0,'','','','');
What you have to do, you have to fill this dao.ReadImage( 0,'','','',''); method dynamically with the comma separated urls from your text boxes. For this you have to fill javascript array will urls at every indexes. So First take the full text of the Textbox into a var type like this. Do this just above the declaration of var dao = new Jph_Dao();
do like this-
now fill array with comma saperated urls-
doing this, myArr and myArr2 contains urls at all of its indexes.
Now here is the final step. You have to fill dao.ReadImage( 0,'','','',''); with the help of a for loop-
Now when you run the Default.aspx, this will take images from flikr rss and will execute gratefully.

Feb 17, 2011

iPhone Application Ad Hoc Distribution Step 1

NOTE- this tutorial is based on iphone dev SDK 4.2

Ad Hoc Distribution allows you to try an application before it’s available in the iTunes App Store.

This is how we distribute iPhone applications to selected peoples  as a beta release

The Apple method requires pre-registration of beta testers. In order to register them you need to know their devices unique device identifier (UDID) and then create a mobile provisioning file - a security certificate that authorizes that unique device to run the App being tested.
You are limited to 100 devices per App using this method meaning you can only have 100 beta testers.
Here are the steps to follow-
Step 1: Open up your ad hoc provisioning profile in Text Edit and verify that it contains a “<key>get-task-allow</key>”. If it does not, generate a new provisioning profile using the Program Portal.

Step 2

Feb 16, 2011

Ad Hoc Distribution Step 2

Step 2: open your project in Xcode, select File > New File. In the dialog source list, under iPhone, select “Code Signing”. Select “Entitlements” then click the Next button.


Step 1 Step 3

Feb 15, 2011

Ad Hoc Distribution Step 3

Step 3: Keep the name of this file as it is. Click finish button


Step 2
















Step 4

Feb 14, 2011

Ad Hoc Distribution Step 4

Step 4: Open Entitlements.plist in xcode and Check whether 'get-task-allow' key exists or not. if not, right click on Root, then add Row.


Step 3 Step 6

Feb 13, 2011

Ad Hoc Distribution Step 5

Step 5: write 'get-task-allow', and click on 'Type' .

Step 4 Step 6

Feb 12, 2011

Ad Hoc Distribution Step 6

Step 6: Select type boolean and make sure the checkbox is unchecked.

Step 5 Step 7

Feb 11, 2011

Ad Hoc Distribution Step 7

Step 7: Now right click on top right project name and select 'Get Info' . or select project name and click on 'i'

Step 6 Step 8

Feb 10, 2011

Ad Hoc Distribution Step 8

Step 8: Select Build segment and set configuration as 'Release'


Step 7 Step 9

Feb 9, 2011

Ad Hoc Distribution Step 9

Step 9: under code signing> code signing identity, select your provisional profile. If you don’t see the name listed, make sure that the .mobileprovision file is located in ~/Library/MobileDevice/Provisioning Profiles and that the “Code Signing Identity” is set to “iPhone Distribution”.


Step 8 Step 10

Feb 8, 2011

Ad Hoc Distribution Step 10

Step 10: at the same place, double click on 'Code Signing Entitlements'. Delete if there are already some path defined, and write your entitlement file name. i.e. Entitlements.plist


Step 9 Step 10

Feb 7, 2011

Ad Hoc Distribution Step 11

Step 11: Confirm same steps for Target also-






Step 10 Step 12

Feb 6, 2011

Ad Hoc Distribution Step 12

Step 12: Now again right click on root of your application and select 'reveal in finder'. Doing this will open the folder where your this project is lying.

Step 11 Step 13

Feb 5, 2011

Ad Hoc Distribution Step 13

Step 13: come back to your xcode and set application status as Device and Release-


Step 15 Step 14

Feb 4, 2011

Ad Hoc Distribution Step 14

Step 14: Now press Command+Q or Quit the XCode.


Step 13 Step 15

Feb 3, 2011

Ad Hoc Distribution Step 15

Step 15: Go to project base directory and remove all builds.-


Step 14 Step 16

Feb 2, 2011

Ad Hoc Distribution Step 16

Step 16: Open your project again and Select Build> Build and Archive





Step 15 Step 17 

Feb 1, 2011

Ad Hoc Distribution Step 17

Step 17: After build completed, the organizer should open itself. if not then open it.



Step 16 Step 18 

Jan 31, 2011

Ad Hoc Distribution Step 18

Step 18: Select you application and press 'Share'




Step 17 Step 19

Jan 30, 2011

Ad Hoc Distribution Step 19

Step 19: Press on 'iphone distribution' and confirm your provisioning profile-


Step 18 Step 20

Jan 29, 2011

Ad Hoc Distribution Step 20

Step 20: put url where you are going to place your ad hoc application. don't forget to add '.ipa' after application name. Give a title (Whatever).



Step 19Step 21

Jan 28, 2011

Ad Hoc Distribution Step 21

Step 21: Now the process will ask you where to save files. Give a path and there you will see 2 newly created files.


Now the next topic will describe you how to process you server side, where you are about to upload your ipa, plist and mobileprovision.