Not getting success after publish cocoaPod libray push - cocoapods

pod repo push iOS_FS iOS_FS.podspec
Validating spec
-> iOS_FS (0.1.0)
- NOTE | xcodebuild: note: Using new build system
- NOTE | [iOS] xcodebuild: note: Planning build
- NOTE | [iOS] xcodebuild: note: Constructing build description
And trying to add in my project pod 'iOS_FS'. it's not working saying not available. How get know whether my library has been publish successfully or not.

I am able to create own iOS cocoa pod. follow below steps.
How to create your own pod file and shared it with other developers.
Create and public own pod.
Step 1:-
Create pod file in a local directory by running the below command.
pod spec create podspecificationfileName
Example:
pod spec create iOSUtilis
After creating file do configuration of target version, tag, code sync, dependency of other framework.
Step 2: once you make sure your code is compiling and well working
Create tag of your branch like below
git tag 0.0.1
git push origin 0.0.1
And update tag number in iOSUtilis.podspec file
Step 3: run command:
pod spec lint iOSUtilis.podspec
Result will be:
iOSUtilis.podspec passed validation
Step 4: publish you pod to online
Run command.
pod trunk push iOSUtilis.podspec
Result will be:
🎉 Congrats
🚀 iOSLoader (0.0.1) successfully published
📅 September 28th, 20:27
🌎 https://cocoapods.org/pods/iOSLoader
👍 Tell your friends!
MacBook-Pro:iOSUtilis chandrakant$

How to create another version of pod.
Step 1: Just make changes in your code and validate the working.
Step 2. Create another version of tag
git tag 0.0.2
git push origin tag 0.0.2
Step 3. Update new tag version in iOSUtils.podspec
Run command
pod spec lint iOSUtils.podspec
Still getting error fix
Delete tag
git tag -d tagName
git push origin tagName
Clear cache
pod cache clean --all
Fix error in origin branch and again create tag and do the remaining process when get success “iOSUtilis.podspec passed validation”
Step 4. Final step
Run command
pod trunk push iOSUtils.podspec

Related

Xcode Cloud: unable to open configuration settings file

I'm working with a React Native project, setting up Xcode Cloud builds.
I keep getting this error:
unable to open configuration settings file
Pods-XXX.debug.xcconfig:1
The files in my workspace look like the following:
|-- XXX
|-- Pods
|. -- Podfile
|. -- Targets Support Files
|. -- Pods-XXX
|. -- Pods-XXX.debug
Guess what? XCode is garbage but doc can help us here.
This what I'm using to smoothly build my workflow. I'l share exact bash scripts here.
Why it's failing?
First open logs on your workflow window side bar.
Check if you're installing necessary dependencies before running archive process. You're using virtual machine so any dependencies like cocoapods or yarn aren't installed by default there.
If you haven't read and skipped to the SOLUTION:
Here is the steps:
Create ci_scripts folder inside ios folder.
Create 3 files inside ci_scripts folder:
ci_post_clone.sh
ci_post_xcodebuild.sh
ci_pre_xcodebuild.sh
Inside your ci_post_clone.sh file add this:
#!/bin/zsh
# fail if any command fails
echo "🧩 Stage: Post-clone is activated .... "
set -e
# debug log
set -x
# Install dependencies using Homebrew. This is MUST! Do not delete.
brew install node yarn cocoapods fastlane
# Install yarn and pods dependencies.
# If you're using Flutter or Swift
# just install pods by "pod install" command
ls && cd .. && yarn && pod install
echo "🎯 Stage: Post-clone is done .... "
exit 0
Inside your ci_pre_xcodebuild.sh file add this:
#!/bin/zsh
echo "🧩 Stage: PRE-Xcode Build is activated .... "
# You can add additional scripts here...
echo "🎯 Stage: PRE-Xcode Build is DONE .... "
exit 0
Inside your ci_post_xcodebuild.sh file add this:
#!/bin/zsh
echo "🧩 Stage: POST-Xcode Build is activated .... "
# You can add additional scripts here...
echo "🎯 Stage: POST-Xcode Build is DONE .... "
exit 0
I've had this same issue recently, there is now a default workflow for xcode cloud that performs the post clone step that was provided by #BEK ROZ
I also had the same issue locally when building a VueJS app with Ionic/Capacitor
Before now my knowledge of iOS builds is precisely zero, so excuse innocence, but I found the issues were relating to the *xcconfig files. Every capacitor module that you install with npm will have it's own xcconfig file for debug and release - Stored in:
ios/App/Pods/Target Support Files/{{ Module Name }}/{{ Module Name }}.debug.xcconfig
ios/App/Pods/Target Support Files/{{ Module Name }}/{{ Module Name }}.release.xcconfig
I've only installed two plugins, so I uninstalled one of them, which was cordova-plugin-screen-orientation, synced and then archived (steps below) and this time it passed.
# Remove a capacitor module with npm e.g. cordova-plugin-screen-orientation
npm uninstall cordova-plugin-screen-orientation
# Sync the iOS plugins to remove the plugin from your Podfile (ios/App/Podfile)
npx cap sync ios
So I'd recommend going through all of the plugins you've installed and see if any of them are playing up. Then go back to xcode, run "Product -> Archive" from the menus to start a new build or push your changes and let xcode cloud do the heavy lifting for you.
Good luck

The 'NCD.L1.sample--thanks' project not working as expected

I've been following the example shown here:
https://www.youtube.com/watch?v=w6JlZpYMvpo&list=PL9tzQn_TEuFXdfbkEw5_16Dsf0F6QLDmL&index=21&t=900s
The repo is here:
https://github.com/Learn-NEAR/NCD.L1.sample--thanks
As I tried to run ./scripts/1.dev-deploy.sh, and this was returned:
The Error Shot
I'd love to know if I did anything wrong here and if so what the solution would be.
From the error about a missing dependency, I think you forgot to run yarn
I've updated the instructions to include this as step #2
## Usage
### Development
To deploy the contract for development, follow these steps:
1. clone this repo locally
2. run `yarn` to install dependencies
3. run `./scripts/1.dev-deploy.sh` to deploy the contract (this uses `near dev-deploy`)
**Your contract is now ready to use.**

Using a private go module on Gitlab as import : "Unknown revision"

I cannot get this to work, even after checking other topics on stackoverflow. My project on gitlab.com/my_company/backend needs a module, found at gitlab.com/my_company/pkg/auth.
Locally, I've setup GOPRIVATE / git's configuration to make it work (and it works), though in Gitlab's CI Pipelines on a merge request, this fails.
Pipeline log / go.mod
I've added some debugging logs just to make sure everything was setup like I thought. Here's a failing pipeline's log :
$ git config --global url."ssh://git#gitlab.com/my_company/".insteadOf "https://gitlab.com/my_company/"
$ git config --global url."git#gitlab.com:".insteadOf "https://gitlab.com/"
$ git config -l | grep instead
url.ssh://git#gitlab.com/my_company/.insteadof=https://gitlab.com/my_company/
url.git#gitlab.com:.insteadof=https://gitlab.com/
$ env | grep GOPRIVATE
GOPRIVATE=gitlab.com/my_company
$ go mod download
go: gitlab.com/my_company/pkg/auth#v1.1.0: reading gitlab.com/my_company/pkg/auth/auth/go.mod at revision auth/v1.1.0: unknown revision auth/v1.1.0
One weird part of this log I've found is :
reading gitlab.com/my_company/pkg/auth/auth/go.mod - why is it repeating auth/auth? It actually happened once before locally, but it was because I wrote "github" instead of "gitlab" :)
The relevant go.mod line just in case :
require (
gitlab.com/my_company/pkg/auth v1.1.0 // indirect
)
Repository tags
Here are the tags setup on the repository gitlab.com/my_company/pkg :
$ git tag -l
auth/v1.0.0
auth/v1.1.0
cache/v1.0.0
cache/v1.0.1
$ git ls-remote --tags
From git#gitlab.my_company/pkg.git
9efcb02d5489adaac9d525dcb496d868d65e856a refs/tags/auth/v1.0.0
13730d4f61df978c6d690fd2678e2ed924808e0c refs/tags/auth/v1.1.0
2b8dff0ec1b737d975290720933180a9b591a1db refs/tags/cache/v1.0.0
9a3e598bbf83bea57b29d8a908b514861ae37b12 refs/tags/cache/v1.0.1
I'm not that familiar with Gitlab CI so I'm out of things to try. Any ideas?
Thank you!
Update: I finally got gitlab-runner installed so I could try running the yml directly, no luck. It still works locally (not a big surprise).
In you project should be file .gitlab-ci.yml and you can add GOPRIVATE variable to your CI and runner will use it for you project.
More details how to add env vars:
https://docs.gitlab.com/ee/ci/variables/#create-a-custom-cicd-variable-in-the-gitlab-ciyml-file

Can't make Travis-CI work

I'm trying to set up Travis on this repo: https://github.com/lcguida/worksheet
I've put the travis.yml file there.
I've enabled the repository in my travis account (the "ON" button)
I've pushed some commits to see if it woukld trigger the tester.
I'm always getting this message in "My Repositories" tab: You don't have any repos set up on Travis CI
Here is my travis.yml file:
language: ruby
rvm:
- 2.0.0
- 2.1.1
script: 'bundle exec rake test'
Can't figure out what I'm doing wrrong
I made the same mistake as you when starting on Travis :-)
The file name you need is .travis.yml
Note the first dot.
You can see what's wrong by looking at https://travis-ci.org/lcguida/worksheet/requests . . . where it repeatedly says "missing config"

podfile gives an error on install

I cloned a repo from git. Then removed the .git and .gitignore. The podFile looks like
platform :ios, '6.1'
pod 'AFNetworking', '~>1.3.3'
pod 'AFOAuth1Client'
After "pod install" I get the following errors:
$ pod install
Analyzing dependencies
[!] Pod::Executable pull
A ALPValidator/0.0.1/ALPValidator.podspec
A APAsyncDictionary/0.0.3/APAsyncDictionary.podspec
A ASCScreenBrightnessDetector/0.1.0/ASCScreenBrightnessDetector.podspec
A AdBrixSDK/3.0.8/AdBrixSDK.podspec
A AlertShortkut/1.0/AlertShortkut.podspec
A AppStoreOpener/0.0.1/AppStoreOpener.podspec
A Appboy-iOS-SDK/2.3.1/Appboy-iOS-SDK.podspec
A Apptimize/1.5.8/Apptimize.podspec
A AtkDragAndDrop/0.1.0/AtkDragAndDrop.podspec
A AuthorizeNet/0.1.0/AuthorizeNet.podspec
A BloodMagic/0.5.2/BloodMagic.podspec
A CKStringUtils/1.1.1/CKStringUtils.podspec
A CMHTMLView/0.2.0/CMHTMLView.podspec
A CTAssetsPickerController/1.5.0/CTAssetsPickerController.podspec
A CTFeedback/1.0.8/CTFeedback.podspec
U CardIO/3.2.0/CardIO.podspec
U CardIO/3.2.2/CardIO.podspec
U CardIO/3.3.0/CardIO.podspec
U CardIO/3.4.1/CardIO.podspec
U CardIO/3.4.3/CardIO.podspec
U CardIO/3.4.4/CardIO.podspec
A CargoBay/2.0.2/CargoBay.podspec
U CocoaSPDY/1.0.0/CocoaSPDY.podspec
A Colours/4.1/Colours.podspec
M CorePlot/1.0/CorePlot.podspec
M CorePlot/1.1/CorePlot.podspec
M CorePlot/1.2/CorePlot.podspec
M CorePlot/1.3/CorePlot.podspec
M CorePlot/1.4/CorePlot.podspec
M DB5/0.0.1/DB5.podspec
A DCTextEngine/0.1.0/DCTextEngine.podspec
A DUIToolbox/0.1.1/DUIToolbox.podspec
M FMDB/2.0/FMDB.podspec
A FXBlurView/1.5.2/FXBlurView.podspec
A FXBlurView/1.5.3/FXBlurView.podspec
A FXKeychain/1.5/FXKeychain.podspec
M Facebook-iOS-SDK/3.9.0/Facebook-iOS-SDK.podspec
A FlatUI/0.1.0/FlatUI.podspec
A FlatUIKit/1.3/FlatUIKit.podspec
A FreeStreamer/1.5.3/FreeStreamer.podspec
A Functional.m/1.0.0/Functional.m.podspec
A GCDWebServer/1.2.1/GCDWebServer.podspec
A GCDWebServer/1.2.2/GCDWebServer.podspec
A GHUnit/0.5.9/GHUnit.podspec
A GlitchKit/0.0.3/GlitchKit.podspec
A GoldenFleece/1.1/GoldenFleece.podspec
A Google-Mobile-Ads-SDK/6.8.0/Google-Mobile-Ads-SDK.podspec
A Heyzap/6.2.2/Heyzap.podspec
A Heyzap/6.2.4/Heyzap.podspec
U IGIdenticon/0.1/IGIdenticon.podspec
A IOSLinkedInAPI/2.0.0/IOSLinkedInAPI.podspec
A JDStatusBarNotification/1.4.7/JDStatusBarNotification.podspec
A JFOpenWeatherMapManager/1.0.0/JFOpenWeatherMapManager.podspec
A JSONJoy/0.1.0/JSONJoy.podspec
A KTBTaskQueue/1.0.0/KTBTaskQueue.podspec
A LINEActivity/0.2.0/LINEActivity.podspec
U LetsMove/1.9/LetsMove.podspec
A LumberjackPrettyClassInformation/1.0.0/LumberjackPrettyClassInformation.podspec
A M13CSVParser/1.0.0/M13CSVParser.podspec
A M13Checkbox/1.0.0/M13Checkbox.podspec
A M13InfiniteTabBar/2.0.1/M13InfiniteTabBar.podspec
A MSCachedAsyncViewDrawing/1.0.1/MSCachedAsyncViewDrawing.podspec
A MSSlidingPanelController/1.1.1/MSSlidingPanelController.podspec
A MUKAdMobViewController/1.2.1/MUKAdMobViewController.podspec
A MUKAdMobViewController/1.2.2/MUKAdMobViewController.podspec
A MUKAdMobViewController/1.2/MUKAdMobViewController.podspec
A MUKToolkit/1.1.1/MUKToolkit.podspec
U MapBox/1.1.0/MapBox.podspec
A NCICharts/1.0.0/NCICharts.podspec
A NSObjectProperties/0.0.3/NSObjectProperties.podspec
A NSOrderedDictionary/1.0.0/NSOrderedDictionary.podspec
A NSOrderedDictionary/1.0.1/NSOrderedDictionary.podspec
A NXOAuth2Client/1.2.5/NXOAuth2Client.podspec
A OCBorghettiView/0.0.5/OCBorghettiView.podspec
A OpenSSL-Universal/1.0.1.f/OpenSSL-Universal.podspec
A PMAudioRecorderViewController/0.5/PMAudioRecorderViewController.podspec
A PXSourceList/2.0.1/PXSourceList.podspec
A PayPal-iOS-SDK/1.4.6/PayPal-iOS-SDK.podspec
A PopulateKit/0.0.1/PopulateKit.podspec
A PopulateKit/0.0.2/PopulateKit.podspec
A PopulateKit/0.0.3/PopulateKit.podspec
A PopulateKit/0.0.4/PopulateKit.podspec
A PubNub/3.5.5/PubNub.podspec
A RMPickerViewController/1.0.0/RMPickerViewController.podspec
A RZSquaresLoading/1.0/RZSquaresLoading.podspec
A RestReaper/0.1.0/RestReaper.podspec
A RestReaper/0.1.1/RestReaper.podspec
A SVBlurView/0.0.1/SVBlurView.podspec
A SatelliteStore/1.0.0/SatelliteStore.podspec
A TPMapsApp/1.0.0/TPMapsApp.podspec
A Taplytics/1.1.0/Taplytics.podspec
A Typhoon/1.7.3/Typhoon.podspec
A Typhoon/1.7.4/Typhoon.podspec
A UICustomizeKit/0.1.0/UICustomizeKit.podspec
A UIImage+Dummy/0.0.2/UIImage+Dummy.podspec
A WJHXCTest/0.0.2/WJHXCTest.podspec
A WYPopoverController/0.1.8/WYPopoverController.podspec
A YISplashScreen/1.2.1/YISplashScreen.podspec
A YandexMobileMetrica/1.2.0/YandexMobileMetrica.podspec
A ZumeroSync/1.1.0.1729/ZumeroSync.podspec
A wpxmlrpc/0.4/wpxmlrpc.podspec
Pull is not possible because you have unmerged files.
Please, fix them up in the work tree, and then use 'git add/rm <file>'
as appropriate to mark resolution, or use 'git commit -a'.
A bug was found in libgit2 and they had to execute a force push on the specs repo. This is what broke everyone's CocoaPods setup.
You can find the official post about this issue on the CocoaPods blog :
http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/
The recommended way to fix your setup is to execute the following commands :
$ pod repo remove master
$ pod setup
If that doesn't work, you can also delete manually all your cached specs :
$ rm -rf ~/.cocoapods/
$ pod setup
Take a look up the quick fix here !
https://github.com/CocoaPods/Specs/issues/1268
rm -rf ~/.cocoapods/
As Kirualex worte,you'll find the correct solution on http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/
Short, do the following:
$ pod repo remove master
$ pod setup
You could of course also remove the master as described by the others.

Resources