在解决了很多构建问题之后,我的应用程序终于成功构建了。但现在我正在与这个问题作斗争。在应用程序成功构建并开始在 iOS 模拟器上启动后,我看到了这一点。
我的播客文件:
platform :ios, '9.0'
use_frameworks!
target 'myProject' do
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/'
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path …Run Code Online (Sandbox Code Playgroud) 我在 react-native 中有一个带有 formik 形式的虚拟登录代码
import React, { Component } from "react";
import {
TextInput,
Text,
Alert,
Image,
View,
TouchableOpacity,
SafeAreaView,
ScrollView
} from "react-native";
import styles from "./Styles/LoginStylesheet";
import { KeyboardAccessoryNavigation } from "react-native-keyboard-accessory";
import { Formik } from "formik";
import schemaObject, { initialValues, refs } from "./Validations/LoginValidations";
export default class LoginView extends Component {
constructor(props) {
super(props);
this.state = {
activeInputIndex: 0
};
}
handleFocus = index => () => {
this.setState({
activeInputIndex: index
});
};
handleFocusNext = …Run Code Online (Sandbox Code Playgroud) 我已将我的应用程序从 react-native 0.60.4 更新到 0.61.5,它在 android 上运行良好。但是在 ios 中,我无法安装 pod。在运行 pod install 时,我遇到了下面给出的这个问题。
[!] Unable to find a specification for `FBReactNativeSpec (= 0.61.5)` depended upon by `React-CoreModules`
Run Code Online (Sandbox Code Playgroud) 我得到了这个 react-native 项目,我不得不use_modular_headers!在Podfile. 我想我需要它,因为这pod MercadoPagoSDK是某种动态库(?°?°??我真的不知道这在 iOS 开发世界中意味着什么。
现在我在 xcode 上构建时遇到这个错误!
import of module 'glog.glog.log_severity' appears within namespace 'google'
我没有找到解决这个user_modular_headers!问题的方法。我已经尝试了https://github.com/google/glog/issues/393 中的所有想法,但恐怕它们都不起作用。
当我将构建上传到 testflight 时,我从 App Store connect 收到了这封邮件。
我想如果我将我的 Xcode 更新到 11,它就会得到解决。
任何人都可以澄清如何检查 SDK 版本以及如何更新它?
ITMS-90725: SDK Version Issue - This app was built with the iOS 12.1 SDK.
Starting April 2020, all iOS apps submitted to the App Store must be built with the iOS 13 SDK or later, included in Xcode 11 or later.
After you’ve corrected the issues, you can upload a new binary to App Store Connect.
Run Code Online (Sandbox Code Playgroud) 我在做:
import React from 'react';
import PropTypes from 'prop-types';
import { TouchableOpacity, Linking } from 'react-native';
/**
* Used to create external link to other websites
*/
class ExternalLink extends React.Component {
_openLink = async () => {
const { href } = this.props;
if (await Linking.canOpenURL(href)) {
await Linking.openURL(href);
}
};
render() {
const { href, children, ...rest } = this.props;
return (
<TouchableOpacity
accessibilityRole="link"
onPress={this._openLink} // eslint-disable-line no-underscore-dangle
href={href}
{...rest}
>
{children}
</TouchableOpacity>
);
}
}
ExternalLink.propTypes = …Run Code Online (Sandbox Code Playgroud) reactjs react-native react-native-android react-native-ios react-native-web
我需要将以下安装后添加到 Podfile。
post_install do |pi|
pi.pods_project.targets.each do |t|
t.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end
end
Run Code Online (Sandbox Code Playgroud)
但是遇到了这个错误。
[!] Invalid `Podfile` file: [!] Specifying multiple `post_install` hooks is unsupported..
Run Code Online (Sandbox Code Playgroud)
Podfile 中有两个安装后。我应该如何结合它们来解决错误?
post_install do |installer|
flipper_post_install(installer)
end
end
post_install do |pi|
pi.pods_project.targets.each do |t|
t.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end
end
Run Code Online (Sandbox Code Playgroud) 我在 react-native 应用程序中使用纵向模式。但我想捕获屏幕的旋转事件。有没有办法做到这一点?
谢谢...
我正处于 react-native 的学习阶段。当我在模拟器上运行我的应用程序时,我收到以下警告,但如何调试此错误?我不确定要检查什么以及在哪里检查以摆脱此错误,有人可以指导我吗?我在 iOS 模拟器上运行。
我使用的是 React Native 版本0.62.2,现在我升级到版本0.63.0,在运行npx pod-install安装 Pod 包后出现此错误:
CocoaPods 找不到 pod “ReactCommon/callinvoker” 的兼容版本:
react-native ×10
react-native-ios ×10
reactjs ×3
cocoapods ×2
ios ×2
javascript ×2
xcode ×2
fastlane ×1
formik ×1
glog ×1