My team is using Decodable library in application with the help of carthage. The command carthage update --platform iOS is properly downloading the Decodable on my colleague mac machine. But on my mac machine it's just stucks with the message *** Fetching Decodable all the time. I am trying it since 2 days. for better understanding please see the bellow attached screenshot of terminal
Any help will be appreciated.
This generally happens when Carthage can't find compatible version of your dependency. Try specifying a version of the library in your Cartfile
Related
We make middleware using Cordova and AdMob to show ads. Cordova generates an Xcode project for us. However the resulting Xcode projects now fail to build with the error ld: framework not found UserMessagingPlatform.xcframework.
This appears to be caused by the Google UMP SDK updating to version 1.3.0, which notes "Updated the SDK from a .framework to a .xcframework." I've contacted AdMob support, and they claim the build works for them and haven't provided any useful help.
I have no idea why our builds now fail and I'm at a loss as to what to do about it. Here is a sample Xcode project: https://www.dropbox.com/s/y1ly2c3yi45rop6/TestBuild.ios.project.zip?dl=0
Can anyone identify what has gone wrong with this Xcode project causing it to fail to build, and identify a workaround?
The Issue
The issue appears to be that a framework/dependency is not added to the Xcode project, so it doesn't have the code necessary to compile the application. AdMob relies on that UserMessagingPlatform thing to work, and without the Mobile Ads SDK being present in your codebase, UserMessagingPlatform is missing and your application is essentially asking for code that isn't there. To resolve this, you have to tell cocoapods (a dependency manager, think npm but for Swift/Objective-C) to locate and add the missing code to your project.
First, install cocoapods if you haven't already. I used Homebrew to do this, as it seems to be the only method that worked without headache. Many people already have Homebrew, but if you don't, install that first, then run:
brew install cocoapods
Next, go into your project directory using the Terminal. Once you're in the directory, run:
pod install --repo-update
Reopen your project in Xcode, and it should compile successfully now.
Step by step resolution:
Skip any steps that aren't necessary for your environment.
Install Homebrew: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Install cocoapods: brew install cocoapods
Open a terminal, navigate to your project directory: cd /path/to/your/project
Update dependencies: pod install --repo-update
Disclaimer: I'm not a Swift or Objective-C developer, and my experience with Apple/Xcode is limited. I also am unfamiliar with "cocoapods" and AdMob. I just downloaded the sample code and worked through the issue until I got it to compile successfully.
Are you using Cocoapods for your XCode project?
This stackoverflow answer suggest updating cocoapods
Try updating cocoapods:
sudo gem install cocoapods
Cocoapods changelog contains fixes for XCFrameworks
.xcframework files can only be used on CocoaPods 1.10.0 or newer, in your sample app you were using 1.8.4.
Update CocoaPods to latest and run pod install again.
I'm new to iOS development, so thank you in advance for the help. I'm trying to build an application that was built in XCode 9.3 and Swift 4.1. When I install the packages using Carthage, it throws this error:
"Skipped installing CryptoSwift.framework binary due to the error:
"Incompatible Swift version - framework was built with 4.1 (swiftlang-902.0.48 clang-902.0.37.1) and the local version is 5.0.1 (swiftlang-1001.0.82.4 clang-1001.0.46.5)."
The reason for the error (very clear...) is because I'm trying to build the project using XCode 10.2 and Swift version 5.0.1. So in order to fix it, you need to go to the swifts snapshots and download the version I need and install it.
However, when I go to the swifts snapshots I see the one for 4.1 but the links seem to be broken(?). It redirects me to the apple Xcode documentation.
Does anyone know where and how can I install the swift version I need?
Thanks,
If I understand your problem right, try giving this a go(if not already):
When using a newly released version of Xcode you'll have to build
libraries from source (by passing --no-use-binaries to carthage
update) until a new version of framework comes out which has pre-built
binaries for that Xcode version.
The above is an extract from: https://github.com/realm/realm-cocoa/issues/6134 and it might help...
This is a long shot, but I've taken over a project done in RN v .38 and I need to update a library and resolve the build issues without updating the version of react native. I'm trying to update the react-native-aws-cognito-js library and while it looks to be compatible with the formatting change of import statements, I'm still not able to get it to build on IOS. Android is fine.
To reproduce my issue I did the following:
react-native init sample --version 0.38.0
cd sample
npm install react-native-aws-cognito-js
react-native link react-native-aws-cognito-js
react-native run-ios
Which fails with:
/node_modules/react-native-aws-cognito-js/ios/RNAWSCognito.h:4:9:
fatal error: 'React/RCTBridgeModule.h' file not found #import
Mobile and RN development is not my wheelhouse, but I'm hoping there is some sort of xcode configuration or tricks I can do to get this working and avoid a major overhaul. Running an upgrade to >.40 would probably take too long and also cause other compatibility issues that I don't have the time to resolve.
Note: I have tried the suggestions in `React/RCTBridgeModule.h` file not found
I need to have carthage for running Appium tests.
While Appium community is still working on supporting XCode9.2, we need to rely on XCode 8.3.3
OS: MacOS High Sierria
XCode version: XCode 8.3.3
Java: 1.9
But when I run command brew install carthage, I am getting below error:
Error: Your Xcode (8.3.3) is too outdated.
Please refer below link, which implies that- XCode9 support for Appium is not yet rolled-out
[https://github.com/facebook/WebDriverAgent/issues/639][1]
Kindly suggest work around in meanwhile.
Thanks
1) First of all be sure to remove everything:
brew uninstall --force carthage
2) Then search the commit that you like from here:
https://github.com/Homebrew/homebrew-core/search?p=2&q=carthage&type=Commits&utf8=✓
3) in your case might be this:
https://github.com/Homebrew/homebrew-core/commit/f74d9ba598c9843552450abeb382cacd0e71d4c0
the one related to Carthage v0.24, which should be compatible with your requirement of working with Xcode 8.3.3.
4) then get the commit identifier f74d9ba598c9843552450abeb382cacd0e71d4c0 and run:
brew install https://github.com/Homebrew/homebrew-core/raw/f74d9ba598c9843552450abeb382cacd0e71d4c0/Formula/carthage.rb
I was having the same problem, but was unable to use brew install. I kept getting a 404 error when trying to do it.
To get an old version I cloned the Carthage project from the repo, changed my working copy to the specified version tag I needed and ran make install. This worked :D
I have an application which was developed in Xcode 7.3 and Swift 2. Now I am trying to convert it to Swift 3.0.2, as the dependency manager I am using is Carthage. Now I am updating my Carthage so that all the frameworks should support swift 3.0.2. For this, first I have used the following command:
"carthage update --platform iOS"
It now fetches all the dependencies and check out all the dependencies but then after checkout it starts to build the dependencies and while building the dependency it just fails with an error.
Here is a attached screenshot of the error. I am totally blank on what I am missing in this case:
When I faced the problem , this is how I resolved it:
I deleted everything that was checked out and got all new fetches and builds
Ran carthage update --no-build && carthage bootstrap
This problem mainly occurs in Xcode 7.3 beta2 (7D129n) toolchain. Carthage version0.12 will build the cartfile successfully if you set xcselect to 7.2.1.
Version v0.11 didn't have this problem. The problem occurs during the build, maybe because all the versions of Carthage dependencies don't match too. I also read a few posts which asked me to supply with sudo carthage update --platform iOS --no-use-binaries.
And you're using a really old version of Xcode. I'll suggest you to upgrade.