X-Git-Url: http://git.rot13.org/?p=zxing.git;a=blobdiff_plain;f=iphone%2FREADME;h=9d6b37b6feb445c93449cd87d62646f044770053;hp=50cb2385586fa848742ca033a85671a9494d7181;hb=6ae0c7db5eae555f87c4c197a9e7308d3b387c3b;hpb=7fb0393869b7a9b63f8d385fea1df973bb151e13 diff --git a/iphone/README b/iphone/README index 50cb2385..9d6b37b6 100644 --- a/iphone/README +++ b/iphone/README @@ -22,9 +22,33 @@ How to include ZXingWidget in a easy and clean way: application's target. Under the "General" tab you will see a "Direct Dependencies" section. Click the "+" button, select "ZXingWidget", and click "Add Target" - 4. Finally, we need to tell your project where to find the ZXingWidget headers. Open your + 4. Finally, you need to tell your project where to find the ZXingWidget headers. Open your "Project Settings" and go to the "Build" tab. Look for "Header Search Paths" and double-click it. Add the relative path from your project's directory to the - "zxing/iphone/ZXingWidget/Classes" directory. Make sure you click the checkbox "relative path" ! + "zxing/iphone/ZXingWidget/Classes" directory. Make sure you click the checkbox "recursive path" ! - 5. You're ready to go. Just #import from anywhere and it should work ! \ No newline at end of file + 5. You're almost ready to go .. + + 6. #import from a file + + 7. #import for example because you will need to inject a barcode reader into ZXingWidgetController. + + 8. MAKE SURE the file in which you are using the code deader is a .mm because you are now silently including some c++ code. If you don't do so then + the compiler will cry as if it does not find some files ! + + 9. It should work :) + + +Know issues for above steps to include: +====================================== + - It can happen that when trying to build your own project with ZXoingWidgetController you get linker errors like + "undefined reference to". If this error looks like a c++ undefined reference, then renaming main.m into main.mm (Objectice-C++ source suffix) + may fix the problem + + - If you have building error like " ... : No such file or directory", then it is a classical error, it means that the path to includes is not well + specified. The best way to fix this is to look at the Build Command that failed. To do that, click on the lower right corner of your XCode project, + you should see the build command that failed. Click on it and expand it by cliking on the "more" symbols that just appeared. This will make appear + the exact command line instruction that is ran and fails. You can then make sure that the Header search path you specified is there, and you can also + copy/paste this line into your terminal and try to see if you can reproduce/fix the error by adding the right path to the compiler. Once is is fixed, + you should have an idea of what's the problem and accordingly modify your Header Search Path. + \ No newline at end of file