我正在尝试将反应原生Google登录流程合并到我的应用中,但我无法让using Point = TerrainProfilePnt;
auto pointsInLine = terrainProfilePartitioner->GetPoints();
auto& pointsVec = pointsInLine->GetVector();
std::vector<Point> terrainProfileVec;
terrainProfileVec.reserve(pointsVec.size());
double start_xlon = 0.0f;
double start_ylat = 0.0f;
double start_zelev = 0.0f;
double end_xlon = 0.0f;
double end_ylat = 0.0f;
double end_zelev = 0.0f;
//The angle between the starting point and the ending point
double initialElevAngle = 0.0f;
//Assemble the first and last points
start_xlon = pointsVec.front().x();
start_ylat = pointsVec.front().y();
GetPointElevation(start_xlon, start_ylat, start_zelev);
end_xlon = pointsVec.back().x();
end_ylat = pointsVec.back().y();
GetPointElevation(end_xlon, end_ylat, end_zelev);
//Calculate the angle between the beginning and ending points
initialElevAngle = atan2(start_zelev, end_zelev) * 180 / M_PI;
Point initialPoint;
initialPoint.m_x_lon = start_xlon;
initialPoint.m_y_lat = start_ylat;
initialPoint.m_z_elev = start_zelev;
initialPoint.m_hasLOS = true;
//pointsVec.push_back(initialPoint);
terrainProfileVec.push_back(initialPoint);
double oldAngle = 0.0f;;
bool hasOldAngle = false;
for (std::size_t i = 1; i < pointsVec.size(); ++i)
{
Point p;
p.m_x_lon = pointsVec.at(i).x();
p.m_y_lat = pointsVec.at(i).y();
GetPointElevation(p.m_x_lon, p.m_y_lat, p.m_z_elev);
double newAngle = atan2(start_zelev, p.m_z_elev) * 180 / M_PI;
if (!hasOldAngle)
{
hasOldAngle = true;
oldAngle = newAngle;
p.m_hasLOS = true;
}
else
{
if (newAngle < oldAngle)
{
p.m_hasLOS = false;
}
else
{
oldAngle = newAngle;
p.m_hasLOS = true;
}
}
}
auto terrainPrfileSeq = new Common::ObjectRandomAccessSequence<TerrainProfilePnt>(terrainProfileVec);
return terrainPrfile
与我合作......
我已使用rnpm将RNGoogleSignin
与我的项目相关联但由于某种原因,react-native-google-signin
一直在抱怨
RNGoogleSignin.h
我已尝试添加正确的标头 - 此"RCTBridgeModule.h" file not found
在我的网站中
的 BridgeModule
目录,但将其添加到我的标题搜索路径似乎不能解决问题。我做错了什么?
答案 0 :(得分:0)
你的反应原生版本是什么?
我在尝试使用swift模块的简单桥接器后遇到了同样的问题react-native init myproject
,这就解决了这个问题:
自反应原生0.40 https://github.com/facebook/react-native/releases/tag/v0.40.0:
#import "RCTBridgeModule.h"
现在应该是:
#import <React/RCTBridgeModule.h>
要使其正常工作我还需要在项目目录中从命令行运行 react-native upgrade
。
答案 1 :(得分:0)
我遇到了同样的问题,并通过以下步骤解决了该问题:
1-使用pod update
2-然后使用以下代码重新安装吊舱
pod deintegrate {YOUR_PROJECT}.xcodeproj && rm -rf ./Pods && pod install
然后在Xcode中确保以下内容:
禁用并行构建:
Xcode菜单->产品->方案->管理Shemes ... 双击您的应用程序 生成标签->取消选中Parallelize Build
添加对项目的依赖性
Xcode项目导航器->将React.xcodeproj从库中拖到根树中 构建阶段选项卡->目标依赖关系-> +->添加React
使用(cmd + shift + k)在Xcode中清洁项目
希望这可以解决您的问题