I'm bilding mobile app the following technologies.
react-native: v0.60.0
react-native-navigation: 3.0.0-alpha.2
And I build this app for iOS, then the following error message appears in the ReactNativeNavigation code.
React/RCTConvert.h file not found
The error file is Pods/Development Pods/ReactNativeNavigation/RNNOptions.h, and this is the content of it.
#import <UIKit/UIKit.h>
#import <React/RCTConvert.h>
#import "BoolParser.h"
#import "TextParser.h"
#import "NumberParser.h"
#import "DictionaryParser.h"
#import "ColorParser.h"
#import "ImageParser.h"
#import "IntNumberParser.h"
#import "DoubleParser.h"
#interface RNNOptions : NSObject
- (instancetype)initWithDict:(NSDictionary*)dict;
- (RNNOptions *)overrideOptions:(RNNOptions *)otherOptions;
- (RNNOptions *)mergeOptions:(RNNOptions *)otherOptions;
- (RNNOptions *)mergeInOptions:(RNNOptions *)otherOptions;
- (RNNOptions *)withDefault:(RNNOptions *)defaultOptions;
#end
I have already tried,
Following this tutorial
But it didn't work well, so I additionally tried these.
Insert pod 'ReactNativeNavigation', :path => '../node_modules/react-native-navigation' into ios/Podfile.
Run react-native link react-native-navigation and pod install in ios directory
Clean and rebuild the proejct in Xcode.
with react native 0.60+ you don't need to link react native navigation manually.
simply run react-native link react-native-navigation and cd ios; pod install
for more information please see this issue
Related
After unsuccessful installing MS code push module on React Native 0.68.0 app/Monterey 12.4/Xcode 13 , react-native run-ios starts to throw error:
Build input file cannot be found: '/Users/macair/Documents/code/js/xyz_app6/ios/xyz_app6/AppDelegate.m'
Here is the AppDelegate.m:
#import <React/RCTBridgeDelegate.h>
#import <UIKit/UIKit.h>
#interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate>
#property (nonatomic, strong) UIWindow *window;
#end
The same error above appears in Xcode build as well. It seems to be a common issue with IOS but solutions online seems not working in my app. There is AppDelegate.m for project under Xcode and was unchanged (change was removed). What is missing here?
Change all AppDelegate.m into AppDelegate.mm inside project.pbxproj (a file with temptation not to look into).
My React Native version is 0.60.5 . I tried to installed react-native-view-pdf library .While Building Xcode it is throwing error says "React/RCTBlobManager.h file not found in react-native-pdf issue"
In your RCTPdfView.m file change the line "React/RCTBlobManager.h" with this
#if __has_include("RCTBlobManager.h")
#import "RCTBlobManager.h"
#else
#import <React/RCTBlobManager.h>
#endif
and delete your application in simulator if exist, then run your project again. I hope it works!
My project is Obj-C only. Via Cocoapods, I tried installing an Obj-C library that takes advantage of IBDesignable and IBInspectable. If I add that project to my library and run 'pod install' I get two errors when building/running:
error: IB Designables: Failed to update auto layout status: Failed to load designables from path (null)
error: IB Designables: Failed to render instance of PKCircleProgressView: Failed to load designables from path (null)
Ok, so apparently to take advantage of IBDesignable/IBInspectable, your code needs to be in a framework, not a static library. It seems that all I need to do then is add this to my Podfile:
use_frameworks!
When I do that, I'm able to see everything in Interface Builder, but when I build/run, it can't find AFNetworking.h. I don't think the error is specific to AFNetworking, it's just the first pod in my Podfile.
If I was using Swift, it seems like the answer is that I need to add all the libraries from my Podfile into my Swift/Obj-C bridging header.
Even though I'm not using Swift, do I still need to create a bridging header?
Here's my Podfile (without the DownloadButton pod, and without use_frameworks!):
platform :ios, '8.0'
pod 'AFNetworking'
pod 'FMDB'
pod 'HKCircularProgressView'
#pod 'Taplytics'
pod 'PAPreferences'
pod 'HTMLLabel'
pod 'IDMPhotoBrowser'
pod 'MBProgressHUD'
link_with 'Langham', 'Leela', 'Las Alcobas', 'Siam', 'AKA BH', 'Ritz Montreal', 'Fullerton', 'Fullerton Bay'
# Fix broken copy-resources phase per https://github.com/CocoaPods/CocoaPods/issues/1546
post_install do |installer|
installer.pods_project.targets.each do |target|
scriptBaseName = "\"Pods/Target Support Files/#{target.name}/#{target.name}-resources\""
sh = <<EOT
if [ -f #{scriptBaseName}.sh ]; then
if [ ! -f #{scriptBaseName}.sh.bak ]; then
cp #{scriptBaseName}.sh #{scriptBaseName}.sh.bak;
fi;
sed '/WRAPPER_EXTENSION/,/fi\\n/d' #{scriptBaseName}.sh > #{scriptBaseName}.sh.temp;
sed '/*.xcassets)/,/;;/d' #{scriptBaseName}.sh.temp > #{scriptBaseName}.sh;
rm #{scriptBaseName}.sh.temp;
fi;
EOT
`#{sh}`
end
end
Correction
IBInspectable and IB_DESIGNABLE are not Swift related. They can be used in either Swift or Objective-C. It's a matter of iOS version, and occasionally of setting the Module in IB.
Real life Example
iOS 7 does not support IBInspectable, so use the .7 class for both controls. If your project targets iOS 8+, you should use TGPDiscreteSlider & TGPCamelLabels instead
Create a base class for iOS 7 (prior IBInspectable)
#interface TGPCamelLabels7 : UIControl...
#property (nonatomic, assign) CGFloat ticksDistance;
#property (nonatomic, assign) NSUInteger value;
// ...
Create a child class for iOS 8
#interface TGPCamelLabels : TGPCamelLabels7
#property (nonatomic) IBInspectable CGFloat ticksDistance;
#property (nonatomic) IBInspectable NSUInteger value;
// ...
In this manner, your Pod can be used in either mode.
It has been solved, in details, on this TGPControls Pod.
Download the project, you will find 2 examples Xcode projects, one for Swift, 1 for Objective-C.
I got GADBannerViewDelegate.h file not found error in TOLAdAdapterAdMobAds.h although i have already included that file as shown in image below. I have used
pod 'LARSAdController', '~> 3.0'
to install the pod file for it
Just replace
#import "GADBannerViewDelegate.h"
#import "GADBannerView.h"
with
#import <GoogleMobileAds/GoogleMobileAds.h>
This has to be done as GoogleMobileAds SDK is now a framework instead of static library.
After making this change, you may get an error at request.testing = YES; in TOLAdAdapterGoogleAds.m. To correct that, just replace that line with: request.testDevices = #[kGADSimulatorID]; and everything should work fine.
I am using bootstrap 3.3.0 in my rails app but is showing below error
Error compiling asset application.css: Sass::SyntaxError: Undefined mixin 'hide-text'.
(in ../app/assets/stylesheets/application.css.scss)
Served asset /application.css - 500 Internal Server Error
Here is my application.css.scss
#import "bootstrap";
#import "bootstrap-timepicker";
#import "bootstrap-datepicker";
#import "globals/functions";
#import "globals/mixins";
#import "globals/variables";
/*#import "base";
#import "layout";*/
#import "style";
#import "vistyle";
#import "framework_and_overrides";
#import "modules/events";
#import "modules/gallery";
#import "modules/forms";
Sass::SyntaxError: Undefined mixin 'hide-text'.
hide-text is written in modules/events.css.scss file.
Its working fine with bootstrap '2.3.1.0' but not for bootstrap '3.3.0' .
It may have something to do with the version of Rails you are using. You have not specified it, but I'll assume it is Rails 3.2 (as I've had the same issue with it.) I also assume that you have the gem in the 'assets' group. If that's the case your app looks very similar to the one I've had the same issue with.
Basically this is because by default in Rails 3.2, assets group gems are not required in production.
For details, see the updated docs in the bootstrap-sass README:
https://github.com/twbs/bootstrap-sass/commit/1a4ff080af2be55f1c17b5d2c99eb5f31aaf2e97