How to get ios OneDrive framework - ios

i want to apply OneDrive SDK in my app.
https://github.com/onedrive/onedrive-sdk-ios
this site has only one way using cocoapod. but i want to apply .framework file(not use cocoapod).
how to get OneDrive.framework file.
#Dylan S
thank you your description, but i have error.
here is my process.
download OneDrive source
in OneDriveSDK folder : pod install
and result
open OneDriveSDK.xcworkspace file and build
get OneDriveSDK.framework
add this framework in my project and buld.
but i have linking error.
my test code:
#import <OneDriveSDK/OneDriveSDK.h>
[ODClient clientWithCompletion:^(ODClient *client, NSError *error){
if (!error){
// self.odClient = client;
}
}];
linking error :
is it right my process?

You can build your own copy of the framework, without installing it as a Cocoapod but you will still need to use Cocoapods when building. OneDriveSDK uses Cocoapods.
Anyway, start by downloading the code (at master or whatever release you want). It's up on GitHub, so pop on over there. I'll wait.
Next up - install its Cocoapod dependencies so Xcode will be able to build the code. If you don't have Cocoapods installed, you'll need to install the gem with sudo gem install cocoapods. Checkout their guide for more info.
You install the pods to the project with pod install from within the OndeDriveSDK directory - it's the one with the file named Podfile.
Now you're ready to build: open "OneDriveSDK.xcworkspace" (notice xcworkspace and not xcodeproj).
Pick the "OneDriveSDK" scheme and build for "Generic iOS Device". Reference the above screenshot.
Finally, build it. Product -> Build For -> Running. It should just work, it did for me.
Once Xcode finishes, open the "Products" folder. Find "OneDriveSDK.framework" and right-click selected "Show in finder". There's a screenshot below of what to look for. Grab the framework file and you're ready to go. Drop it into your project.

UPDATE:
sample code: https://github.com/soheilbm/StackOverFlowQ1
Install cococapod and Rome plugin
gem install cocoapods
gem install cocoapods-rome
Create a empty project (Testing) and setup podfile with:
platform :ios, '8.0'
use_frameworks!
target 'Testing' do
plugin 'cocoapods-rome'
pod 'OneDriveSDK'
end
Run:
pod install
Go to Rome directory and copy all frameworks (except Pods_Testing.framework)

Related

Add cocoapods to existing project

I know this have been asked multiple times, but I still couldn't find the right answer.
I have a project (React Native) that already has a lot of code, lots of dependencies, xcode tweaks, etc. Far away from a vanilla project.
I want to add cocoa pods to it because some third party library can only be installed with it. However, I can't find anywhere information about if I need to "migrate" all my third party packages as well to cocoa pods (move all the linked dependencies there), or is it enough to create a fresh pod file with just those two new dependencies, and everything else should work just fine.
Install CocoaPods on System
Step.1 Open Terminal and enter the following command:
sudo gem install cocoapods
Create Podfile for Project
Step.2 now you need to close Xcode.
Open Terminal at project's root folder
Step.3 Next, enter below command to create podfile:
pod init
Edit podfile
Note: Make sure we will edit podfile with Xcode not TextEdit etc.
Step.4 Type this command to open the Podfile using Xcode for editing:
open -a Xcode Podfile
Step.5 update pode file what you want.
for example
pod 'SwiftForms'
when you add this line it wii installing at next step :)
let's go for install
Step.5 Enter the following command in Terminal and hit Enter
pod install
Thats it!! we have done.
Open Project with pods
Now go to the project folder,we can see that CocoaPods created a new project_name.xcworkspace file and a Pods folder.
open project_name.xcworkspace with xcode
This article has the answer I needed in a very similar situation: https://medium.com/#soufianerafik/how-to-add-pods-to-an-xcode-project-2994aa2abbf1
Essentially this:
install Cocoapods, if needed
terminal to your project root
pod init
pod install

Issue with CocoaPods

hi Iam new to iOS and i am trying to use CVCalender for custom calendar https://github.com/CVCalendar/CVCalendar#-cocoapods-
and i am try to install the cocoa pods but its getting error,
But i have muly cocopods in my file is these are use full or i need to delete these things as shown in image
can any one help me to how to install coacoa pods sucessfully and install cvcalender
after adding delegates also showing same error
1.Open terminal
sudo gem install cocoapods
2.Setup the cocoapods master repo
pod setup
download the master repo. The size is big approx 370.0MB
3.Create xcode project and select root directory in terminal.
cd "your XCode project root directory"
4.Then type
pod init
5.Then open your project's podfile by typing in terminal
open -a Xcode Podfile
6.Add your project's dependencies in open text podfile.
**for ex.** pod 'CVCalendar', '~> 1.5.2'
7.Then install pods into your project by typing in terminal
pod install
Now close your xcode project and open .xcworkspace xcode project file.
Happy Coding.
Also refer cocoapods link. https://cocoapods.org/

Running a Github iOS project containing Cocoapods

I'm quite new to iOS development. Let's say I want to use a UI element from Github that uses Cocoapods.
Like this one:
Whisper by hyperslo
After downloading the zip file from Github:
Could someone give a step-by-step guide to
Run the demo project
Integrate the UI element into my own project
Thanks!
Running the demo is a little tricky. Apparently you have to first do a pod install, then open the workspace.
Make sure you have cocoa pods installed. For how to install it, go to https://cocoapods.org
Use the command line to navigate to the directory where the .xcworkspace file is located i.e. /Whisper-master/Demo/WhisperDemo
Run pod install
After that, open up WhisperDemo.xcworkspace in Xcode and you can run the demo.
To install this as a pod of your own project, you first navigate to your project's directory and do a pod init. A Podfile will be generated. Write in the Podfile the following:
platform :ios, '10.0' # or whatever your target platform is
target 'Your target's name' do
use_frameworks!
pod 'Whisper'
end
Then do a pod install. From now on, do not open the .xcodeproj file. Instead, open the .xcworkspace whenever you want to work on the project.

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.

Integarte/Install cocoapods to existing xcode project, objective-c or swift

I was looking for integrating cocoapods to my existing xcode projects.
I found these few post but they are based on issue instead my problem.
not able to acess installed pods framework
How to add cocoapods to existing workspace not project (this one is for work-space not project)
Making a CocoaPod from an existing Xcode project (this one is more on integrating swift with objective c project)
So I spending quality time i did for my project.
I am sharing step by step integration in my answer post.
please feel free to suggest and improvement.
happy to learn and share
Install CocoaPods on System
Step.1 Open Terminal and enter the following command:
sudo gem install cocoapods
Create Podfile for Project
Step.2 now you need to close Xcode.
Open Terminal at project's root folder
Step.3 Next, enter below command to create podfile:
pod init
Edit podfile
Note: Make sure we will edit podfile with Xcode not TextEdit etc.
Step.4 Type this command to open the Podfile using Xcode for editing:
open -a Xcode Podfile
Step.5 update pode file as shown below screenshot, save and close.
Install lib/framework
Now we have added our required lib/framework pod command
pod 'SwiftForms'
let's go for install
Step.5 Enter the following command in Terminal and hit Enter
pod install
Result screen
Thats it!! we have done.
Open Project with pods
Now go to the project folder,we can see that CocoaPods created a new project_name.xcworkspace file and a Pods folder.
open project_name.xcworkspace with xcode
your project structure should look like

Resources