Compiling Swift 3.2 project stuck and eats up memory in Xcode 9.
I believe there are memory leaks in our project. But I can build and run the same project in Xcode 8.3.3 without problems.
Can anyone help me with this problem?
Here are the pods I use:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
use_frameworks!
target 'flyakeed' do
pod 'lottie-ios', '~> 2.1.3'
pod 'Alamofire', '~> 4.3'
pod 'SwiftyJSON', '~> 3.1.4'
pod 'NHRangeSlider', '~> 0.2'
pod 'MGSwipeTableCell', '~> 1.5.6'
pod 'Kingfisher', '~> 3.13.1'
pod 'JTAppleCalendar', :git => 'https://github.com/patchthecode/JTAppleCalendar.git', :commit => 'd705c7467e43ae2675cfde6521bdf52faaebf2de'
pod 'Socket.IO-Client-Swift', '~> 10.0.0'
pod 'OneSignal', '>= 2.5.2', '< 3.0'
pod 'GoogleAnalytics'
pod 'FBSDKCoreKit'
end
target 'OneSignalNotificationServiceExtension' do
pod 'OneSignal', '>= 2.5.2', '< 3.0'
end
Doubt this is your issue, but after following #dr_barto's suggestion (Cmd+9), I noticed that I wasn't logged in to any Team... Xcode decided to log me out at some point and kept failing silently.
Related
I am running .xcworkspace file on xcode and I am getting the following error:-
library not found for -lPods-
This is my Podfile:-
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target '' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/DynamicLinks'
pod 'GoogleSignIn', '~> 5.0'
pod 'OneSignal', '>= 2.6.2', '< 3.0'
pod 'TPKeyboardAvoiding'
pod 'FBSDKCoreKit', '~> 5.5.0'
pod 'FBSDKLoginKit', '~> 5.5.0'
pod 'Phone-Country-Code-and-Flags'
pod 'ListPlaceholder'
pod 'Shimmer'
end
target '' do
pod 'OneSignal', '>= 2.6.2', '< 3.0'
end
Any help would be highly appreciated! Thanks:)
Try Build Active Architecture Only" = YES and run the pod install
Previously in project, Eureka and GooglePlacesRow were directly embedded.
Now, I am trying to update the Eureka and GooglePlacesRow to latest version using pods.
But this is causing error as "No such module 'Eureka'" only in the files related to GooglePlacesRow.
Xcode version 10.2.1
Swift Version 5
Eureka Version 5.0.0
GooglePlacesRow 3.2.0
I tried the following things:
Clean and build
Deleting Derived data and then build
Checked for Framework Search path as well.
My Podfile:
platform :ios, '11.0'
inhibit_all_warnings!
target 'ProjectName' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for ProjectName
pod 'SnapKit', '~> 4.2.0'
pod 'KeychainAccess', '~> 3.2.0'
pod 'Just', '~> 0.7.1'
pod 'SwiftyJSON', '~> 5.0.0'
pod 'PKHUD', '~> 5.2.1'
pod 'GSMessages', '~> 1.7.2'
pod 'RealmSwift', '~> 3.15.0'
pod 'Pages', '~> 2.0.2'
pod 'IQKeyboardManagerSwift', '~> 6.3.0'
pod 'Firebase/Core', '~> 5.20.2'
pod 'Firebase/Messaging', '~> 5.20.2'
pod 'Firebase/Crash', '~> 5.20.02'
pod 'GradientCircularProgress', :git =>
'https://github.com/keygx/GradientCircularProgress'
pod 'Zip', '~> 1.1.0'
pod 'GRDB.swift', '~> 3.7.0'
pod 'Localize-Swift', '~> 2.0.0'
#pod 'Eureka', '~> 5.0.0'
pod 'GooglePlacesRow', '~> 3.2.0'
end
Thanks in Advance ☺️
Environment:
Macbook Pro With Retina Display 2013 late with 8G Ram, 256GB ssd.
Cocoapods 1.1.1
macOS Sierra 10.12.1
Xcode 8.0
iPhone 6s
Installed Pods
inhibit_all_warnings!
use_frameworks!
def import_common_pods
pod 'AFNetworking', '~> 2.6.3'
pod 'GoogleAnalytics', '~> 3'
pod 'SVProgressHUD', '~> 1.1.3'
pod 'CocoaLumberjack', '~> 2.3.0'
pod 'SVWebViewController', '~> 1.0'
pod 'Crashlytics', '~> 3'
end
def import_project_common_pods
pod 'FDFullscreenPopGesture', '1.1'
pod 'ImagePicker', :git => 'git#github.com:hyperoslo/ImagePicker.git'
pod 'Mixpanel', '~> 3.0.4'
pod "YoutubePlayer-in-WKWebView", "~> 0.2.0"
pod 'UICollectionViewLeftAlignedLayout'
pod 'Firebase', '~> 3'
pod 'Firebase/RemoteConfig', '~> 3'
pod 'Firebase/AppIndexing', '~> 3'
pod 'Firebase/Messaging', '~> 3'
pod 'MWPhotoBrowser', '~> 2.1.2'
pod 'AppsFlyerFramework'
pod 'pop', '~> 1.0.9'
pod 'UICountingLabel'
pod 'Ono', '~> 1.2.2'
pod 'DateTools'
pod 'GoogleIDFASupport', '~> 3.14.0'
pod 'M13ProgressSuite', '~> 1.2.8'
pod 'YYText', '~> 1.0'
pod 'mopub-ios-sdk', '~> 4'
pod 'KVOController', '~> 1.1.0'
pod 'Fabric', '~> 1.6'
pod 'JazzHands', '~> 2.0.8'
pod 'DeviceUtil'
pod 'Flurry-iOS-SDK', '~> 7'
pod 'FBSDKCoreKit', '~> 4'
pod 'SDWebImage', '~> 3.8.1'
pod 'TTTAttributedLabel', '~> 2.0.0'
pod 'IQKeyboardManager', '~> 4.0'
pod 'MZFormSheetController'
pod 'Masonry', '~> 1.0.1'
pod 'DZNEmptyDataSet', '~> 1.8.1'
pod 'JSQSystemSoundPlayer', '~> 4'
pod 'HMSegmentedControl', '~> 1.5.2'
pod 'RNCryptor', '~> 3.0.1'
pod 'FBSDKShareKit', '~> 4'
pod 'FBSDKLoginKit', '~> 4'
pod 'SZTextView'
pod 'UIScrollView-InfiniteScroll', '~> 0.7.3'
pod 'FLAnimatedImage', '~> 1.0'
pod 'Socket.IO-Client-Swift', '~> 8.0.2'
end
target 'MyProject' do
import_common_pods
import_project_common_pods
end
There is a run script of Cocoapods called [CP] Copy Pods Resources
Recently I found out this run script is killing my build time,
when building the App to real device,
it spend almost 1~2 minutes to finish the whole run script.
But when building on the simulator, the run script finished in like 10 seconds.
It usually works fine when building to real device,
but I don't know why the time of executing run script increased crazily recently, I could almost have a cup of coffee!
I've found this post on Stackoverflow: IOS Run custom shell script 'embed pods framework' file not found error but it doesn't helps.
And also tried checking the Run Script Only When Installing for the run script.
But the Xcode shows an error message:
App installation failed no code signature
So neither this solution works for me...
Anybody facing the same issue?
Thanks
If you use the new beta of Cocoapods - 1.2.1.beta.1 at the time of writing, which you can install sudo pod install --pre then you have access to the super cool COCOAPODS_PARALLEL_CODE_SIGN option.
This has sped up the Embed Pods Frameworks build stage for me by 75% on device.
Instructions in below image.
I have the same issue since I installed Xcode 8.1 beta and created a new Swift project. Currently I "fixed" the issue by unchecking the "Run script only when installing" the first time (causing a longer build time), for every following build I am able to build and run the app with the checkbox "Run script only when installing" checked. This works until I do a "pod install" or "pod update". I am eagerly waiting for an official update to Xcode 8.1, but perhaps it has something to do with cocoapods itself?
I'm working on a legacy iOS project as a newbie. After I updated the CocoaPods and libraries, I've got these weird errors after building the project which never happen before.
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lPods-Model
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lPods-Model is not an object file (not allowed in a library)
And here is my Podfile:
platform :ios, '7.0'
link_with ['DianaViewModels']
pod 'AVOSCloud', '~> 3.0'
pod 'PixateFreestyle'
target :Model do
link_with ['DianaModels']
pod 'ReactiveCocoa', '~> 2.2'
pod 'TMCache', '~> 1.2'
pod 'SSKeychain', '~> 1.2'
pod 'Mantle', '~> 1.3'
pod 'AFNetworking', '~> 1.0'
end
target :Test do
link_with ['DianaTests']
pod 'Kiwi', '~> 2.2'
end
target :View do
link_with ['Diana']
pod 'SVPullToRefresh', '~> 0.4'
pod 'MBProgressHUD', '~> 0.7'
pod 'SWTableViewCell', '~> 0.1'
pod 'MTMigration'
pod 'Masonry'
pod 'TTTAttributedLabel'
pod 'NJKWebViewProgress'
target :ViewDebug do
link_with [
'DianaDev',
'DianaViews'
]
pod 'Reveal-iOS-SDK'
end
end
By the way, I'm using the CocoaPods plugin in the Xcode. But a lot error are output when I check the Install Docs during integration:
Error opening xar archive: /var/folders/3x/mgl299js6k13tlrspqv21n340000gn/T/Model-ReactiveCocoa.xar
Are there some wrong configurations in my CocoaPods or Build Setting in Xcode6.3? Thanks for your help!
ADDED:
Here's my Link Binary With Libraries in the Build Phases. Does the red item mean something is wrong? It looks like this is the cause.
There are pod files installed in my project.
Now I want to add new pod file for 'PhotoPickerPlus' , but I am getting duplicate symbols errors and warnings as seen in following screenshot ;
I have tried to install pod file by using
pod install
It is successfully installed. I have also inclueded all required frameworks.
My pod file is as follows ;
platform :ios, '6.0'
# ignore all warnings from all pods
inhibit_all_warnings!
pod 'ARGenericTableViewController', '~> 1.0.0'
#pod 'CocoaLumberjack', '~> 1.6'
pod 'TBXML', '~> 1.5'
pod 'GoogleAnalytics-iOS-SDK', '~> 2.0beta4'
#pod 'FlurrySDK', '~> 4.1.0'
pod 'SDWebImage', '~> 3.5.4'
#pod 'PSTCollectionView', '~> 1.2.0'
pod 'BSKeyboardControls', '~> 2.2'
pod 'HockeySDK', '~> 3.5.4'
pod 'MBProgressHUD', '~> 0.8'
pod 'MKMapView+AttributionView', '~> 0.1.0'
pod 'Facebook-iOS-SDK', '~> 3.13.0'
pod 'TTTAttributedLabel', '~> 1.9.0'
pod 'JASidePanels'
#pod 'ARChromeActivity', '~> 1.0.1'
#pod 'TUSafariActivity', '~> 1.0.0'
pod 'REComposeViewController', '~> 2.3.1'
pod 'iRate', '~> 1.9.3'
pod 'PhotoPickerPlus', '~> 2.2'
pod 'UIPhotoGallery', :podspec => 'UIPhotoGallery.podspec'
But I am getting errors after installing this file.
What can be the issue?
Maybe your Other Linker Flags inside the Build Settings inside your project is set wrong. Click on your Project inside Project Navigator. If you select your app on PROJECT your Build Settings should look like this
Inside my project I also deleted everything inside Other Linker Flags but maybe it works for you if you insert this
And of course never forget cleaning after these steps.
In you Project Settings, Check target's "Build Phases"'s "Compile source" section. Make sure there are no duplicate copies.
BTW, These errors are generated by https://github.com/gameclosure/trademob which is not even in your pod file.
So again, verify your project settings. Probably you are trying to add pod file to existing project.