Cocoapods Acknowledgements.plist file not found when using Xcode Cloud for CI/CD - ios

In My Podfile, I have a post_install hook that has the following line of code:
FileUtils.cp_r('Pods/Target Support Files/Pods-MyApp/Pods-MyApp-Acknowledgements.plist', 'MyApp/SupportingFiles/Settings.bundle/Acknowledgements.plist', :remove_destination => true)
Now, this has worked for a very long time for me, however, I recently started using Xcode Cloud for some build automation, and when running this code I had the following error in xcode cloud:
No such file or directory # rb_file_s_stat - Pods/Target Support Files/Pods-MyApp/Pods-MyApp-Acknowledgements.plist
Not sure if this has to do with Xcode Cloud or something else entirely.
Cocoapods version 1.11.3 is used on my device, and same version was used by Xcode Cloud.
only difference I can tell is that Xcode cloud is using Ventura - my machine is still using Monterey.
anyone have any ideas on how to fix, i would appreciate it.

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?

libPhonenumber (from Google) on iOS in a Kotlin Native project

I've been struggling to solve a problem.
I'm building a cross platform app (iOS and Android) using Kotlin Multiplatform (KMP) where I need a library from Google (https://github.com/google/libphonenumber).
For Android, I can point to a Maven repo (https://repo1.maven.org/maven2/com/googlecode/libphonenumber/libphonenumber/8.12.6/).
For iOS, I can use a ObjC port of libPhonenumber via Cocoapods.(https://cocoapods.org/pods/libPhoneNumber-ios).
But, I can't use Kotlin's (cocoapod plugin) to properly recognize the Pod. The plugin appears to fail to build.
Here's the details of my setup:
Xcode v11.5
IntelliJ IDEA v2020.1.2
Cocoapods v1.9.1
Gradle 6.0.1
Sample repo (https://github.com/touchlab/kotlin-native)
NOTE: Within the repo, I'm using ./samples/cocoapods
modify ./samples/cocoapods/kotlin-library/build.gradle.kts
commented out AFNetworking, remove AFNetworking pod
pod("AFNetworking", "~> 3.2.0")
add a new pod
pod("libPhoneNumber-iOS")
modify ./samples/cocoapods/kotlin-library/gradle.properties
change this line:
kotlin.native.home=../../../dist
to this:
#kotlin.native.home=../../../dist
in Terminal in this folder: ./samples/cocoapods/kotlin-library/
./gradlew podspec
This creates a podspec file (libPhoneNumber-iOS.def) in ./samples/cocoapods/kotlin-library/build/cocoapods/defs/
cd from kotlin-library to ios-app folder
cd ../ios-app/
Pod install using the command:
pod install
You'll see something like:
Downloading dependencies
Installing kotlin_library (1.0)
Installing libPhoneNumber-iOS (0.9.15)
Generating Pods project
Integrating client project
Pod installation complete! There is 1 dependency from the Podfile and 2 total pods installed.
When I build the sample 'ios-app' target: simulator in Xcode, I get the error:
fatal error: module 'libPhoneNumber' not found
I have tried other libPhoneNumber pods, such as:
libPhoneNumberSwift
LTPhoneNumberField
Both fail to build using Kotlin's cocoapods plugin, but work as a Pod without Kotlin's cocoapod plugin.
What am I missing?
This particular problem seems to be caused by the dash in the pod's name. There was already an issue reported on GitHub. For now, it's recommended to workaround this problem by re-naming the module. Changing your kotlin-library/build.gradle.kts like
pod("libPhoneNumber-iOS", moduleName = "libPhoneNumber_iOS")
should help. Please give it a try and tell here or on GH if it works.
I have obtained excellent results by adding the unchanged Javascript version of libphonenumber using JavaScriptCore in IOS. The only part of the library not available yet in Javascript is the geocoder.
I used the concept explained here: https://www.appcoda.com/javascriptcore-swift .
Performance is great and there is no porting involved. Always the latest version available.

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.

Zip and Encryption pods build error in Ensembles 2.6.2

I created a brand new Xcode project in Swift and integrated Ensembles 2.6.2 via Cocoapods.
I also wanted to include Zip compression and Encryption and so I simply added these 2 pods in my Podfile, as suggested in the manual.
Unfortunately after running pod install, I’m getting an error when trying to build. I attach 2 screenshots to give you some context. Unless I’m missing something really obvious, I have no idea on what to try next.
I'm using Xcode 9.4.1 and macOS 10.13.6

Firebase Unity xCode linking errors

I am having issues trying to make a build from Unity (version 5.5.2f1) with Firebase Auth / Database imported. I am using the newest Firebase SDK of 3.0.0.
The errors I get are as follows:
I believe it has something to do with cocoaPods. The XCode project compiles with a podfile. And the errors I believe are related to missing libraries? But all the required libraries are set to iOS, and are included with the XCode project.
Unsure of what to try next. Thanks in advance to anyone able to help.
When you build and run from within unity, it tries to run the pod installation for the dependencies needed, and patches the xcode project file (not workspace).
If there is an error with this process, you should see it in the console.
Normally pods are meant to be used with the workspace file, but since unity automatically opens the xcode project the plugin tries to make it work.
Try opening the .xcodeproj instead of the workspace.
So I finally figured out my issue. I had a previous build that worked all the way through to my device. So I eventually tried opening that one again, and I ran into the same errors with an older build.
So that got me thinking.. Why would a previous build that used to work fail this time around?
I came to the conclusion that the only things that changed were possibly me updated Unity to 5.5.2f1. So I updated again to the latest release at this time which is 5.5.2p3, and ran through the same steps:
1) Build to iOS
2) Install pods in the target folder
3) Run xc workspace
And it successfully built. So it must of been something on Unity's side. If anyone ever runs into a similar situation, hopefully this will help.
P.S. I also did update to the latest release (at this time) of Unity Firebase SDK of 3.0.1. Not sure if that had anything to do with making a successful build, but wanted to put that information out there.

Resources