ZXing barcode iphone error - objective-c

i'm trying to import the zxing into my project but i am getting the following :
can't open -exported_symbols_list file: /zxing/iphone/ZXingWidget/exportList
Anyone know how to fix this?

Which guide dou you use to import the framework? I reccoment this one.
Answer taken from here:
Ultimately you need to make a tweak so that ZXing actually decodes
barcode. In target section, double
click on your project target, and go to the build tab. Look for
the "Exported Symbols Files" and
double-click on it. Att the relative path to the exportList files
in "/zxing/iphone/ZXingWidget/exportList".
This will tell the linket to actually link with some key classes
so that this code registers the necessary
decoders.

Related

Find invalid image paths in vue project

In my Vue 3 project, all images are located in public/assets/image then in .vue files I refer to these images like assets/image/image.png.
Sometimes I might make a typo in a path or a path might not be correct anymore.
Is there any automated way to find and fix all incorrect paths in a project?
I am using "VS Code" and "IntelliJ IDEA" might be there are any plugins to handle this.
In VS Code there is an extension called Image preview
https://marketplace.visualstudio.com/items?itemName=kisstkondoros.vscode-gutter-preview
If the path is right it shows the image at the left side of the import.

Xcode cannot find ProductModuleName-Swift.h

I'm attempting to import my "-Swift.h" file into one of my Objective-C .h files but xcode keeps telling me that the file doesn't exist
#import "Aesculus-Swift.h"
If I command click on the file name it will take me to the generated header file so I know it exists. Why is xcode not able to find it?
This seems like just another issue with Xcode and it's complex tool chain of static analysers and compilers.
Openradar lists radar://21362856 - Swift to Objective-C bridging is unreliable. I am sure there are more but I stopped looking after finding one for this example.
The author imarcelv notes in the description:
I asked a Swift engineer at WWDC in a lab and even he didn't know how to fix this issue.
Steps to Reproduce:
Add a ramdom Swift class to an Objective-C project
Add the #import "ModuleName-Swift.h" file that Xcode generates automatically
Try to use it or just try to compile the project
From time to time it simply doesn't work
It's probably best to file a radar on this issue as it seems that others are already calling it out.
One other thing you could try...
Historically, it was possible for Xcode to completely lose it's syntax highlighting and you could always find out what files the static analyser was giving up on by increasing log level of clang.
I'm not sure if it's still relevant but if I was in your position I'd be trying this command:
defaults write com.apple.dt.Xcode IDEIndexingClangInvocationLogLevel 3
This generates logs you can search with using Console.app for just xcode to highlight the messages. You'll want to trash the derived data of your project to force it to re-compile things.
Although not the same issue as what you're seeing, I have had this post on the syntax highlighting issue bookmarked for years for the above defaults write command to try in times like these.
I solved this recently by adding the following entry to my .xcconfig (you could add it in Xcode's Build Settings > User Header Search Paths if you prefer).
USER_HEADER_SEARCH_PATHS = $(BUILT_PRODUCTS_DIR)/MyFramework.framework/Headers
This tells the compiler to search for headers in the build output directory, which is where Xcode puts the generated header (at least in the case of this framework).
In my case this is a directory like ~/Library/Developer/Xcode/DerivedData/MyProject-LongCode/Build/Products/Debug-iphonesimulator/MyFramework.framework/Headers/MyFramework. You might find your generated header in there too.
Xcode's header and dependency management is a hot mess, and it's not surprising that it doesn't work for you.
I had trouble with this stuff & found that your -Swift file is the Product name of your Target ( not just the name of your Target ) . I found the details here helpful: http://ericasadun.com/2014/08/21/swift-calling-swift-functions-from-objective-c/
When you encounter such situation, just find your kinda "ProductName-Swift.h" file by just cmnd+click on it (even if xcode shows warning about it is not found, the #import "Aesculus-Swift.h" string is still clickable) and then in opened code editor window choose context menu and "Show in Finder" item, then explicitly add it to your project.

(ObjC) Unable to add libraries-Help please

I'm following an objC book and I need to use readline() to obtain a string.
However, before I can even get to that, I need to add the library that contains it. Therefore, I go into Build Phases -> Link Binary With Libraries -> Press the + ->Search and Add addlibreadline.dylib
After I do this, I have an icon under my top-level item that has the name of this library. BUT when I go into my code in main.m, NOTHING is imported. There is no #import
WHY? I have tried different things for hours and am frustrated!
Am I not understanding something about importing and libraries?
Btw: I am using Version 6.1.1 (6A2008a) and Yosemite 10.10.1 (14B25)
Thank you,
Since you've got the libraries linked, try adding this:
#import <readline/readline.h>
Then you should be able to use readline().
http://forums.bignerdranch.com/viewtopic.php?f=148&t=7617

Import Box2D : file not found

I'm trying to import Box2D library but I have a compilation error : 'Box2D/Box2D.h' file not found.
I tried lots of things to solve this problem but without any success. I'm not using cocos2d so I don't have any templates.
I just drag and drop Box2D folder in my Xcode project (tried to check and uncheck the 'copy to destination folder).
Tried to check 'Always Search User Path' etc ... No success.
If someone has the solution : god bless you !
Just drag and drop the Box2D.h/Bow2D.h to your project.If it is not as simple as that, I can recommend you this tutorial which explain everything you need to know to set up Box 2D in XCode.
EDIT
I have just tried the project in the tut I referenced and i believe you didn't set-up your header search path. Box2D files are intended to be included like this: #include so you need to go to Build Settings then add an entry for the Debug and Release key of the Header Search Paths (under Build Settings)
you are looking as something like this: Debug Box2D_v2.1.2/Box2D

Box2D compile errors

I've added Box2D to a Cocos2D project I'm working on.
I've followed several guides as to how to do this (all of which seem to differ!).
However, none seem to work.
I'm getting these types of errors:
error: Box2D/Collision/b2BroadPhase.h: No such file or directory
I assumed I'd got the Header Search Paths wrong but have tried all sorts of variants with no luck.
Any suggestions?
The easiest way to use Box2d with your project is to follow these lines:
Copy the Box2d files into a subfolder of your project.
Import these files into your project via Xcode.
After in the "Project navigator", select your target and open the “Build Settings” tab.
Set the "Always Search User Paths" to YES.
Then search for the "User Header Search Path" and add this "${PROJECT_DIR}" (think to check the “recursive path“).
That's all!
You just have to be careful when you want to use Box2d. Think to change the extension of your files from .m to .mm to warn the compiler that the class must be compile as Objective-C++ instead of Objective-C.
I have found a good tutorial here (with Xcode 3.2, but the idea is here). I hope it'll help you.
Alternatively ... After a lot of trouble trying to include box2d in my project, I instead used box2d as a static library - takes a minute to setup, but it's much easier to maintain / add to multiple projects. Step by step guide here:
http://red-glasses.com/index.php/tutorials/box2d-for-ios-made-easy-make-it-a-static-library/