Hi there we looked into fuse and it looks really promising. one little thing is that for a app we are building we need to integrate a barcode scanner . there a alot of cocoapods out there for this , is there a way to load those pods ? if so can you explain me how to do this ?
It is possible, but it’s currently not as streamlined as we would like. The good news is that we’re working on making it easier to use third-party libraries together with Fuse and that we’ll be rolling out improvements to this in coming releases.
Since our Uno compiler generates new Xcode projects for each build and CocoaPods rely on basically making modifications to such a project, what you have to do is to re-run the CocoaPod installation step after each build with Fuse/Uno. This should be pretty fast once you’ve downloaded the pods the first time. You can point CocoaPods to the generated
.xcodeproj by setting e.g.
The next step once you’ve got that up and running is to actually use the library from Uno, which you can learn about in our guide about UXL: https://www.fusetools.com/learn/guides/uxl-handbook
There are some additional iOS specific UXL properties that will come in handy such as
<Require Xcode.FrameworkDirectory="@('My/Directory':Path)" /> and
<Require Xcode.Framework="TheFramework" />, used to make sure that a framework is included in the generated Xcode project.
I hope that helps, and as always, hit us up on Slack or here on the forum if you run into trouble.
Just attempted this now, however I am getting the following issue.
I created a podfile that, ran pod install, and then opened the workspace created.
The project does not compile when I do this, however if i just run a preview without doing the pod install command everything is working. If I do the pod install then open the preview generated project the same error occurs.
The workspace fails to compile with the following error
'Xli/Config.h' file not found in _config.h
That sounds like a problem with your
Header Search Paths. It should include
$VERSION depends on your Fuse installation) on top of anything that CocoaPods has added for you. The setting can be found under
Search Paths in
Hope that helps!
Can we have commands added to build.sh and run.sh?
I’ve created an example where you can use CocoaPods automatically. Just needs to compile and run from Xcode.
run.sh can replace
/usr/local/share/uno/Packages/UnoCore/0.26.9/Targets/CPlusPlus/iOS/run.sh, to be able to run pods.
And then project.pbxproj to replace
Then run this from a .uxl file:
<ProcessFile Name="Podfile" />
to copy a Podfile. It will be run automatic from run.sh.