Installing Cocoapods broke previously installed packages - ios

I am making a swift project and I decided to install Cocoapods in order to access functionality I did no have access to before. I had the firebase-ios-sdk packages installed prior to adding Cocoapods to the project. I am opening the project using the xcworkspace created by Cocoapods, and the packages that were working previously are now not working. The main error I am getting is: Missing package product "name". I am getting this error for all of the packages installed with the firebase-ios-sdk. I have attached an image of an example of just one of the errors. Can anyone assist with this issue? I am on Xcode 13.4.1, M1 Air with 12.4 Monterey, and cocoapods 1.11.3 installed.

Related

Cocoapods not installed, build ios in gitlab CI failed

I have a new flutter app. When i build it locally everything works. But I pushed it to the repository and it didn't pass the pipeline to build iOS app. The error:
Warning: CocoaPods not installed. Skipping pod install.
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
CocoaPods not installed or not in valid state.
Am I missing something? I saw similar posts and everyone said gem install cocoapods, but how can I install it if everything works fine locally and the problem is only in the repository build?

Xcode build with Google UMP SDK fails with 'framework not found'

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.

Problems building through bitrise; more problems building through xcode

I've somehow found myself trying to build an app through bitrise to deploy to testflight. I'm a total novice at all of this, so apologies for what probably seems stupid.
Bitrise manages to build everything but then finally refuses to deploy, citing the following in the log:
[06:06:44]: [Transporter Error Output]: description length:10500450
[06:08:55]: [Transporter Error Output]: ERROR ITMS-90725: "SDK Version Issue. This app was built with the iOS 11.4 SDK. All iOS apps submitted to the App Store must be built with the iOS 11 SDK or later, included in Xcode 9 or later. Further, starting March 2019, all iOS apps submitted to the App Store must be built with the iOS 12.1 SDK or later, included in Xcode 10.1 or later."
[06:08:55]: Transporter transfer failed.
[06:08:55]:
[06:08:55]: description length:10500450
ERROR ITMS-90725: "SDK Version Issue. This app was built with the iOS 11.4 SDK. All iOS apps submitted to the App Store must be built with the iOS 11 SDK or later, included in Xcode 9 or later. Further, starting March 2019, all iOS apps submitted to the App Store must be built with the iOS 12.1 SDK or later, included in Xcode 10.1 or later."
Fine, I think, I'll clone the repo, open up the project in xcode and thereby update the sdk version. This just seems to mean more problems... When I try to build the project within Xcode, I encounter the following error:
Users/[...]/ios/Pods/Target Support Files/Pods-x/Pods-x.debug.xxconfig: unable to open file (in target "x" in project "x")(in target 'x')
In addition to this, there are a few issues, including:
The file "Pods-x.release.xcconfig" couldn't be opened because there is no such file.
If I ignore this error, push it and build it anew on bitrise, I get the following:
Resolving dependencies of `Podfile`
[!] CocoaPods could not find compatible versions for pod "DoubleConversion":
In snapshot (Podfile.lock):
DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
In Podfile:
DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
None of your spec sources contain a spec satisfying the dependencies: `DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`), DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)`.
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.
So, it's looking like there's something badly amiss with the CocoaPods installation. And indeed, when I check into the files, there is no Pods folder at all -- just Podfile and Podfile.lock. (I have no idea how it would have build fine previously without this?)
So, I try to reinstall CocoaPods into the project, by running pod install from a terminal in the iOS folder. I get that same error in the terminal: No such file or directory # rb_sysopen -- /Users/[...]DoubleConversion.podspec. pod update generates the same error. In addition, I'm told there's a new version of CocoaPods available. I install it using sudo gem install cocoapods, which generates a Pods folder with subfolders in ios, but all are empty.
As you can tell, I'm a bit baffled. If an intrinsic part of CocoaPods functionality is missing from the project files, how did it ever build previously? I'm guessing it's due to CocoaPods being installed as part of the bitrise workflow (and it is indeed there) -- but, if so, what about that is now causing it to fail during build? What is it about trying to open up the project to update the SDK used that is introducing this problem?
I'm sure all this seems a bit daft (at least I hope so). Thanks for your patience and any help would be enormously appreciated.

Xcode 10.2 support with the latest NativeScript?

Building an iOS project after using the default NativeScript Advanced Mac OS instructions does not work.
I have a fresh, new macbook, OSX Mojave 10.14.4, with the latest available Xcode Version 10.2 (10E125).
I followed the NativeScript instructions precisely:
https://docs.nativescript.org/start/ns-setup-os-x
After a few hiccups, I have Android working, but not iOS.
I first started with the issue and solution found here: Swift Version NativeScript
However, after following the steps to downgrade cocoapods from 1.6.0 to 1.5.3, I get errors about Swift 3.0 / 3.1 not being supported and again, a failed build.
After setting up NativeScript using the docs, you see this error:
[!] Unable to determine Swift version for the following pods (for each pod):
- `Socket.IO-Client-Swift` does not specify a Swift version and none of the targets (`<my-project>`) integrating it have the `SWIFT_VERSION` attribute set. Please contact the author or set the `SWIFT_VERSION` attribute in at least one of the targets that integrate this pod.
After downgrading cocoapods, you see this error instead (for each pod):
error: SWIFT_VERSION '3.1' is unsupported, supported versions are: 4.0, 4.2, 5.0. (in target 'Socket.IO-Client-Swift')
I also tried opening the project in Xcode. You immediately see the same error from the command line.
Is there any way for the latest Xcode and the default NativeScript setup to work without any further configuration?
The problem is that Xcode 10.2 brings Swift 5 and deprecates Swift 3. Plugins that use outdated Swift code won't work.
Solution 1: Downgrade to Xcode 10.1.
Solution 2: Update the nativescript plugins that use Swift 3 pods.
Update to the latest nativescript-vue-devtools
npm uninstall nativescript-vue-devtools
npm install --save nativescript-vue-devtools
Replace the packages nativescript-socket.io with nativescript-socketio:
npm uninstall nativescript-socket.io
npm install --save nativescript-socketio
Replace the packages nativescript-toast with nativescript-toasty:
npm uninstall nativescript-toast
npm install --save nativescript-toasty

Xcode 7 and cocoaPods problems

Im currently working on Xcode 7 i have a project that includes cocoapods.
When i pulled my Git latest version (a working version) it said
" file not found"
to fix this i ran in the Terminal "pod install" I'm also using AWSIOSSdk
version 2.0.15 (an older version) in my app now when i try to run it it says
"[!] Unable to satisfy the following requirements:
XMLDictionary (~> 1.4.0) required by AWSiOSSDKv2 (2.0.15)
"
i cannot update my AWS sdk it causes me more problems plus I'm unable to locate my podFile.lock it was removed from the folder.
How can i solve these issues I'm currently running on the latest CocoaPods version tried to uninstall and reinstall cocoapods still same issue.
Thanks to anyone who helps.
AWS has changed their FW it appears that they are not using the XMLDictionary FW and other FW as well anymore if you will try to update the AWS FW please note that you will have to change your methods names and import statements (BFTask is now AWSTask for example).

Resources