React Native, Invariant Violation: Native component for "AIRMap" does not exist - google-maps

I'm trying to install react-native-maps
I followed the document for installation.
My install process was like below.
I used react-native link instead of cocoaPod.
npm i react-native-maps --save
myProj.xcodeproj/Libraries => Add files to "myProj" click
add myProj/node_modules/react-native-maps/lib/ios/AirMaps.xcodeproj
myProj click => Build Phases, Link Binary with libraries => add libArMaps.a
react-native link react-native-maps
However, build failed.
** BUILD FAILED **
The following build commands failed:
CompileC /Users/dadumvu/work/foodup-mobile-RN/ios/build/Build/Intermediates.noindex/AirMaps.build/Debug-iphonesimulator/AirMaps.build/Objects-normal/x86_64/AIRGoogleMapPolygonManager.o AirGoogleMaps/AIRGoogleMapPolygonManager.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
My version's here.
"react-native-maps": "^0.21.0"
"react-native": "0.55.4"
If anyone could solve this issue, please let me know about it.
Thank you.

like this How to fix"AIRMap" was not found in the UIManager error in react native?
Add to ios/YOUR_PROJECT_NAME/AppDelegate.m
#import GoogleMaps; //add this line if you want to use Google Maps
and
[GMSServices provideAPIKey:#"_YOUR_API_KEY_"]; // add this line using the api key obtained from Google Console

Related

How to fix error while creating Tool extension from Windows Admin Center CLI

This is related to developing extension for Windows Admin Center. There is SDK provided for the same by Microsoft to develop extensions. here is detail documentation which I was following "https://learn.microsoft.com/en-us/windows-server/manage/windows-admin-center/extend/developing-extensions"
Create tool extension:
Referring to section "Prepare your development environment" I have installed prerequisites.
After that I tried to next step to create tool by using Windows Admin Center CLI. I executed following command
wac create --company "Contoso Inc" --tool "Manage Foo Works"
But system gives following error
const { readdir, stat } = require('fs').promises;
TypeError: Cannot destructure property readdir of 'undefined' or 'null'.
Is there something missing while creating development environment.
Environment details
Windows 10 Professional,
npm#6.9.0,
node#v9.11.1,
angular cli: 6.1.5,
typescript 2.9.2
This is ES6 Destructive Assignment
It will need some default value. So use like this
const { readdir, stat } = require('fs').promises || {};
update-version.js can be edited and you could find this at
C:\Users\\AppData\Roaming\npm\node_modules\windows-admin-center-cli\src\update-version.js
Refer following link to know more about
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment
This issue is same as
JS/ES6: Destructuring of undefined

polymer-cli build fails for element starter template

I am trying to create a reusable component using polymer cli.
I would like to use this component into another project where i can include it as a single file import.
But when I am trying to build the project, it keeps failing.
Below are details of my environment.
$node --version
v4.6.0
$ npm --version
2.15.9
$ polymer --version
0.16.0
$ polymer init
? Which starter template would you like to use? element
info: Running template element...
? Element name (my-el)
$polymer build
$ polymer build
info: Building application...
info: Generating build/unbundled...
info: Generating build/bundled...
error: Uncaught exception: Error: file path is not in root: /Users/yogeshkulkarni/workspace/polymer/polymer/polymer.html (/Users/yogeshkulkarni/workspace/polymer/my-el)
error: Error: file path is not in root: /Users/yogeshkulkarni/workspace/polymer/polymer/polymer.html (/Users/yogeshkulkarni/workspace/polymer/my-el)
at Object.urlFromPath (/usr/local/lib/node_modules/polymer-cli/node_modules/polymer-build/lib/path-transformers.js:41:15)
at StreamAnalyzer.getFile (/usr/local/lib/node_modules/polymer-cli/node_modules/polymer-build/lib/analyzer.js:107:39)
at StreamResolver.accept (/usr/local/lib/node_modules/polymer-cli/node_modules/polymer-build/lib/analyzer.js:210:34)
at FileLoader.request (/usr/local/lib/node_modules/polymer-cli/node_modules/polymer-build/node_modules/hydrolysis/lib/loader/file-loader.js:64:27)
at Analyzer.load (/usr/local/lib/node_modules/polymer-cli/node_modules/polymer-build/node_modules/hydrolysis/lib/analyzer.js:121:32)
at Analyzer._getDependencies (/usr/local/lib/node_modules/polymer-cli/node_modules/polymer-build/node_modules/hydrolysis/lib/analyzer.js:433:25)
at Analyzer._dependenciesLoadedFor (/usr/local/lib/node_modules/polymer-cli/node_modules/polymer-build/node_modules/hydrolysis/lib/analyzer.js:401:25)
at Analyzer._parseHTML (/usr/local/lib/node_modules/polymer-cli/node_modules/polymer-build/node_modules/hydrolysis/lib/analyzer.js:227:50)
at null._onTimeout (/usr/local/lib/node_modules/polymer-cli/node_modules/polymer-build/node_modules/hydrolysis/lib/analyzer.js:125:39)
at Timer.listOnTimeout (timers.js:92:15)
polymer-cli build works fine when I choose application starter template. Is polymer-cli doesn't support building element starter template?
I had similar problems. I used the polymer INIT - 'a blank application template', to create my project.
Which didn't provide a polymer.json configuration file. I added and configured this file. Now polymer BUILD is without any errors (in my project). Because polymer BUILD needs to know about your project structure. See https://www.polymer-project.org/1.0/toolbox/server
The docs for polymer-cli state:
This command is for app projects only.
And it currently doesn't provide a user-friendly error message for this scenario, so you'll see it crash with a stack trace when building element projects.

Winexe installation in Linux

I am trying to compile and build winexe. I have downloaded the samba source and ran the following command to compile the winexe.
./waf configure --samba-dir=../../samba --samba-inc-dirs=../../samba/ --samba-lib-dirs=../../samba/
I am getting the following error. Please suggest me to resolve the error.
[3326/3810] Compiling default/source/smb_static/smb_static.objlist.empty.c
Waf: Leaving directory `/root/samba/bin'
Build failed: could not find 'source/smb_static/smb_static.objlist.empty.c' for
{task: cc smb_static.objlist.empty.c -> smb_static.objlist.empty_2.o}
Checking for library smb_static : not found
Build of static winexe : disabled
Cannot continue! Please either install Samba shared libraries and re-run waf, or download the Samba source code and re-run waf with the "--samba-dir" option.
(complete log in /root/winexe/source/build/config.log)
execfile is deprecated,
edit the file "smb_static/wscript",
remove the line with execfile and use exec(open("wscript").read()) instead

3rd party Framework Library not loaded: 'Image not found'

I am upgrading a framework to latest version. Earlier integration (>2 years old) had framework directly copied in the project; now getting cocoapod (0.39.0) to get framework integrated with project using xcode (7.2.1) and objective-c project.
Upon run, it generates following error:
dyld: Library not loaded: #rpath/name.framework/name
Referenced from:
/Users/xyz_xyz/Library/Developer/CoreSimulator/Devices/xxxxxxx/data/Containers/Bundle/Application/xxxxxxx/appname.app/appname
Reason: image not found
"Pod" xcode-project has correct reference and framework is present in corresponding folder
Found that nameFramework isn't linked (added) in any of the build phases. I am new to using cocoapods and not sure what changes would be necessary in Xcode build settings to make transition from directly-embedded framework to cocoapods based integration.
how to get past "dyld: Library not loaded" error?
What phase should I use to reference name.Framework during build as it's not getting generated?
How to copy bundle resources from Pod to project? Dragging-n-drop Pods/name/Resources/name.bundle prompts "copy item if needed" dialog. <- I don't think I need to do this when using cocoapods.
[update] Integration using cocoapods works fine when a sample or new project is used. It's something in the current project settings that's causing the issue.
Podfile:
platform :ios, '8.0'
# use_framework for swift based pod integration. requires cocoapod 0.39.0
#use_frameworks!
pod 'GTMOAuth2'
pod 'Typhoon'
pod 'Alamofire'
# Issue with name
pod 'name', podspec:'https://customers.pspdfkit.com/cocoapods/.../latest.podspec'
target :ABC do
pod '...', '~>1'
end
target :XYZ do
pod '...', :path => 'submodules/...'
end
[Update]
- Upgraded to CocoaPods 1.0.1 & modified the Podfile to uncomment use_frameworks!, and make other changes that are required for 0.39.0 to 1.0.1 migration. Here is the updated Podfile.
platform :ios, '8.0'
# use_framework is required for dynamic links (swift) based pod integration.
use_frameworks!
target 'XYZ' do
pod 'GTMOAuth2'
pod 'Alamofire'
pod 'name', podspec:'https://customers.name.com/cocoapods/.../latest.podspec'
target :XYZ-A do
pod 'XYZ-iOS-SDK', :path => 'submodules/xyz-ios-sdk'
end
end
Fixed errors such as following by adding $(inherited) flag (where applicable)
[!] The XYZ-v2 [Release] target overrides the OTHER_LDFLAGS build setting defined in ...
Progress after above changes, Pods/Target Supported Files/XYZ-v2/ has Pods-XYZ-v2-frameworks.sh and resources.sh; earlier frameworks.sh was missing. Following is partial content of the framworks.sh, and it does contain copy instructions.
if [[ "$CONFIGURATION" == "Debug" ]]; then
install_framework "$BUILT_PRODUCTS_DIR/GTMOAuth2/GTMOAuth2.framework"
install_framework "$BUILT_PRODUCTS_DIR/GTMSessionFetcher/GTMSessionFetcher.framework"
install_framework "$BUILT_PRODUCTS_DIR/GoogleAPIClient/GoogleAPIClient.framework"
install_framework "$BUILT_PRODUCTS_DIR/Mantle/Mantle.framework"
install_framework "${PODS_ROOT}/PSPDFKit/PSPDFKit.framework"
install_framework "$BUILT_PRODUCTS_DIR/SSKeychain/SSKeychain.framework"
fi
// and for "Release" & "Distribution" as well..
Now I am trying to resolve compile errors upon build, which are related to static vs dynamic library includes.
/path../Pods/SSKeychain/Sources/SSKeychain.h:65:1: Duplicate interface definition for class ‘SSKeychain'
[Updated] Posted a new question: CocoaPods 1.0.1 Redefinition of 'XYZ', Redefinition of enumerator 'ABC', Duplicate interface definition for 'MNO'
Related:
OS X Framework Library not loaded: 'Image not found'
Seems relevant: https://github.com/CocoaPods/CocoaPods/issues/4772
Try using use_frameworks! (it's currently commented out). PSPDFKit is a dynamic framework, so you need to enable this option.
Also try it with the newest Xcode and CocoaPods >= 1.0.0. Older versions might not work correctly.
You can find more information about PSPDFKit integration via CocoaPods here: https://pspdfkit.com/guides/ios/current/getting-started/using-cocoapods
If all of this doesn't help you can reach the PSPDFKit developers directly at https://pspdfkit.com/support/request
same issue on dyld: Library not loaded: #rpath/TwilioAccessManager.framework/TwilioAccessManager
Reason: image not found
I had the same problem, this fixed it for me.I Changed Framework status required to optional .

MSDeploy gulp build package

Is it possible to deploy a Single Page App project build using grunt to IIS using MSDeploy from TeamCity? The project is not any kind of Visual Studio solution and doesn't get built using MSBuild.
My Command parameters which are not working are:
-source:package='%teamcity.build.checkoutDir%\Dist.%build.number%.zip' -dest:auto,computerName="%system.MsDeployServiceUrl%",userName="%system.UserName%",password="%system.Password%",authtype="basic",includeAcls="False"
-verb:sync -setParamFile:"%teamcity.build.checkoutDir%\Dist.%build.number%.zip.SetParameters.xml"
-AllowUntrusted -setParam:"IIS Web Application Name"="%system.WebSiteName%" -verbose
The error I am getting is:
[11:47:31][Step 3/3] Error Code: ERROR_EXCEPTION_WHILE_CREATING_OBJECT
[11:47:31][Step 3/3] More Information: Object of type 'package' and
path 'D:\TeamCity\buildAgent\work\e2b0015b49d87e90\Dist.30.zip' cannot
be created. Learn more at:
http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXCEPTION_WHILE_CREATING_OBJECT.
[11:47:31][Step 3/3] Error: The Zip package
'D:\TeamCity\buildAgent\work\e2b0015b49d87e90\Dist.30.zip' could not
be loaded. [11:47:31][Step 3/3] Error: Could not find file
'D:\TeamCity\buildAgent\work\e2b0015b49d87e90\Dist.30.zip'.
[11:47:31][Step 3/3] Error count: 1. [11:47:31][Step 3/3] Process
exited with code -1 [11:47:31][Step 3/3] Step Deploy (Command Line)
failed
My build process is working as I end up with the correct artefacts, I just don't seem to be able to deploy my generated artefacts using MSDeploy
This is a screenshot of my artefacts:
I managed to get this working by changing my parameters to the following:
-source:iisapp='%teamcity.build.checkoutDir%\dist' -dest:iisapp='C:\www\xxxx-website',computerName="%system.MsDeployServiceUrl%",userName="%system.UserName%",password="%system.Password%",authtype="basic",includeAcls="False"
-verb:sync -AllowUntrusted -verbose
And changing my user to an admin user rather than an IIS user. Note use of iisapp - the key was to read the MSDeploy api using msdeploy -help
FYI - a good test is to use the intended command against msdeploy.exe in console and check output errors then push command into teamcity when it's working.
I created a grunt and gulp plugin to do just what you are looking to do. gulp-mswebdeploy-package and grunt-mswebdeploy-package will create a ms webdeploy package from any folder and do not require your build to be running on windows.
https://www.npmjs.com/package/gulp-mswebdeploy-package
https://www.npmjs.com/package/grunt-mswebdeploy-package