Problem with x86_64-apple-ios-simulator xcode - alamofire

could not find module 'Alamofire' for target 'x86_64-apple-ios-simulator'; found: arm64-apple-ios-simulator
I can't run my app in a simulator

Related

Trying to build a ReactNative iOS app and getting errors on Macbook Pro with M1 Apple Chip

I'm able to successfully run the starter "AwesomeProject" react-native app on both iOS and Android.
I have a private repo project that was built by an outsourced team that I'm trying to get running on my local Macbook Pro with an M1 Chip. The team claims they are able to get the project running on a normal Macbook Pro (without the M1 chip).
I'm unable to build the project on iOS and get the following error:
The following build commands failed: SwiftEmitModule normal arm64
Emitting\ module\ for\ Charts (in target 'Charts' from project 'Pods')
(1 failure)
When I try to run the Android app I'm able to get it to run on the Android Device simulator but get the following errors from
ERROR Error: token is not a valid string
ERROR Invariant
Violation: Module AppRegistry is not a registered callable module
(calling runApplication). A frequent cause of the error is that the
application entry file path is incorrect.
This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
ERROR
Invariant Violation: Module AppRegistry is not a registered callable
module (calling runApplication). A frequent cause of the error is that
the application entry file path is incorrect.
This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
I'm not sure how to further debug these issues. I followed some of the debugging I saw with M1 Macbooks and React-Native like using "brew" to install cocoapods and then always using "alias pod='arch -x86_64 pod'" for the pod command. I see lots of other hacks to make react-native work on M1 like this article: https://goxotech.medium.com/apple-m1-react-native-was-not-exactly-what-we-thought-but-that-is-not-an-issue-6c8d359926df
try adding this in your PodFile
post_install do |installer_representation|
installer_representation.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
end
end

xcode the file couldn't be opened because you don’t have permission to view it

I have an Xcode project with Cocoa Pods installed which I added a tvOS single view app target. I shared with the tvOS target all the pod installed.
When I build and run my iOS target everything is ok, but when I run the tvOS target I get this error
"ld: library not found for -lAFNetworking
clang: error: linker command failed with exit code 1 (use -v to see invocation)"
So after searching on the web I found a solution to this error. If I go to the Build Settings for the tvOS target and under Valid Architectures I remove arm64 and type armv7 the error disappears but then when i run the project i get this:
So if I leave the arm64 I get the first error, if I remove it I get the other one...
Someone knows how can I fix it?

What is the right way to import custom react native module on Xcode?

I'm building a custom RN module for iOS and Android. Following some others modules, I notice that the dependencies it's never imported to the module itself, but always imported in the main app. For example for iOS:
react-native-admob has Google Mobile Ads SDK as dependency, but the developer has to add on the app.
That said, I have my custom module only building on Xcode, because when I try to run react-native run-ios I get the error:
info In file included from /Users/.../node_modules/react-native-my-module/ios/MyModuleViewManager.m:2:
/Users/.../node_modules/react-native-my-module/ios/RNMyModule.h:8:9: fatal error: module 'PrebidMobile' not found
#import PrebidMobile;
~~~~~~~^~~~~~~~~~~~
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening myapp.xcworkspace
What could I be doing wrong, that react-native command can't find the import library from Link Binary With Libraries?

Hello, World! program for React Native throws "Could not parse the simulator list output" on Mac

I just started learning React Native and was trying to run my Hello, World! app using the steps given in https://facebook.github.io/react-native/docs/getting-started.html#content
I took the following steps
1. `brew install watchman`
2. `npm install -g react-native-cli`
3. `react-native init hello`
4. `cd hello`
5. `react-native run-ios`
Instead of launching the iOS app, I got the following error in the terminal:
Found Xcode project hello.xcodeproj
Usage: simctl list [devices|devicetypes|runtimes]
Could not parse the simulator list output
I also tried to run it using Xcode; however Xcode shows lot of compilation errors.
Following are details on my system
OS: Mac OS v10.10.5 (Yosemite)
Node.js version: 4.4.1
Xcode version: Version 6.3 (6D554n)
Following is a screenshot of errors shown in Xcode.
Error disappeared after I launched Xcode and allowed to install some updates.
The problem was that I updated Xcode and never opened it after the update completed. After I opened Xcode it did install components then when I tried again it worked fine.
In my situation, I closed the current terminal and reopened it, then the error was gone.
I realized that I was using a beta version of Xcode. Once I installed the latest version of Xcode then all errors were gone and the app were launched in the simulator.

Compile error on QuickBlox iOS SDK (v1.5.1)

Download the latest QuickBlox iOS SDK (v1.5.1) and tried to compile and run the sample chat example, failed to compiled with multiple issues.
I assume the Sample Chat project (called supersimple) to work out-of-the-box but unfortunately no...
Issue #1:
ld: library not found for -lxml2
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Issue #2:
fatal error: file '//quickblox-ios-sdk-master-1.5.1/sample-chat/../Framework/Quickblox.framework/Headers/RatingsService/RatingsServiceFramework.h' has been modified since the precompiled header was built
For issue #2, I did tried to do clean build folder (option+shift+cmd+K) and rebuilt, didn't work.
I'm using XCode 4.6.1 on Mac OSX 10.8.3.