I just started working on an already existing React-Native app that needs a really small update, but that has not been updated since October 2019.
The first thing I need, in order to start updating it, is to build the app. That is where I cannot find a way to do it.
At the moment, I’m trying to build the app only on iOS and not on Android.
First of all the current toolset versions I’m using are:
React-Native version: 0.53.3
Xcode version: 11.4.1
iOS SDK: 13.4
Node version: 8.16.6
NPM version: 6.14.1
I initially had problem with third-party tools, but I managed to fix it through manually installing them in the node-modules/react-native folder.
Now I’m getting errors about Xcode not finding headers of the modules the app is using
like, for example,
React/RCTViewManager.h file not found
Or, similarly, the GoogleSignIn.h headers in the RNGoogleSignIn module
I believe it’s just an error of how libraries are imported in Xcode, because as a test I have created a new react-native “test app” with the same exact versions of react-native and node, then I installed the core dependencies needed to perform the update on the original app, and I managed to build it without problems.
I’ve also tested building the app on an old Mac with macOS 10.14, using Xcode 9, but I’ve got different errors, always related to importing headers of modules.
This is the toolkits versions of the “old Mac”:
React-Native version: 0.53.3
Xcode version: 9.4.1
iOS SDK: 11.3
Node version: 8.16.6
NPM version: 6.14.1
Searching online I know that some of the problems I have faced (like the third-party react-native manual install) have been fixed in react-native updates, but I’m not expert enough with the technology to be sure that I can handle the update process without introducing bugs. I would prefer to just make this version run for now and facing the updating process later.
Do you have any suggestion of things about what I can do in order to successfully build the app?
If anyone ever comes here with a similar problem: the solution was pretty simple.
Be sure you're using the .xcworkspace file in your iOS folder, and not the .xcodeproj. This is used to automatically (and correctly) load the Pods dependencies in Xcode without having to manually link them.
Be sure that you installed the dependencies correctly with the right version of Cocoapods. We had to use an old version (1.5.x) that would automatically downloaded some pod dependencies. Our error was due to Facebook SDK. Newer versions of cocoapods did not download it, while the 1.5.x version would download it.
Related
Trying to build a React Native iOS app, and while I got it running fine using Android, trying to get it running on iOS has been a bit of a nightmare.
I created this base react native app, back in Sept 2022, doing the typical npx react-native init <projectname> and was working on android mostly (I use a linux box, and I have to use Teamviewer to connect to a mac to build the iOS apps).
I had my app working fine in android and iOS, and then added the Zoom Video SDK and everything went to hell. Got it working fine in Android, and tried to take my changes and build them in iOS but I couldn't get it to work, and seemingly got my iOS project corrupted, so I tried to create a fresh iOS project, by basically created a same-named project in a different directory, and replacing the <projectname>/ios with the new base ios project.
Of course, I did this Jan 2023, so it's the new architecture, and the AppDelegate.h tries to import the RCTAppDelegate.h file instead of React/RCTBridgeDelegate.h
I do my usual yarn install go into the ios directory and pod install and then try to do a yarn run ios and it tells me it can't find RCTAppDelegate.h
Anyone solve this yet? The React-Native docs aren't up to date with their github repo
I got the same error, i solved it by opening the .xcworkspace instead of opening .xcodeproj
I also cleaned the build folder by
Product --> Clean Build folder
and then it successfully built the app.
Couldn't find enough information about Xcode cloud and is wondering if anyone is facing any issues using cocoapods with Xcode cloud.
I am aware that I need to add a file called ci_post_clone.sh if I have cocoapods.
Almost every time, my Xcode cloud build will fail on the ci_post_clone.sh script where according to the log, installing some cocoa pod fail. And the cocoa pod fail varies, each time, a different cocoapod will fail.
For example, below is the log. I never have problem getting AMPopTip, GooglePlaces error, and this is the first time.I am aware that AMPopTip SDK is quite old and its not updated regularly.
I am just trying to understand how common this problem is and how have any of you bypass it.
Some of the things I have done is,
Clean, rebuild via Xcode Cloud
Run multiple times, each time, error varies and if I am lucky, the build will succeed. So far, I only manage to get 1 successful build out of 5 tries.
First build
Second build
Third build
Xcode cloud environment are
Xcode version: 13.4.1
macOS version: macOS Monterey 12.4
Local machine environment are
Xcode version: 13.4.1
macOS version: macOS Monterey 12.4
cocoapods version 1.11.3
Can anyone confirm that Mapbox Navigation works with Swift 5.0 or for that matter they are still a going concern? I have now tried building the frameworks in Carthage using Xcode 11.3 and a fresh install of Xcode 11.6 on a brand new Mac running the latest OS and in both cases when trying to import framework:
Module compiled with Swift 4.2.1 cannot be imported by the Swift 5.2.4 compiler:
According to some answers to this SO question, this happens when Developer has not yet released their app for Swift 5, although the Mapbox changelog claims they have
Have tried contacting Mapbox through every conceivable channel and radio silence. Hopefully they are still in business and supporting the software but I'm not sure.
Module compiled with Swift 4.2.1 cannot be imported by the Swift 5.1.3
compiler:
/Users/M/Desktop/War/idaru/MapboxCoreNavigation.framework/Modules/MapboxCoreNavigation.swiftmodule/arm64.swiftmodule
This error appears because you still have a built copy of MapboxCoreNavigation on your system and Xcode is linking against it instead of building from scratch. It’s always necessary to do a clean build when upgrading Xcode.
If you encounter this error message within Xcode when building your application target, please clean your build products using Product ‣ Clean Build Folder and build again. If you're seeing this error on the command line when running carthage update, you can try cleaning your Carthage caches using the following command:
rm -rf ~/Library/Caches/carthage/ ~/Library/Caches/org.carthage.CarthageKit/binaries/
I have an iOS app I am planning on integrating with MongoDB. After installing the pod files, upon build I get about 100 errors and I'm not really sure what's causing it or how to fix them.
Added a screenshot of some of the errors. They are all almost exactly the same.
I have tried reinstalling the MongoDB cocoapod (pod 'StitchSDK', '~> 5.0.0') With the same results.
I'm using Xcode 10.2, set Swift language to 4.0, iOS target build to 11.0 (I may have done these completely wrong though.)
Expecting to be able to build the app with no errors.
You can now use the latest version, StitchSDK 6.0.0.
You will need to wait for the SDK to be updated. Meanwhile, you can download a previous version of Xcode. You will be able to test iOS apps with iOS 12.1.4, but NOT 12.2 and up
https://github.com/mongodb/stitch-ios-sdk/issues/156.
VS version - 2015 with Cordova update 3Mac OS - 10.10.4iOS - 9.0 When building in release mode for iOS we get following warnings. But release folder is created with ipa and plist.
So when uploading that ipa using application loader it gives following 2 errors.
As I mentioned in this stackoverflow thread:
There appears to be an issue with Cordova's iOS implementation when publishing apps created specifically using Xcode 7.
A Cordova community member has published a "cordova-plugin-ipad-multitasking" plugin with a fix.
http://npmjs.com/package/cordova-plugin-ipad-multitasking
Install this plugin and you should be all set. A future Cordova version will resolve the problem fully.
Failing that, if you are using remotebuild you can also find the native project under ~/.taco_home/remote-builds/taco-remote/builds and make the modifications as described in the Cordova bug on the issue.
EDIT:
To resolve ITMS-90339, there is a second step you can do to patch in the near term. Grab the build.xcconfig from the 3.9.x branch of the cordova-ios repo and place this under res/native/ios/cordova
Now remove this line:
CODE_SIGN_RESOURCE_RULES_PATH = $(SDKROOT)/ResourceRules.plist
Note that you will want to remove this custom build.xcconfig file if you upgrade to the version with the full patch that is forthcoming.