Download gcm for ios without using cocoapods - ios

Is there a way to get the Google Cloud Messaging framework without using Cocoapods? I use Carthage and don't want to have to use cocoapods just for this one library.

If you use on a demo project the pod and you put this on your PodFile
target 'MyTarget' do
use_frameworks!
pod Firebase
end
Then pod install and below Pods target you will get a .framework which you can use on your real project without using cocoapods.
It's awful to update the framework, because you need a demo project but better than nothing.
Hope it helps

Related

Unable to update firebase latest framework from podfile

When I try to update my Firebase through cocoapods, Always its updating to 3.17.0 version - which is old. As per firebase docs, 6.4.0 is the latest version for iOS. Why i am not able to update to latest.
I have tried multiple ways to resolve this. But no luck.
FireBase Cocoa Pods Installation Not Working
FireBase Cocoa Pods Installation Not Working
platform :ios, '10.0'
use_frameworks!
target 'the-name-of-target' do
pod 'Firebase'
end
I should be able to update to latest firebase framework.
Edit: Solved with workaround.
Google Signin framework having the dependency. As work around removed google sigenin pod & added as framework. Now i am able to update to latest the firebase to latest. Thanks.
Try to clear pods cache and reinstall CocoaPods
Have you tried updating pods?
command for update all pods
pod update
for specific pod
pod update POD_NAME
Examine the generated Podfile.lock to see which dependency forces Firebase's version to 3.x.

Embedding pods to static library iOS

I'm creating a static library in iOS using Objective-C. This library will gather data from the app where this library is integrated, the gathered data from the app will be sent to the server.
I'm just wondering if is it possible to embed a cocoa pods framework in my library like AFNetworking?
Thanks in advance
Yes. It seems to be possible.
I created a static library project and tried to integrate cocoapods in to it with below steps.
pod init
Then edited the podfile to integrate AFNetworking pod in the project like below
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'Testing' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'AFNetworking', '~> 3.0'
# Pods for Testing
end
then gave
pod install
I get the below warning
[!] The Podfile contains framework or static library targets
(Testing), for which the Podfile does not contain host targets
(targets which embed the framework). If this project is for doing
framework development, you can ignore this message. Otherwise, add a
target to the Podfile that embeds these frameworks to make this
message go away (e.g. a test target).
As the first line in the warning says we are doing framework development, hence we can ignore this message and it should work fine.
Also my suggestion is to use Alamofire instead of AFNetworking as Alamofire is swift based and AFNetworking is objective-c based.

How to integrate iOS Framework into Cocoapod

My company has an iOS SDK/framework that I've been asked to implement a Cocoapod for to help the install process.
I'm a C#/.Net developer by trade, so this is more of a task than it probably should be!
I successfully followed a guide over at https://code.tutsplus.com/tutorials/creating-your-first-cocoapod--cms-24332 which walks through setting up a cocoapod, but doesn't include any Framework integration.
Our framework appears to be a combination of objective-C and swift files.
I then tried setting up another cocoapod project and adding my framework file under Pods>Frameworks>iOS>myFramework.framework.
Once I did this, I tried pod install on the example project which looked like it installed my pod, but I see no reference to the framework.
I also tried adding my framework via the podspec metadata file in s.ios.vendored_frameworks, to no avail...
Why on earth is something that's supposed to make our lives easier so complicated to setup!?
Help most appreciated.
Dave
podfile
use_frameworks!
target 'iOS_sdk_Example' do
pod 'iOS_sdk', :path => '../'
target 'iOS_sdk_Tests' do
inherit! :search_paths
end
end

Parse SDK / CocoaPods

I have an objective C iOS app using the Parse SDK.
In the process of moving this app from Parse.com to a self hosted Parse-Server, I need to update the Parse SDK to the latest version. For this update I decided to go with CocoaPods.
This is the first time I touch CocoaPods (after reading and hearing so much good about it).
I found my way, following what I could read here and also based on a few CocoaPods tutorial I quickly viewed.
Having my project "ready", when buiding it I get this error:
#import <ParseUI/ParseUI.h> -----> File not found.
Obviously things have changed place. And I tried a couple of unsuccessful solutions.
So here is my question:
How do I need to change the settings of my project, now that I am using CocoaPods?
In order to use Cocoapods with parse and Parse UI you need to do the following steps:
Create a new file and name it Podfile. This file should be located on your IOS project root folder.
The Podfile should contain at least the following structure if you want to use parse IOS SDK and ParseUI
platform :ios, '8.0'
use_frameworks!
pod 'Parse'
pod 'ParseUI'
# Put more pods in here..
Notice to the platform, you may change it to the minimum version that your app can run on and the use_frameworks! will install all your pod as frameworks and this is mandatory if you like to consume Swift libraries.
Open terminal and navigate to your IOS root directory and enter pod install. This command will install all the pods and dependencies into your project.
After installing you will no longer use the IOS project file from now on you will use a new file which called workspace. The workspace will contain both your project files and the pods project/frameworks files.
Build your project, fix some error (if there are) and run it to make sure that it works as expected .
More CocoaPods commands that you need to know are:
pod update - update all your pods to the latest release or to the release that was mentioned in the Podfile
pod update update specific pod to the latest release or to the release that was mentioned in the Podfile
pod outdated - display out to date pods that are being used inside your project.

Include GCM sdk to cocoapod project

I already have a podsfile importing several other projects as frameworks, which works pretty nicely. Unfortunately it is not possible to install the gcm ios library as a framework. What is the way to go here? Just drag and drog the gcm pod into the project?
There's a setup guide for both objective-c and swift on the developers site of gcm, it can be found here - https://developers.google.com/cloud-messaging/ios/client?ver=swift
pod init
Open the Podfile created for your application and add the following:
pod 'Google/CloudMessaging'
Save the file and run:
pod install
This creates an .xcworkspace file for your application. Use this file for all future development on your application.

Resources