Ad Hoc profiles and application distribution via web

Note: Check this post for new details how to setup ad hoc profiles over web for beta testing.

So after several hours of try and fail I have succeeded finally with distribution of Ad Hoc signed applications for beta testing via web. What does this mean? It means that now I have a way to distribute application without asking user to copy provisioning profile and application file to iTunes and then sync iPhone with it. Now, only thing that they need to do is to click on the link in e-mail, which will open website on device and there they can click to install application and profile on the iPhone.

Now I’m going to describe whole procedure for this and I will include some screenshots from iPhone and mac during the process.

  • Start with XCode closed.
  • The first step is to create distribution certificate for signing Ad Hoc provisioning profiles.
  • Open Keychain Access from finder or from Applications -> Utilities
  • Now in Keychain Access open Certificate Assistant – > Request a certificate from a certificate authority

Request certificate from certificate authority

Request certificate from certificate authority

  • Fill e-mail address and Common Name and save it to disk

Certificate assistant

  • Log in to iOS Provisioning Portal and upload certificate request on portal
  • Refresh site after minute or two and then download certificate

Create distribution certificate

  • When you download it double click on it to import it to Keychain Access
  • Now you are ready for the next step. Open iOS Provisioning Portal – Provisioning profiles and create new profile
  • Select Ad Hoc for distribution method, write profile name, select App ID for targeted application and select on which devices you are going to distribute application for test. Now click on Submit button.

Create iOS Ad Hoc distribution profile

  • Again refresh site after couple of a seconds and download provisioning profile.
  • Now double click on the provisioning profile to install it in XCode. XCode organiser will open and show provisioning profile in the list of profiles
  • It’s time to prepare application for distribution.
  • Open project and open project info.
  • Select configurations tab, chose Release configuration, click on duplicate button and name it Ad Hoc or whatever you like

Duplicate release configuration

  • Go back on Build tab and select Ad Hoc configuration
  • Find Code Signing, double click on Entitlements value field and write Entitlements.plist there
  • Now under Code Signing Identity check if right Provisioning profile is selected (the one that you have created and imported on the beginning)

Code signing

  • Close project info
  • Now under the Group & Files click on the Project name and add new file
  • In file menu chose Code Signing and select Entitlements as file type, name it as Entitlements.plist and save under the root
  • Open Entitlements.plist and under the root add one boolean value with name get-task-allow and leave it as unchecked (false)

Create entitlements.plist file under root

  • Chose Ad Hoc configuration and Device instead simulator
  • Open Build menu and select Build and Archive
  • When the project build is done XCode Organizer will open automatically and show Project name with one archived build under it
  • Click on that build and select share application
  • Confirm identity as iPhone Distribution and profile that you have created last and select save to disk to save .ipa file
  • Now in order to continue you need to downloade iOS Beta Builder by Hunter
  • Open iOS Beta builder and select the .ipa file that you have saved in the previous step or drag and drop it on Beta Builder
  • Beta Builder will fill out all fields for you except web address of the server where you will have files uploaded
  • When you write URL click on Generate Deployment Files and choose destination directory
  • Now when files are saved you can upload all files to some web server and give the link to the beta testers
  • All they need to do now is to click on the link on iPhone and then in Safari to click on Install link to install application and provisioning profile

Download application

I hope that I have helped a bit with Ad Hoc profiles and distribution of applications for your beta testers.


If you don't already have a Dropbox account then you can create it by clicking on my affiliate link. You will receive 2GB free account + 250 MB extra and I will receive 250 MB as well. Win-Win :-)

Posted in iPhone | Tagged , , , , , , , , , , , , , , | 4 Comments

iPhone contacts sync with Google exchange – problem solved

Today I have sorted and deleted old contacts and when I have synced them from Google to my iPhone (after erasing all contacts on my iPhone) I run into the problems.

All contacts were there but maybe 1% had real phone number, while others didn’t had any numbers at all.

So I have found that solution to fix this is to edit almost all contacts because fields were not correct. Mobile field for mobile phone number was written as MobilePhone but iPhone would not recognize it.

Then I have found one more odd thing. Even if contact has Mobile as mobile phone field it still doesn’t mean that it will show on iPhone properly. So solution was to change Mobile to something else, click anywhere so Gmail can save changes and then return to mobile and click again somewhere outside the Mobile field so that Gmail can save it correctly.

Now I have only 100 contacts left to edit.


If you don't already have a Dropbox account then you can create it by clicking on my affiliate link. You will receive 2GB free account + 250 MB extra and I will receive 250 MB as well. Win-Win :-)

Posted in iPhone | Leave a comment

Debugging EXEC_BAD_ACCESS on iPhone

Last night I had a problem with application crashing without obvious reason, I didn’t change much in code (I thought so). So a bit googling and I found solution written by codza how to debug this and find the source of the error.

Here is link to his blog post.


If you don't already have a Dropbox account then you can create it by clicking on my affiliate link. You will receive 2GB free account + 250 MB extra and I will receive 250 MB as well. Win-Win :-)

Posted in iPhone | Tagged , , , , , , , , , , , , | Leave a comment

UIImageView is moving view to 0,0

Today I had weird problem while creating one iPhone application.

I have created one UIView and added one UIImageView to it and loaded it with Default.png image, but when starting the program whole view is moved up for 20px, it’s y reference is starting from 0 instead from 20, so here is how to fix it easily.

In application didFinishLaunching delegate add following code before [window makeKeyAndVisible]; and after [window addSubview:yourView];

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

[window addSubview:yourView];
[yourView setFrame:CGRectMake(0, 20, 320, 460)]; // so you are creating frame which x starts on 0, y starts on 20px and with dimensions 320px x 460px
[window makeKeyAndVisible];

return YES;
}


If you don't already have a Dropbox account then you can create it by clicking on my affiliate link. You will receive 2GB free account + 250 MB extra and I will receive 250 MB as well. Win-Win :-)

Posted in iPhone | Tagged , , , , , , , , , , | Leave a comment

Failed to initialize dynamic preprocessor: SF_SDF (IPV6) version 1.1.1

Today I have tried to update my Snort and rules and when testing I got this error message because IPV6 was not enabled on my computer.

The fix is very simple, just delete sf_sdf.dll file from C:\Snort\lib\snort_dynamicpreprocessor directory and start snort again.

Update of snort is very simple and it can be described in few simple steps which can be used for fresh install as well:

  • download Snort 2.8.6 from the www.snort.org site
  • download WinPcap 4.1.1 from the www.winpcap.org
  • install both of them on the target machine
  • download the latest community rules from www.snort.org (you need to register and log in to be able to download them)
  • extract rules to C:\Snort overwriting existing files and open Snort.conf file in the etc map
  • find line nr. 155 and replace it to this dynamicpreprocessor directory C:\Snort\lib\snort_dynamicpreprocessor
  • then replace line 158 to this dynamicengine C:\Snort\lib\snort_dynamicengine\sf_engine.dll
  • and then comment out line 161 if you don’t have dynamic rules #dynamicdetection directory /usr/local/lib/snort_dynamicrules
  • now when you are done if you are not using IPV6 delete sf_sdf.dll file from C:\Snort\lib\snort_dynamicpreprocessor to avoid this error
  • start Snort to test it
  • start Snort as service if test is OK

If you don't already have a Dropbox account then you can create it by clicking on my affiliate link. You will receive 2GB free account + 250 MB extra and I will receive 250 MB as well. Win-Win :-)

Posted in Tips and tricks | Tagged , , , , , , | 2 Comments

#Arduino flash trigger v1 – parts list and schematics

So as promised here is the parts list for the first version of the Arduino flash trigger.

  • 1x Atmega 168 or smaller chip with Arduino bootloader preprogrammed (the code compiled is only 4k)
  • 1x 28-pin IC socket (so that you can use chip for other projects latter)
  • 1x 16MhZ ceramic resonator
  • 1x 16×2 lcd display, HD44780 compatible
  • 1x 7805 5V voltage regulator
  • 4x micro buttons
  • 1x SFH615 optocouppler
  • 2x 3mm led diodes (green for power and yellow for activity)
  • 4x 220R resistors, 1x 10K resistor and 1x 1K resistor
  • 2x trim potentiometers (4K7 and 10K)
  • 3x male headers(6-pin, 3-pin and 2-pin)
  • 3x ceramic capacitators(0.1 uF, 1uF, 10uF)
  • 1x 3.5 mm female jack for connection to laser

Now this post wouldn’t be complete without Eagle schematic and board files. You can download them on the following link: Trigger schematics (405).

I don’t have schematics of the laser side because it’s simple. I’m leading 3 wires with 3.5mm audio cable, analog in, gnd and vcc(+5V). In the laser box I have laser which is connected directly to the vcc and gnd, one foto resistor that is giving to high value to analog in so I have one resistor before it connected to gnd.

So we have:

  • GND wire is connected to laser gnd wire and to one side of let’s say 2M resistor which other side is connected to one leg of photo resistor
  • VCC wire is connected to laser vcc wire
  • Analog in wire connected to other leg of the photo resistor

It depends on which photo resistor you are using how big resistor value before it you have to use. Arduino is capable of reading analog in until value of 1024 and that’s reason why the big resistor value is needed, so you are testing which one do you need until the value of direct laser beam to the photo resistor is under 1024, mine is about 920.


If you don't already have a Dropbox account then you can create it by clicking on my affiliate link. You will receive 2GB free account + 250 MB extra and I will receive 250 MB as well. Win-Win :-)

Posted in Arduino, Photography, Projects | Tagged , , , , , , , , | 2 Comments

#Arduino flash trigger – update 2

So the first prototype board is soldered. All parts are mounted now and everything is working except debug button, I have to find why is that because I couldn’t find any obvious reason.

The soldering was OK with only few places to be fixed because of strong acid mix, but nothing special.

Here are some pictures of the finished trigger.

P.S. This is final and last prototype of the version 1. The next one will be better, without trimpots, with 3-4 keys, lot of menus and few outputs instead of one.

Stay tuned!!


If you don't already have a Dropbox account then you can create it by clicking on my affiliate link. You will receive 2GB free account + 250 MB extra and I will receive 250 MB as well. Win-Win :-)

Posted in Arduino, Photography, Projects | Tagged , , , , , , , | 2 Comments

#Arduino flash trigger – update 1

Here are two pictures of the first prototype board for the Arduino flash trigger. Things that I have changed from the last scheme are:

  • removed triggering 3.5mm female connector, instead I have 3-pin connectors to connect wires on one or two flashes
  • added 6 pin programming header so that I can program Atmega chip without removing it from the board every time
  • added 3 pin jumper header for power selection (usb/external)

Here are two pictures of a fresh etched board, not perfect on the corners because of bad mixing of the acid but good enough for the first attempt.

P.S. Updated schema coming soon.


If you don't already have a Dropbox account then you can create it by clicking on my affiliate link. You will receive 2GB free account + 250 MB extra and I will receive 250 MB as well. Win-Win :-)

Posted in Arduino, Photography, Projects | Tagged , , , , , , , , | Leave a comment

#Arduino -> Flash trigger via laser for watterdrops

Today I have been asked if I can write something about mine Nikon flash Arduino trigger video that I have put on Youtube.

And here it is, description, schematics, video and sample pictures.

The idea has already been seen on the Internet. Arduino is controlling photo resistor on which laser beam is pointed. When resistance changes itself because of the drop that is cutting beam then Arduino is triggering Nikon camera after the amount of time specified with one trim capacitor which can be between 0 and 1023, but I have divided it with 2 so that I have better control of the delay. All information is displayed on 2×16 LCD display. Also to be able to take picture of drops colliding it’s necessary that speed of the drops be 10 drops/sec so I have implemented one button for that with proper code behind it.

I have also 4 buttons and 2 led diodes on the board. Buttons that I have are reset for resetting of the electronics, debug that is switching debug mode on and off, drops that is designed to count drops per second and ready button that is used when I’m taking pictures so that when drops are falling fast I don’t trigger camera every time when they are going down. Led diodes that I’m using are green for power and yellow for visual notification when the trigger is trigged.

Here is the final schematics that I’m using right now.

Nikon-Arduino trigger schema

Nikon-Arduino trigger schema

For simplified solution with cables I’m using standard audio cables with 3.5mm stereo jacks on both sides, so I can use same cables for other purposes as well. I have also modified Nikon cable remote so that it has 3.5mm female stereo jack built in for simple use with trigger and without it.

Nikon trigger schema

Modified Nikon cable release

Here are few pictures of the whole setup.

Nikon Trigger

Nikon Trigger

Nikon Trigger

Nikon Trigger

Of course code behind is in this NikonFastTrigger.pde (349) file available for download.

Simple instructions.

  1. when the program is loaded it will display Ready on the second line
  2. when drop breaks laser beam then instead of Ready on display will be Busy until you press Ready button
  3. offten because I have laser box about 1m above the surface delay is needed between 150-220 ms

For drops counter I’m doing like this.

  1. switch to drops counter with drops button
  2. then I try to create drops stream with about 1 drop per second with help of the normal digital watch and by changing delay I set Arduino to recognize that as 1drop/sec
  3. now the only thing left is to configure drops stream to 10 drops/second for colliding watterdrops

Here are couple of pictures captured with this setup and pictures of colliding drops are to come.

And here is the video from YouTube.


If you don't already have a Dropbox account then you can create it by clicking on my affiliate link. You will receive 2GB free account + 250 MB extra and I will receive 250 MB as well. Win-Win :-)

Posted in Arduino, Photography, Projects | Tagged , , , , , | 8 Comments

CANON PowerShot and Ixus service manual and part list

Last week my kids have broken Ixus 70 that my wife got for hers birthday.

I tried to find service manual to see how am I going to assemble lens but without any success, at least not for free.

So finally when I have founded it and paid for it, I though why not have it here on blog so that everyone that needs it can get it for free.

So here are they, 2 files, service manual and parts list.

Enjoy.


If you don't already have a Dropbox account then you can create it by clicking on my affiliate link. You will receive 2GB free account + 250 MB extra and I will receive 250 MB as well. Win-Win :-)

Posted in Uncategorized | Tagged , , , , , , , , , , , | 5 Comments