Polidea/ios-class-guard - Error with installed libraries - ios

We are using Infragistics grid in our project by installing the library (.dmg), library header files in "/Developer" path.
When obfuscate the project we got this error:
TTouchGridView.h:9:9: fatal error:
'IG/IG.h' file not found
#import <IG/IG.h>
*Xcode 7.1.1

Remove your frameworks IG and IGChart from Xcode Project.Add Manually from /Developer/Infragistics/NUCLiOS 2015 Volume 2/Framework folder or drag and drop both frameworks from same folder to xCode project.
Then try to clean and super clean , Now Compile the Source it will work

Related

jonkykong/SideMenu is not working in Xcode 11.3 and iOS 13

Describe the bug
Clone and run project in xcode 11.3 with Catalina MacOS and example project will not compile.
To Reproduce
Steps to reproduce the behavior:
Clone/Download project
Open it in Xcode 11.3
Compile Example Project
See error
Expected behavior
Example project must compile without
error.
As hinted at in the comments, the project has dependencies which cannot be found.
According to the path that it is complaining about, its missing one or more Pods
So normally you would go into the project folder in your terminal and enter pod install which will install the missing libraries.
Once you have done this open the workspace (not the project) and then it should work.
Problem is related to different than expected file structure and naming conventions of the Pod
Copy a Info.plist from SideMenu folder to Pods->Target Support Files->SideMenu folder and rename it there to SideMenu-Info.plist
Copy the SideMenu.h from SideMenu folder to Pods->Target Support Files->SideMenu folder and rename it there to SideMenu-umbrella.h
Copy the SideMenu.h from SideMenu to Pods->Target Support Files->Pods-Example and rename it there to Pods-Example-umbrella.h
Rebuild the project

Using a static iOS library in a NativeScript 5.4 plugin

NativeScript 5.4.2
tns-core-modules 5.4.3
tns-ios 5.4.2
Xcode 10.2.1
I am attempting to create a plugin for this background geolocation library for iOS: https://github.com/Yermo/background-geolocation-ios
The project produces a static library, libBackgroundGeolocation.a.
I have read the documentation on how to use a static iOS library: https://docs.nativescript.org/plugins/Use-Native-iOS-Libraries#static-libraries
I have read about the required directory structure: https://docs.nativescript.org/plugins/plugin-reference#directory-structure
My plugin is based on the official plugin seed, so I have a demo directory and a src directory containing my plugin code and a platforms/ios directory under that.
I have copied the BackgroundGeolocation.a file into src/platforms/ios.
I have created a src/platforms/ios/include/BackgroundGeolocation directory and copied the public header files from the project into that directory.
I notice that src/platforms/ios/include/BackgroundGeolocation/module.modulemap file has been created.
In the plugin directory I can successfully run 'npm run build'.
However, from the demo directory if I run 'tns build ios' I consistently get a "ld: Library not found for -lBackgroundGeolocation" error.
If I rename the library to libBackgroundGeolocation.a I get the "ENOENT: no such file or directory, scandir '.....ios/include/libBackgroundGeolocation" so I surmise it's at least recognizing that the library is there.
I thought that maybe it was a path problem so I tried setting the library include path explicitly in build.xcconfig using the full path to the platforms/ios directory.
No joy. It still doesn't find the library but if I misspell the name of the directory in the -L in build.xcconfig it flags a directory not found error.
I then thought that maybe it had to do with the targets in the library so I followed the recipe here Build fat static library (device + simulator) using Xcode and SDK 4+ to include multiple targets.
Still no joy.
I suspect I am missing something fundamental.
What am I doing wrong?
Is there a working recent working sample somewhere of how to wrap a static iOS library as a NativeScript plugin?
It turns out adding
LIBRARY_SEARCH_PATHS = $(inherited) "$(SRCROOT)/../../node_modules/<projectname>/platforms/ios
to the src/platforms/ios/build.xcconfig file resolved this issue.

'opencv2/opencv.hpp' file not found in Xcode

I'm using the npm package react-native-perspective-image-cropper and it requires me to install opencv2. In the package's file, it imports opencv2, with the following:
#import <opencv2/opencv.hpp>
And no matter what I do I keep getting the following error:
'opencv2/opencv.hpp' file not found
I've read almost every article and question online and I just can't figure it out. I followed the installation steps provided in the article:
I downloaded opencv2.framework from here and moved the file opencv2.framework into my ios folder.
Then in XCode, I right clicked on my project, choose add files and selected opencv2.framework
This is when I first got the error. I tried the following fixes to no avail:
I tried to reinstall and relink the npm package that I was trying to use (I'm not using cocoa pods).
I tried changing the import to be #import "opencv2/opencv.hpp" (replacing the brackets with parenthesis.
I tried adding opencv2.framework to Link Binary with Library under Build Phases
I tried adding opencv2.framework to Copy Bundle Resources under Build Phases
I changed Always Search User Paths (Deprecated) to yes
I added a Framework Search Path of:
$(inherited)
$(PROJECT_DIR)
$(PROJECT_DIR)/opencv2.framework
$(PROJECT_DIR)/./opencv2.framework
$(PROJECT_DIR)opencv2.framework
/usr/lib**
I added a Header Search Path of:
$(inherited)
$(PROJECT_DIR)
$(PROJECT_DIR)/opencv2.framework
$(PROJECT_DIR)/./opencv2.framework
$(PROJECT_DIR)opencv2.framework
/usr/lib**
I tried moving opencv2.framework under the Framework folder
I tried moving opencv2.framework directly under the package
I cleaned the product and rebuilt after each attempt and each attempt was attempted at least once (which you can imagine was a ton of fun).
Here are some of the sources I tried to use:
'opencv2/opencv.hpp' file not found
hpp file in imported framework is not found by XCode
Xcode can't find source files
'opencv2/opencv.hpp' file not found in my private pod
opencv2/opencv.hpp file not found in Xcode (note this is different than #1)
https://github.com/opencv/opencv/issues/5989
https://github.com/kylemcdonald/ofxCv/issues/167
https://forums.xilinx.com/t5/Vivado-High-Level-Synthesis-HLS/Cannot-find-quot-opencv2-opencv-hpp-quot/td-p/478368
https://groups.google.com/forum/#!topic/caffe-users/Poteul9Rz20
http://answers.opencv.org/question/34066/framework-not-found-opencv/
https://github.com/iMicknl/cordova-plugin-openalpr/issues/12
I genuinely have no clue where to look at this point. Any help would be greatly appreciated. I can also post any updates if more information would be helpful.
you can maybe try cocopod https://cocoapods.org/pods/OpenCV or https://cocoapods.org/pods/OpenCV2 in my case I am not sure why I can't install OpenCV2 with cocopod but it stop giving me error after I use cocopod

can't find ios framework headers in react native module library

I've included an iOS framework in the xcode project for the React Native module library I'm creating. Everything compiles fine when I build the ios project in the RN library itself, but once I npm install the library into my main RN project, running react-native link <project-name>, and then build in xcode, the included framework headers are not found.
I checked the normal build settings (Header, Framework, and Library search paths) and they all have $(inherited) listed.
Repo for the react native library that is WIP https://github.com/bsy/react-native-pollfish
Download SDK file from here . May be owner removes the SDK from github.
Please add this line in your package.json file.
"rnpm": {
"ios": {
"sourceDir": "./ios"
}
}
Also, unable to install your plugin with "npm install".
The solution to this issue was to make sure that both your Xcode subproject and your main Xcode project both point to a relative path to the SDK.
Steps to take:
Open your application's Xcode project.
If you don't have a Frameworks group in your project, create one.
Open ~/Documents/PollfishSDK using Finder.
Drag the pollfish.framework file into the Frameworks group of Xcode's Project Navigator. In the displayed dialog, choose Create groups for any added folders and deselect Copy items into destination group's folder. This references the SDK where you installed it rather than copying the SDK into your app.
For 3rd party framework set the framework search path in the library project-
$(SRCROOT)/../../../ios/Pods/3rd_party_framework_folder_name

Can't link fat iOS static library

I recently downloaded a fat, iOS static library for the popular C library boost. All my attempts in coaxing Xcode to link it have failed.
Things I have tried:
Adding it to Link Binary With Libraries.
Changing file type to Mach-O Object Code using File Inspector.
Renaming the file to libboost.a and adding -lboost to Other Linker Flags.
I am using Xcode 6.3 with the latest command line tools.
How To Link to an Xcode Project?
In Xcode Build Settings for your project: LIBRARY_SEARCH_PATHS
ofxiOSBoost/libs/boost/lib/ios
(Set this to the directory where the static library is)
In Target under Build Phases for your project
Add to 'Link Binary With Libraries' the boost.a found in the ofxiOSBoost/libs/boost/lib/ios directory.
Renaming to libboost.a may be breaking it. The ofxiOSBoost renames this file as to not conflict with internal OSX libs in the linking process if in path / sys, so it links correctly with the iOS Binary.
If you are still having this problem, please open an issue here:
https://github.com/danoli3/ofxiOSBoost/issues

Resources