Static library integration in Swift Application: RSA SecurID SDK for iOS - ios

I'm trying to integrate RSA SecurID in my existing iOS Application.
It doesn't seem to be a straightforward way of achieving this task.
Here is what i've tried so far:
The files included in the zip downloaded are the following:
Add the files inside inc folder to my project as well as the libSecurIDLib.a .
Check in build phases if the library is linked in binary .
Check in build settings if the library path is correct .
Clean and Build APP and keep getting these ugly and counterintuitive errors.
Anyone have any thoughts on why i'm having this problem.
It has anything to do with the headers?
Thanks!

You haven't added the other dependencies that are listed on page 38 of the Developer's Guide.
Specifically these errors are caused because you haven't added libxml2, but you also need libsqlite3 and the System configuration framework.

Related

How to construct a Swift Package that links to a local (not system) library?

I must have read over a dozen posts on possible techniques to link a local library into my Swift Package. Specifically, my package depends on libturbojpeg.a, which most users won't have installed anywhere. Even if they did install it (there is a DMG), I'd have to go through hoops to make sure I was linking in the correct version. I finally found a post in the Swift Forums that basically says you can't do it now.
It appears that the only way to link it now is using .linkerSettings(LinkerSetting.unsafeFlags(..., but if you use that your package can't be managed by Xcode (see above link, and I even tried it and verified it cannot be used).
Is there some kind of workaround that allows me to distribute my Swift Package with the library?
In my Package, I created a directory "Libraries" and added my library there.
I discovered that Xcode 11 places included Swift Packages in a specific location in the Derived Folders directory. This means that it is possible to tell Xcode where to find it during the link phase.
My Package has these instructions in it for users:
1) Add the Package using Xcode->File->Packages with the URL of https://github.com/dhoerl/
2) Open the app's Project Build Phases, and from the Package shown in the left file pane, drag the Libraries/.a file into the link phase. It will appear just above the that should already be there
3) In Application Build settings, under library search paths, add:
"$(BUILD_DIR)/../../SourcePackages/checkouts//Libraries"
Build and run! VoĆ­la - works like a charm!
Note: obviously this is somewhat fragile, Xcode 12 could change how packages are managed, but its possible by then that the Swift Package Manager will support linking of local libraries (its mentioned in the above link.)

Convert C & submodule included objective-C project (linphone) as a framework or static library?

I want to merge two projects.
First project
Written in objective C and swift 2.3
Pod dependencies
Have different Targets
Submodules dependencies
Second project
https://github.com/BelledonneCommunications/linphone
Written in Objective C
dependency on linphone SDK written in C
Submodules dependencies
How can I convert Second project(linphone) as a framework?
EDIT 1
I have integrated linphone project(second project) including the C
written linphone SDK and Rectified all compile time errors. and now i
am able to run the project. But what I will do for Submodules dependencies?
EDIT 2
As per now, succeed login with our own SIP server account. Right
now my issue is
LinphoneManager
- (void)createLinphoneCore
- theLinphoneCore = linphone_core_new_with_config(&linphonec_vtable, _configDb, (__bridge void *)(self));
theLinphoneCore is NULL, why?
NOTE: Still i didnt integrate submodules, but i can do audio & video call everything works fine.
The only sane way to build a complete liblinphone SDK is through the appropriate client repository, e.g. linphone-iphone or linphone-android. As you have discovered, it is possible to build as a framework or static library using:
./prepare.py -c && ./prepare.py -DENABLE_STATIC_ONLY=ON && make && make zipsdk
Set DENABLE_STATIC_ONLY=ON for libs, and =OFF for a framework:
Be aware: as of June 2017, the framework configuration is still under development. It builds and runs in the simulator and on actual hardware, but the resulting app binary can't be submitted to Apple because the sub-frameworks aren't configured correctly. If you don't need to submit (not even TestFlight!) for 2-6 months maybe they will finish up soon.
If you need a functional product sooner, use the static lib configuration. The only tricky part is getting everything set up in your project/workspace.
Do a full clean and build using prepare.py as above
Extract the sdk zip file into your own project directory as liblinphone-sdk
Add the libraries in liblinphone-sdk/apple-darwin/lib to XCode's Linked Frameworks and Libraries section under General. Click +, select "Add Other", navigate to the libs directory. Don't forget to include any in liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins
You may need to add a Build Setting for Header Search Path $(SRCROOT)/liblinphone-sdk/apple-darwin/include
You may need to add a Build Setting for Library Search Path $(PROJECT_DIR)/liblinphone-sdk/apple-darwin/lib
The XCode project for linphone-iPhone is a good place to discover other tweaks you may need to make.
Setting up your workspace will probably require trial and error. Xcode is not great with the errors but you should be able to use the Report Navigator view to see complete build logs and error messages. If you have an undefined symbol for example, you can try grep -ri SYMBOLNAME liblinphone-sdk to figure out what library might be missing.
Regarding your EDIT 2 question, you need all the submodules or it won't work. ortp, belle-sip, mediastreamer, srtp, mbedtls, they are all essential. Only the mediastreamer plugin codecs are (somewhat) optional.

How to integrate Unity inside native iOS App?

I'm having troubles integrating a simple Unity project inside a native iOS App.
I followed this this tutorial but I think that some things have changed since it was written. I'm stuck with this error:
And thats not the only one, there are 1600 files that include include that file. The problem is that all this 1600 files have a wrong reference to il2cpp-codegen.h
This are my build settings for the Unity project:
So, after following all the tutorial, should I change all the files so that all the references would be correct? Or am I missing something else?
Thanks!
Joel
EDIT
I'm currently using Unity 5.1.1f1 Personal version.
Do you have a warning saying folder not found or something like it?
I think you didn't set the path for Libraries/libil2cpp/include in your header search paths.
You probably didn't copy the Libraries/libil2cpp folder.
That folder isn't visible inside the Xcode project but you can find it in Finder. You should try and copy that folder also and maybe add it to the Build Phases in Xcode. Not sure about this last step.

VS-MDA: Custom iOS-Framework in Plugin

we want to create a MobFox-Plugin for our hybrid apps. It is already running well in CLI-Cordova Apps, but it does not work in our hybrid apps, because it seems that the directory structure of the framework (the symbolic links between headers and version directory) is destroyed by Windows, where the framework is inside the plugin in the mda project. If I start a build, the header directory of is not recognized as a symbolic link, but as an ordinary executable textfile on the Mac.
This is how I include the framework in the plugin xml:
<framework src="libs/ios/MobFox.framework" custom="true"/>
I also tried to copy the MobFox.framework to the SDK Frameworks Folder and reference it like the standard system libraries (which work well):
<framework src="MobFox.framework" />
But this also fails, though the Framework is now included correctly in Xcode. But the compiler now says that it cannot find the MobFox.h-class, this is how it's included:
#import <MobFox/MobFox.h>
So I really think that the problem is that Windows cannot handle the symbolic links inside the .framework File. Does anybody has a workaround or solution for this problem? Or an idea why my Workaround with placing the file in the Standard-Frameworks Folder does not work?
Any help would be highly appreciated.
Thanks
Same problem here - it appears that when the plugin is published to the cordova registry it loses the symbolic links inside the .Framework package that tell XCode where everything is.
They are maintained on git, so it is something in the plugman export/publish that is going wrong.
So for example
cordova plugin add https://github.com/uxcam/cordova-uxcam
will work for the plugin I am writing, but not
cordova plugin add com.uxcam.cordova.plugin
which is the published version.
If you delve down into the 'plugins' folder of the project you added it too and 'show package contents' on the com.uxcam.cordova.plugin file you can then get into 'src/ios'UXCam.framework' and see how it has messed up the symbolic links in the framework folder that should point at the Headers folder and a link the the library binary as well.
Reference: Cordova bug report here: https://issues.apache.org/jira/browse/CB-6092
Update: I've worked around the problem by manually putting files in the framework into the places they need to be. So now on the github project I reference above you can see that the framework library is directly in the UXCam.framework folder, and there is an explicit Headers folder that has the UXCam.h file in it. This works for a published plugin now.
Not an ideal solution and every time I update the framework I'll have to fix the layout again, but works for now until I can find the proper place to report the problem.

Using DCMTK in iOS application

I want to use DCMTK in my application and have successfully compiled DCMTK 3.6.0 for the iOS Simulator. Then I created a workspace into which I added the DCMTK project and my application. I added the .a files as target dependencies and linked the binaries. I think I am missing the part where I have to set the header/library search paths. I try to include a header file say #include "dcm2xml.h" and it says file not found. What am I doing wrong?
I have seen this. -> How to use DCMTK in an iPhone project But I think there's a simpler way without using that framework.
you can find some info on how to compile dctmk for ios and simulator here,
and from here you can download a demo project which make use of the dcmtk. It will not display the image but will print the information found in some tags found in the file. I hope it will help you start.

Resources