I created one pod for facebook login. In the local repository, podspec validated properly. After that, I committed code on my GitHub account.
Then I release a new version and then I performed pod trunk command.
pod trunk push FBSDKLoginKit.podspec
This command will one weird error like below.
You are not allowed to push new versions for this pod. The
owners of this pod are nlutsenko#me.com and cocoapods#fb.com.
Below is my podSpec.
Pod::Spec.new do |s|
s.name = 'FacebookLogin'
s.version = '1.0.0'
s.summary = 'The Reusable Facebook Login Components for iOS is the easiest way to get data from Facebook.'
s.description = 'The Reusable Facebook Login Components for iOS is the easiest way to get data from Facebook.'
s.homepage = 'https://github.com/simformsolutions/FacebookLogin.git'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Xxxxx' => '<Email>' }
s.source = { :git =>
'https://github.com/simformsolutions/FacebookLogin.git', :tag => s.version.to_s }
s.ios.deployment_target = '10.0'
s.source_files = 'ReuseabelLogInComponets/Classes/*.swift'
s.dependency 'FBSDKLoginKit', '4.30.0'
Because someone with email the email nlutsenko#me.com (https://github.com/facebook/facebook-sdk-swift) has registered the pod with the name 'FacebookLogin' before you. So you must choose other name for your new pod.
Related
I have a framework project written in Objective C that i want to publish on JFrog Artifactory.
My .podspec file is like this
Pod::Spec.new do |s|
s.name = 'Name'
s.version = '0.0.1'
s.summary = 'summry'
s.description = <<-DESC
description
DESC
s.homepage = 'homepage'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'user' => 'email' }
s.source = { :git => 'url.git', :tag => s.version.to_s }
s.ios.deployment_target = '11.4'
s.source_files = 'Name/*{.h}','Name/**/*{.h}'
s.dependency "AFNetworking"
end
it is working fine if i define something like this in my Podfile
pod ‘Name’,:git =>'url.git', :tag=>'0.0.1'
but the requirement is to publish this framework on JFrog and fetch from there, in JFrog video tutorial they are saying to upload project in tar.gz form and it will generate podspec file in Artifactory but its not happening in my case.
Could someone please help me?
Thanks
Try adding an empty line at the beginning and the end of the .podspec file. This somehow fixed the problem for me.
Also make sure your .podspec file passes all tests of pod spec lint Name.podspec
I created my own cocoapods library and push it. But when i run pod install for an app, there is only ReplaceMe.m file. But i have changed this file with my own classes. And also i can see files on github.
platform :'ios', '8.0'
pod 'MyPod'
However, if i add git url to Podfile, Library classes exist.
platform :'ios', '8.0'
pod 'MyPod', :git => 'https://github.com/ugurcetinkaya/MyPod.git'
What should i do to solve this?
My .podspec file:
Pod::Spec.new do |s|
s.name = 'UURCCentralizedTokenView'
s.version = '0.1.0'
s.summary = 'Customizable Centralized TokenView'
s.description = 'Customizable Centralized TokenView for iOS applications.'
s.homepage = 'https://github.com/ugurcetinkaya/UURCCentralizedTokenView'
# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Ugur Cetinkaya' => 'ugurcetinkaya#ymail.com' }
s.source = { :git => 'https://github.com/ugurcetinkaya/UURCCentralizedTokenView.git', :tag => s.version.to_s }
s.ios.deployment_target = '8.0'
s.source_files = 'UURCCentralizedTokenView/Classes/**/*'
s.frameworks = 'UIKit'
I solved my problem. Git version of library didn't have library classes on current release. I added classes to my repo. After that i updated version of my repo and my pod with adding new tag to my repo. Cocoapods version is looking at the version of repo.
I made a Swift framework I want to make a CocoaPods for it.
I've followed all the instructions:
created podspec file, added version tag, pushed it to github
When I run pod lib lint it passes but when I run pod spec lint it fails.
Here is my podspec file
Pod::Spec.new do |s|
s.name = "Seru"
s.version = "0.0.3"
s.summary = "Seru is Simple Core Data stack"
s.description = <<-DESC
Seru is Swift framework for working wit Core Data. It setup your core data stack and
gives you nica actions to work with it
DESC
s.homepage = "https://github.com/kostiakoval/Seru"
s.license = { :type => "MIT", :file => "LICENSE" }
s.author = { "Kostiantyn Koval" => "konstantin.koval1#gmail.com" }
s.social_media_url = "http://twitter.com/kostiakoval"
s.platform = :ios, "8.0"
s.source = { :git => "https://github.com/kostiakoval/Seru.git", :tag => s.version }
s.source_files = "Seru/Source", "Seru/Source/**/*.{swift}"
s.requires_arc = true
s.ios.vendored_frameworks = 'Carthage/Build/iOS/Sweet.framework'
end
It has external framework dependency. I'm guessing this is a problem.
When I do pod speck lint, it says that I can't find that external framework
The problem was that CocoaPods don't include vendored_frameworks folder.
To fix it is to specify that this folder should be included to a CocoaPod by using preserve_paths.
s.preserve_paths = 'Carthage/Build/iOS/Sweet.framework'
I have been following this guide to get a project on mine on CocoaPods. I am currently on the Testing section and am getting the error:
[!] No podspec found for `AppUpdateTracker` in /Users/aaron/Downloads/AUTCocoaPodsTest/AUTPodTest/Pods/AppUpdateTracker/AppUpdateTracker.podspec.json
Linting againt my repo works fine:
pod spec lint App-Update-Tracker.podspec
-> App-Update-Tracker (1.0.0)
Analyzed 1 podspec.
App-Update-Tracker.podspec passed validation.
And this is my Podspec:
Pod::Spec.new do |s|
s.name = "App-Update-Tracker"
s.version = "1.0.0"
s.summary = "AppUpdateTracker is a simple, lightweight iOS library intended to determine basic app install/update behavior."
s.description = <<-DESC
This library allows you to easily determine when the user uses your app after a fresh install, when the user updates your app (and the version from which (s)he updated, and how many times the user has opened a given version of your app. This library was created in order to help determine update information so that appropriate data migration logic could be run after an app update.
DESC
s.homepage = "https://github.com/Stunner/App-Update-Tracker"
s.license = { :type => "MIT", :file => "LICENSE.txt" }
s.author = { "Stunner" => "" }
s.social_media_url = "http://twitter.com/ajubbal"
s.platform = :ios
s.source = { :git => "https://github.com/Stunner/App-Update-Tracker.git", :tag => "1.0.0" }
s.source_files = "AppUpdateTracker"
s.requires_arc = true
end
Any idea on how to get around this issue?
It looks like your Pod names doesn't match:
The name of the pod is App-Update-Tracker but it's references as AppUpdateTracker.
So i figure this should be really easy but after a day of Googling and playing around i still can't seem to get this working. I have a private cocoapod which downloads code from a private git repository. This is all set-up and works fine.
What i'm struggling with is i need to include localized xibs in the cocoapod. I have a LoginView which is shared code across a number of our internal apps. However we have localised versions of the view. From what i can tell due to the way cocoapods flattens out the structure it's just copying the localized xib which is causing the *.lproj directories to be lost. When i then try and use the cocoapod it seems to pick up the first xib regardless of the language setting on the device.
I'm hoping someone might be able to guide me as to how i go about retaining the folder heirachy or if there's another way to include the localised xibs into the cocoapod.
#
# Be sure to run `pod lib lint NAME.podspec' to ensure this is a
# valid spec and remove all comments before submitting the spec.
#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
#
Pod::Spec.new do |s|
s.name = "ios-XX-common"
s.version = "1.0"
s.summary = "XXXXXX"
s.description = "Pod containing common source code used across multiple apps"
s.homepage = "http://www.example.com"
s.license = 'Copyright'
s.author = { xxx }
s.source = { :git => "xxxx:/data/git/ios-xx-common.git", :tag => 'v1.0'}
s.platform = :ios, '7.0'
s.requires_arc = false
s.header_dir = 'ios-xx-common'
s.header_mappings_dir = 'CommonSourceCode'
s.source_files = "CommonSourceCode/**/*.{h,m}", "CommonSourceCode/CustomUIObjects/**/*.{h,m}",
"CommonSourceCode/Data Objects/**/*.{h,m}", "CommonSourceCode/Helpers/**/*.{h,m}",
"CommonSourceCode/UID/**/*.{h,m}", "CommonSourceCode/UIViews/**/*.{h,m}",
"CommonSourceCode/ViewControllers/**/*.{h,m}"
s.resource_bundles = { 'rr-common-xibs' => ['CommonResources/Xibs/*.lproj'],
'rr-common-other' => ['CommonResources/Icons/*.*', 'CommonResources/IPhone/*.*', 'CommonResources/IPhoneIPad/*.*', 'CommonResources/Sounds/*.*'] }
s.public_header_files = '**/*.h'
s.dependencies = { 'Parse-iOS-SDK' => '~> 1.2.19', 'CocoaLumberjack' => '~> 1.7.0',
'MBProgressHUD' => '~> 0.8', 'AFNetworking' => '~> 1.0' }
end
Thanks
I think you might be after "Development Pods".
So I have two projects, a library project and an app specific project.
In my library project I have a library.podspec file
Pod::Spec.new do |s|
s.name = "Library"
s.version = "0.0.1"
s.summary = "Shared library."
s.description = "This is an iOS library for shared common code across all apps"
s.homepage = "http://blah.com"
s.license = 'COMMERCIAL'
s.author = { "My name" => "my#email.com" }
s.social_media_url = "http://twitter.com/blah"
s.platform = :ios, '8.0'
s.source = { :git => "https://bitbucket.org/blah/library.git", :tag => '0.0.1' }
s.source_files = 'Library/Classes/**/*.{h,m}', 'Library/Models/**/*.{h,m}', 'Library/ViewModels/**/*.{h,m}', 'Library/Views/**/*.{h,m}'
s.resources = "Library/Images/**/*.png", "Library/Images/**/*.jpg", 'Library/Views/**/*.xib', "Library/Fonts/*.otf"
s.requires_arc = true
s.framework = 'MapKit', 'CoreLocation'
s.dependency 'AFNetworking'
s.dependency 'ReactiveCocoa'
s.dependency 'JLRoutes'
end
Then in my specific app project's Podfile...
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
link_with 'Myapp', 'Myapp-Tests'
pod 'Library', :path => '../library/'
Now when I run "pod update" for my specific app project I can see under the Pod project instead of under Pods, I have a new folder called Development Pods.
Just be aware that if you add new files in your Library project, be sure to pod update again.
Peace.