Using https://github.com/tumblr/TMTumblrSDK link, i am trying to integrate tumbler sdk and compile the Photosharing sample project under the Example folder. But i am getting the following error message:
diff: /../Podfile.lock: No such file or directory
I am not able to understand the pod file concept. Can anyone please explain me the proper steps that need to be followed to integrate this sdk in iOS app.
The targets in your xcode projects have a build phase to perform a lock file. But it seems like your xcode projects configurations are not referencing the user defined settings configured in Pods/Pods-libPods.xcconfig.
It looks like you are trying to link a Pod with specific targets in multiple xcodeprojs. If my assumption is correct, you are using the target attribute incorrectly. The target attribute creates a new static library within the Pods project that includes the Pods you configured within that target.
The default target for the Pods xcodeproj is libPods which generates the libPods.a static library. This is generated if you do not specify a target. So if you don't care about generating multiple static libaries in the Pods xcodeproj, don't bother defining a target and use the link_with attribute to link the default libPods target (static library) to the targets in your xcodeprojs.
check this link for further reading here
Related
I originally created my project using Xcode's templates for iOS, and then arranged my files into "core" logic and "iOS" GUI. core contains a single file, Game.swift.
Now I've added a CLI target as well. However, the CLI target doesn't seem to "see" the files in core, and when I try to init the main object, I get:
Use of unresolved identifier 'Game'
I assume this is because adding a target after-the-fact failed to set up a Search Path or similar in the target, but I'm looking around and don't see anything obvious.
I'm trying to create my first pod, and, as per the recommendation on the website, am doing so at the command line with pod lib create <mylib>. The trouble is lib create assumes I want to create an iOS library, when in fact I'm developing for OS X. I've grep'ed my way through the cocoapod files on my computer looking for the template on which the generated project is based, but have come up empty-handed. Does anyone know how I might fiddle with these settings, wherever they are, to get the configuration I'm after?
If you already have your library created and just want to create a sample podspec you should use:
pod spec create
Instead. You can also pass this a URL to set that as the source automatically. See
pod spec create --help
For more info.
I'm trying to build a photo App Extension in Xcode 6 Beta-6 that uses cocoapods libraries.
The bridging header that Xcode creates for the photo extension can't see anything from cocoapods.
For example: #import <GPUImage/GPUImage.h> results in the error "GPUImage/GPUImage.h" file not found.
I've tried every conceivable path for the import (with brackets and quotes) and have had almost no success. The exception is that for simple pods like SVProgressHUD, the following ugly terrible hack works:
#import "../Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.h".
But for GPUImage, it walks into the GPUImage.h header and decides it suddenly can't see GPUImageContext.h despite having no issue when this is imported with the bridging header for the normal swift code that is not part of the app extension.
What is different about the compilation of app extensions that is preventing the bridging header from behaving sanely?
Note:
I've read every possible permutation of this tutorial and it is not immediately applicable, just in case anyone thinks they have found the answer there.
Also, the problem described in this SO question may be related, but I asked this question anyway in case my issue is specific to app extensions.
EDIT (2015/03/10)
See new accepted answer. I tried it in a new project and it worked, although my test pods both used sharedApplication which is disallowed in extensions. The fact that they showed those errors means it linked properly. Way to go #LeChatNoir!
Success.
The solution is as follows:
Once you have your app extension and it's bridging header in a project using cocoapods and you want to use one of those cocoapods libraries, trying to include the pod like #import <GPUImage/GPUImage.h> will fail with file not found.
First, make sure that you tell the app extension (click on your project file, then on the extension target) to link against libPods.a, much like your app target.
Next, in your actual project (click on your project file, then on the project file again in the "Project" section of the inner sidebar) under the Info tab, set the configuration of the extension for Debug, Release, and Inhouse to use the "Pods" configuration from the dropdown. Pod Install will not do this for you, so you will need to do it yourself.
Lastly, make sure that both the Pods project's targets and your project's targets have all the architectures you need to build for in the Valid Architectures variable or you will get the ever-fun undefined symbols error.
This should work and allow you to import the pods of your choice like normal.
EDIT (2014/10/14): As an aside, since you may also be including Objective-C files from within your own project code in the Swift extension, you should make sure that any .m files you put in the bridging header are also compiled by the extension target. You can either do this from the compile sources menu for the target or in the .m file itself using the "Target Membership" section of the right sidebar in Xcode.
The above answers will work, but I only wanted a couple pods in my extension, so I did the following to my Podfile:
target '[Main App Target Name]' do
pod ...
pod ...
pod ...
end
target '[Extension Target Name]' do
pod ...
end
And then a pod install will do it!
The proper way to do this is to update your podfile to add just 1 line :
link_with 'yourApp', 'yourAppExtension'
and a pod update should resolve the issue.
link_with, you will not use it anymore.
Invalid Podfile file: [!] The specification of link_with in the
Podfile is now unsupported, please use target blocks instead..
Below is the perfect answe, tested also.
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, ‘9.0’
use_frameworks!
inhibit_all_warnings!
target 'DemoTodayWidget' do
pod 'Reachability', '~> 3.2'
end
target 'My Widget' do
pod 'Reachability', '~> 3.2'
end
I am building an iPhone application which connects to an LDAP server (no encryption). I am trying to use iOSPorts but I am having trouble following the documentation, I think it was written for Xcode 3, while I've only ever used Xcode 4.
All that is required is to do simple search queries of the server and returning the results.
Some of the trouble I am having:
For example in step 3 my iOSPorts/include folder is empty and only contains the .gitignore file.
For step 4 which files do I need to add just the ports folder containing database, devel, iOSPorts and security?
For step 6 the direct dependencies panel, is this the target dependencies of build phases , which libraries need to be selected?
I think step 7 is for Xcode 3 too,
Any help with this would be much appreciated!
I am building an iPhone application which connects to an LDAP server (no encryption). I am trying to use iOSPorts but I am having trouble following the documentation, I think it was written for Xcode 3, while I've only ever used Xcode 4.
The original instructions were created for Xcode 3 since Xcode 4 was still in early beta when I published the first release of iOS Ports. The instructions have been updated within the last month for use with Xcode 4. I try to use the name used by "Xcode 4 User Guide" when describing the steps, so I recommend reading the first few chapters of this document from Apple.
For example in step 3 my iOSPorts/include folder is empty and only contains the .gitignore file.
Initially the include directory will be empty. The individual ports will copy the header files to the include directory. This is to prevent the end developer from needing to add a path to OpenSSL, Cyrus SASL, and OpenLDAP in order to compile an app for OpenLDAP.
Any help with this would be much appreciated!
So here is a quick run down of how iOS Ports works.
Each port of an Open Source package has an Xcode project file. That Xcode project file lists other Xcode project files and Makefiles as dependencies. Here is the high level steps used by an iOS Ports Xcode project file to compile the port:
Execute the port's MakeFile
Makefile: Download the source archive from the Internet (fails if Internet is unavailable)
Makefile: Verifies the integrity of the source archive using md5sum.
Makefile: Unpacks the source archive.
Makefile: Applies any required patches to the source code.
Makefile: Copies headers to the iOS Ports include directory.
Build any libraries from other ports listed in the build settings' Target Dependencies (for instance, libldap.a in OpenLDAP requires libsasl2.a from Cyrus SASL).
Compiles requested library.
The README has more information on how to add the project files to your project and link against the libraries. There also a few example programs in the examples directory.
If you do continue to have problems, please let me know. I try my best to keep on top of requests for help regarding iOS Ports and my other projects.
I haven't gone through all the process, but I am pretty sure for step 3, you have to 'make' the project first. There is a Makefile in the top folder of the project.
I was reading this great article about Base SDK and Deployment targets and decided to try it out myself. The Deployment target seems to be buried in the Build settings, and not that easy to access compared to the Base SDK target (which is right there in the General tab of the project settings). To get to the Deployment settings now I have to Get Info, go to the Build tab, then search for "Deployment".
Is there a quick way to check and access the Deployment target in Xcode that I'm missing?
Sure. Never use the build pane. Just put the setting in your xcconfig files, and then it's easy to maintain, easy to find, and easy to comment. I have a detailed talk on how to convert from the Build Pane to xcconfig files and why you'd want to.