dynamic image cropping in react-native using React-Native-perspective-image-cropper - react-native

I am trying to make dynamic image cropper. I came across this package which seems to be working absolutely as I want.
I am trying to add this in my application. I followed the steps as specified in document
install react-Native-perspective-image-cropper and react-native-svg and link them
Download opencv framework and add that in ios project
but I keep getting the error
"opencv2/opencv.hpp' file not found"
Anyone came across same kind of error and can help?

You may need to add the following to your settings.gradle:
include ':openCVLibrary310'
project(':openCVLibrary310').projectDir =
new File(rootProject.projectDir,
'../node_modules/react-native-perspective-image-cropper/android/openCVLibrary310')
See instructions here

Related

Manually adding Libraries on react-native ^60

Unsure where else to address this.
The autolinker feature is great, however, i've come across issues with adding libraries manually after rn ^60.
A good example would be the PushNotificationIOS library. In the past all that needed to be done was manually add it in the Libraries and tweak Build Phases a little.
https://facebook.github.io/react-native/docs/linking-libraries-ios#manual-linking
Doing the same process now won't build as the build system cant find the header paths.
So the question is:
Is it the case that manually linking cant work like it used to anymore?
P.S: Another approach would have been to use the #react-native-community versionf of PushNotificationIOS but that seems to be problematic right now because of : https://github.com/react-native-community/react-native-push-notification-ios/issues/16
Here's my upgrade path for 0.60.x with react-native-push-notification, worked after resolving several errors:
Upgrade to latest: yarn add react-native-push-notification
yarn add #react-native-community/push-notification-ios
Ensure any references are removed from your Podfile (including commented references, or react-native will still complain)
in Xcode, remove RNCPushNotification from General -> Linked Frameworks
Remove previous PushNotification code from AppDelegate.m
react-native link #react-native-community/push-notification-ios
If this didn't add code in AppDelegate.m (it didn't in my case) then manually add the code from their GitHub page
One more gotcha - when testing that it works, make sure your app is closed or a local notification won't fire.
The process above resolved all my errors. Hope it works for you!

iOS UI Test Project 'MailCore/MailCore.h' file not found

I did a
git clone https://github.com/MailCore/mailcore2.git
I open the
iOS UI Test.xcodeproj
I run the Build
I get the error
'MailCore/MailCore.h' file not found
I cannot understand why that is happening.
What should I do to get this to build?
Some other sources I have found and followed their instructions are below. None of which fixed this problem.
https://github.com/MailCore/mailcore2/issues/316
https://github.com/MailCore/MailCore/issues/19
https://github.com/MailCore/mailcore2/issues/276
I also was able to open the
mailcore2.xcodeproj
and successfully build each of the targets. Which is interesting that I can do that but cannot build the test project independently.
I also followed the video and read me instructions to add to an existing project and was able to build until I added the
#import <MailCore/MailCore.h>
to one of my files.
UPDATE:
The above process I initiated on my iMac.
On my MacBook Pro after I cloned mailcore2 I opened
mailcore2.xcodeproj
first then did the build on each of the targets.
Then I closed that project.
Opened the iOS UI Test.xcodeproj and did a build on that.
This was successful.
However, I still want to know what would cause the problem with the "file not found"
UPDATE 2:
I removed to trash all mailcore2 code from my iMac.
I created different locations in Finder for doing another clone of mailcore2.
I did the git clone.
I opened mailcore2.xcodeproj
I followed the exact same process of building each target like I did on my MacBook
I then opened the iOS UI Test.xcodeproj and did a build.
I get the same problem of
'MailCore/MailCore.h' file not found
Makes no sense to me how it works on macbook but not on iMac.
You can add in target dependency static mailcore ios(mailcore2).
and add the framework libmailcore-ios.a
Its working.
What I finally did was drop mailcore2 into an existing app I already had started.
To do this I did the following:
I removed all traces of mailcore2
I again followed the instructions in the README and the video help.
This time I followed some instructions from
https://github.com/MailCore/mailcore2/issues/276
The instructions in that link says to add the following to Library Search Path:
$(PROJECT_DIR)/mailcore2/Externals/ctemplate-ios/lib
$(PROJECT_DIR)/mailcore2/build-mac/build/Debug-iphonesimulator
And the Header Search Path to
$(PROJECT_DIR)/mailcore2/build-mac/build/Debug-iphonesimulator/include - recursively
But, that did not work for me. I had to add the HARD CODED PATH to each of those 3 folders.
After doing a clean and build I was then able to add the
#import <MailCore/MailCore.h>
Now it BUILDs completely without error for me.
I will go back and try to add proper relative paths to each of those Search Paths.
Hopefully this helps somebody else with same issue.
FWIW
Had same problem, spend hours trying - nothing worked, not ever hardcoding paths.
Then I stumbled on one issue:
if in XCode\Preferences\Locations I go to Derived Data - Advanced and set it to different locations it always reverts it to Unique, when I go back and check it.
Then I went in File\Project Setting to Derived Data - Advanced and there it was set to Unique. I changed it there to Default and now it does not have that issue anymore!
I delete Derived data, clean project and Start build (Ctrl+B) and I can see now how Build is being created in derived data w/o problems. And that what mailcore needs to function.
And, I checked - no need for hardcoded paths either!
Hope it helps somebody.
PS Another feature maybe useful too - XCode\Preferences\Continue building after error though it did not matter in my case

DTCoreText file not found

I am trying to use DTCoreText and I have followed the setup documentation to the T. Everything seems to be working find and my project builds correctly, however, when I try to import some classes to try them out in my view controller I get a file not found.
I didn't make any changes to this project for simplicity its a Single View bare bones template with DTCoreText configured to work with it after following the setup instructions on DTCoreText's github
I have posted a zipped version of my project here:
Is there something I am missing here?
Any and all help is greatly appreciated-

Installing Reskit and libRestKit.a is missing (red text)

I am following the RestKit setup instructions perfectly, but I am getting libRestKit.a in red in the Linked Binary With Libraries.
Install instructions:
https://github.com/RestKit/RestKit/wiki/Installing-RestKit-in-Xcode-4.x
I would try to drag the libRestKit.a file to my project, but cannot find it anywhere in the Restkit download?
Anyone run across this issue?
Running Xcode 4.5.2
UPDATE: See comments below. Now I am getting "File not Found" for #import
The solution is NOT to copy the "$(BUILT_PRODUCTS_DIR)/../../Headers" from any webpage. Type it out as Xcode didn't like the " copied and pasted. I just replaced the " copied and pasted with manually typed and it worked.
You can try to install RestKit using CocoaPods, then you include like this: #import "RestKit/RestKit.h"
check how to work with cocoapods and restkit here:
https://stackoverflow.com/a/13762665/1848750
If your getting the "File not found" error, check your project settings.
File > Project settings
Derived Data Location > "Project-relative"
Select "Advanced"
Select "Unique"
Clean & Build
The ".a" file doesn't exist until it's built. And if you followed those directions perfectly, I'm guessing you have embedded the RestKit project within your own project, yes?
Here is a image from the instructions; a critical step you need to do (provided you have properly added the RestKit.xcodeproj into your own project). You need to add the .a file (which doesn't exist yet, but will once it's built) as a target dependency to your own app.

to generate header docs from generated code

I am a beginner in iOS development.We are trying to develop an application in xcode using objective c.We have imported the codes and libraries and builded it successfully.Now the issue is to generate header doc from generated code.For that we navigated to the generated code folder using terminal and gave the following commands:
headerdoc2html –o GeneratedDocDir GeneratedCodeDir
gatherheaderdoc GeneratedDocDir
But it generated 3 zerobytes file only.
Can anyone please help us to solve this problem?
Without knowing your code/configuration, it is guessing only, but you should check
existence of HeaderDoc comments / tags
your configuration in /$HOME/Library/Preferences/com.apple.headerDoc2HTML.config