I am seeing the following error:
Code Signing /Users/mikesimonetta/Library/Developer/Xcode/DerivedData/sorealty-
bymtwudklcqeahacubxoedmawvut/Build/Products/Debug-appletvsimulator/DEV_So's Realty.app/Frameworks/Alamofire.framework with Identity -
/usr/bin/codesign --force --sign - --preserve-metadata=identifier,entitlements '/Users/mikesimonetta/Library/Developer/Xcode/DerivedData/sorealty-bymtwudklcqeahacubxoedmawvut/Build/Products/Debug-appletvsimulator/DEV_So's Realty.app/Frameworks/Alamofire.framework'
/Users/mikesimonetta/Desktop/Projects/Clearbridge/sir-tvos/sothebysrealty/Pods/Target Support Files/Pods-So_DEV/Pods-So_DEV-frameworks.sh: eval: line 113: unexpected EOF while looking for matching `''
Command /bin/sh failed with exit code 2
I have looked all over for a solution to this. I have cleaned the project. I've deleted derived data. I've removed workspace/pods/lock file and built out pods from scratch. Still receiving this issue.
Any help on this blocker would be greatly appreciated. Thanks in advance!
My Podfile:
# Uncomment this line to define a global platform for your project
platform :tvos, '9.0'
target 'So_DEV' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for sorealty
pod 'GooglePlacesAPI', '~> 1.1'
pod 'Alamofire', '~> 4.7'
pod 'SWXMLHash', '~> 4.0.0'
end
target 'So_PROD' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for sorealty
pod 'GooglePlacesAPI', '~> 1.1'
pod 'Alamofire', '~> 4.7'
pod 'SWXMLHash', '~> 4.0.0'
end
target 'TopShelf_DEV' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for sorealty
pod 'GooglePlacesAPI', '~> 1.1'
pod 'Alamofire', '~> 4.7'
pod 'SWXMLHash', '~> 4.0.0'
end
target 'TopShelf_PROD' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for sorealty
pod 'GooglePlacesAPI', '~> 1.1'
pod 'Alamofire', '~> 4.7'
pod 'SWXMLHash', '~> 4.0.0'
end
Had this same issue, and it was solved by adding a post_install script in the Podfile to update the EOF character for each target. Not entirely sure what the root issue is, and why other projects I've worked on haven't had this same issue.
Found the solution/workaround here - https://github.com/CocoaPods/CocoaPods/issues/7090
And implemented it a little differently with some modifications to the script. It now looks like this:
post_install do |installer|
installer.aggregate_targets.each do |target|
if target.name == 'Pods-Target_2' || target.name == 'Pods-Target_1'
frameworkPath = "Pods/Target Support Files/#{target.name}/#{target.name}-frameworks.sh"
puts "Found #{frameworkPath}"
text = File.read(frameworkPath)
new_contents = text.gsub(/'\$1'/, "\\\"$1\\\"")
File.open(frameworkPath, "w") {|file| file.puts new_contents}
puts "Updated #{target.name} framework file with proper EOF characters"
end
end
end
Hope this helps!
Related
target 'MyApp' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for MyApp
pod 'Alamofire', '~> 3.5' end
target 'MyAppTests' do
inherit! :search_paths
# Pods for testing
end
target 'MyAppUITests' do
inherit! :search_paths
# Pods for testing
end
This is the pod file, swift 2.3, Xcode VERSION 7.3.1. I'm trying to install alamofire , but I'm getting the error above, i searched google , but there wasn't any useful things to do. any help?
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
target 'MyProject' do
use_frameworks!
# Pods for MyProject
pod 'Alamofire', '~> 4.7'
end
Hopefully this must work. Check for your Pod version also.
First of all try make higher deployment target
if not work then
Try to run these command one by one
pod repo remove master
pod setup
pod update
I have updated to cocoapods 1.1.1 for my XCode 8 Swift 2.0 project and now I'm getting the warning "...target overrides the ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES ..." in the console. How can I fix this?
Here my podfile
platform :ios, '9.0'
use_frameworks!
def app_pods
pod 'Alamofire', '~> 4.0.0'
pod 'AlamofireObjectMapper','~> 4.0.0'
pod 'RealmSwift', '~> 2.0.2'
pod 'KeychainAccess', '~> 3.0.0'
pod 'ReachabilitySwift', '~> 3'
pod 'SwiftyBeaver', '~> 1.0.1'
pod 'GoogleAnalytics', '~> 3.17.0'
end
def unit_tests
app_pods
pod 'OHHTTPStubs', '~> 5.2.1'
pod 'OHHTTPStubs/Swift', '~> 5.2.1'
end
target 'Demo' do
app_pods
end
target 'App1' do
app_pods
end
target 'App2' do
app_pods
end
target 'DemoTests' do
unit_tests
end
target 'App1Tests' do
unit_tests
end
target 'App2Tests' do
unit_tests
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.0'
end
end
end
I was able to fix this problem by doing the following:
Go into Build Settings
At the top select All and Combined
Under Build Options you should see Always Embed Swift Standard Libraries and it is bold.
Click on it and click delete. It should now be unbolded.
Pod install and the error/errors should go away!
It wont let me post an image because i don't have enough reputation, so here is a detailed screen shot link!
https://cloud.githubusercontent.com/assets/17066507/21532583/93df897e-cd1f-11e6-9f17-d25cb81a2a53.png
The accepted solution works, but now you have to make sure all of your teammates are performing it each pod install.
And we all know they won't.
You could make CococaPods do it automatically, by adding this to the bottom of your Podfile:
post_install do |installer_representation|
installer_representation.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if config.name == 'MyPOD'
config.build_settings['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = 'Yes'
end
end
end
end
More info here: https://www.devsbedevin.net/cocoapods-always-embed-swift-standard-libraries/
This issue has been fixed in the following pull request https://github.com/CocoaPods/CocoaPods/pull/6068 and it should be out in cocoapods version 1.1.2 . I got the info from the following github issue https://github.com/CocoaPods/CocoaPods/issues/6067
I'm migrating my iOS application to Xcode8 and Swift 3. I updated the dependencies version, everythings looks fine except for the SQLite.swift.
In my project on the line "import SQLite" I've this error:
"Module compiled with Swift 2.3 cannot be imported in Swift 3.0 ..."
while I'm targeting the latest version of SQLite.swift.
I also set "Use Legacy Swift Language Version" to yes for the Target "SQlite.swift" under the Pods project.
Any idea what I'm missing ?
My pod file looks like this:
platform :ios, '8.0'
use_frameworks!
target 'XYZ' do
pod 'OAuthSwift', '~> 1.0.0'
pod 'SwiftyJSON', '~> 3.1.1'
pod 'SQLite.swift', '~> 0.10.1'
pod 'Fabric', '~> 1.6.9'
pod 'Crashlytics', '~> 3.8.2'
pod 'PagingMenuController', '~> 1.4.0' #2.0.0 require iOS9+
pod 'SDWebImage/WebP', '~> 4.0.0-beta2'
pod 'ReachabilitySwift', '~> 3'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.0'
end
end
end
I think 0.10 doesn't support swift 3.
Try using the following line in Podfile
pod 'SQLite.swift', :git => 'https://github.com/stephencelis/SQLite.swift.git', :branch => 'master'
use this.definatly work i use this and for me 100% work
use_frameworks!
target 'YourAppTargetName' do
pod 'SQLite.swift', '~> 0.11.3'
end
I'm trying to install the OpenTok pod to my pod file. I have a very big project with many pods installed from the previous developers.
The pod file looks something like this:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
def common_pods
pod 'TPKeyboardAvoiding'
pod 'Fabric'
pod 'Crashlytics'
pod 'FBSDKCoreKit', '~> 4.11.0'
pod 'FBSDKLoginKit', '~> 4.11.0'
pod 'MBProgressHUD'
pod 'BMEApi', :path => 'BMEApi'
pod 'NMRangeSlider'
pod 'SDWebImage'
pod 'ASMediaFocusManager'
pod 'QBImagePickerController', '~> 3.4'
pod 'HPGrowingTextView', '~> 1.1'
pod 'HNKGooglePlacesAutocomplete', '~> 1.1'
pod 'Stripe', '~> 8.0'
end
target 'My_Target' do
common_pods
end
target 'My_Target_Appstore' do
common_pods
end
When I try to add
pod 'OpenTok'
to the "common_pods" section, I get a crash in the terminal when I try to run pod install. It says something along the lines of "Oh no, an error has occurred" asking me to write a ticket.
When I open up my project, all the pods files are messed up and Xcode can't locate any of them.
To test to see if there was something wrong with the framework, I tried installing it on a random test project and it worked perfectly
So the issue here is why won't it install properly on this project, but it will on the other project, and why does it mess up the entire pod file?
Try to add use_frameworks!
So, result pod file (name of the my test project - stackoverflow-39682480):
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
def common_pods
pod 'TPKeyboardAvoiding'
pod 'Fabric'
pod 'Crashlytics'
pod 'FBSDKCoreKit', '~> 4.11.0'
pod 'FBSDKLoginKit', '~> 4.11.0'
pod 'MBProgressHUD'
# I Do not have BMEApi lib, so i disable it of me
#pod 'BMEApi', :path => 'BMEApi'
pod 'NMRangeSlider'
pod 'SDWebImage'
pod 'ASMediaFocusManager'
pod 'QBImagePickerController', '~> 3.4'
pod 'HPGrowingTextView', '~> 1.1'
pod 'HNKGooglePlacesAutocomplete', '~> 1.1'
pod 'Stripe', '~> 8.0'
pod 'OpenTok'
end
target 'stackoverflow-39682480' do
common_pods
end
Result
The question is how to cleanly remove Test in cocoapods PodFile ?
I'ved just recently updated cocoapods 1.0.0 to my project
I ran "pod init" to generate a sample PodFile then put in my pods.
Whole bunch of error generated by the xcode test project ProjectNameTests
http://imgur.com/fUOF18i
How can I cleanly remove the tests ? Even if comment it out there is other problems like Bridging-Header.h cannot find dependent header.
In my current PodFile for 1.0.0:
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
target 'ProjectName' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for ProjectName
pod 'FBSDKCoreKit', '~> 4.9'
pod 'FBSDKLoginKit', '~> 4.9'
pod 'FBSDKShareKit', '~> 4.9'
pod 'SwiftyJSON', '~> 2.3.1'
pod 'Alamofire', '~> 3.0'
pod 'Google/Analytics', '~> 1.0.0'
pod 'Fabric'
pod 'Crashlytics'
pod 'AWSS3'
target 'ProjectNameTests' do
inherit! :search_paths
# Pods for testing
end
end
my previous PodFile, no mention for target project or test:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'FBSDKCoreKit', '~> 4.9'
pod 'FBSDKLoginKit', '~> 4.9'
pod 'FBSDKShareKit', '~> 4.9'
pod 'SwiftyJSON', '~> 2.3.1'
pod 'Alamofire', '~> 3.0'
pod 'Google/Analytics', '~> 1.0.0'
pod 'Fabric'
pod 'Crashlytics'
pod 'AWSS3'
The type of errors you'r defining are not because you have a target to the tests in your Podfile. inherit! :search_paths indicates that this target inherits the pods from the target above it.
One thing you might be getting wrong is that the "target 'ProjectName' do" is not regarding your project name but an actual target of your project.
A target can have a different name then your project.
You can also check the official migration guide Migration Guide.