10

I'm quite New to ios and cocoapods. I am using realm.io swift version. Everything is latest version including xcode, realm and cocoapods

I did it with dynamic linking and realised itunes don't accept the strips framework.sh ...so I try using cocoapods. I didn't remove the dynamic linking and followed the steps using cocoapods to install realm.

It generated the workspace file for me and the running keeps telling realm object can't be found though I have import realm.

So I decided to remove the previous dynamic linking and install cocoapods to start all over again.

Now cocoapods don't generate workspace for me.even a new project that I created.

I tried all the comments to remove pod, cocoapod and even clone the cocoapods etc but nothing works

Please help. Why it don't generate workspace for me anymore

I followed these steps but still don't work https://teamtreehouse.com/forum/pod-install-error-in-terminal-not-creating-xcode-workspace

MGY
  • 7,245
  • 5
  • 41
  • 74
Steven Yong
  • 101
  • 1
  • 1
  • 3
  • Can you post terminal output after `pod install` ? – Jakub Vano May 25 '15 at 10:30
  • hi Jakub, the pod install in the project directory is as following. I'm really puzzled as to why it's not generating. MacBook-Pro:projectworld steven$ pod install Analyzing dependencies Downloading dependencies Installing Realm (0.92.3) Installing RealmSwift (0.92.3) [!] Pods written in Swift can only be integrated as frameworks; this feature is still in beta. Add `use_frameworks!` to your Podfile or target to opt into using it. MacBook-Pro:projectworld steven$ – Steven Yong May 25 '15 at 15:08
  • the pod file is as following: target 'projectworld' do use_frameworks! end target 'projectworldTests' do pod 'RealmSwift' end – Steven Yong May 25 '15 at 15:12
  • you can refer to realm swift on cocoa pods as following http://realm.io/docs/swift/latest/ – Steven Yong May 25 '15 at 15:13
  • 1
    As per the documentation, you need to add use_frameworks! in your Tests target as well. See if that works. :) – TiM May 25 '15 at 17:49
  • I thought I read it use framework is my target App then the use realm is in test. I'll try it out. :) – Steven Yong May 25 '15 at 23:40
  • Hi Jakub, you were right. It works flawlessly now. – Steven Yong May 26 '15 at 12:07
  • Work for me: http://stackoverflow.com/a/30800447/1442541 – evya Nov 23 '16 at 10:42
  • Try this, http://stackoverflow.com/questions/36481926/using-cocoapods-in-xcode-7-3/41584950#41584950 – Vineet Jan 11 '17 at 07:53

8 Answers8

5

Just copying from the comments: the answer was to specify use_frameworks! to the test target.

segiddins
  • 4,110
  • 1
  • 17
  • 22
4

I was getting an Abort:6 error during the Generating Pods project step of pod install.

I deleted the Pods folder, reinstalled Cocoapods, ran pod install again, and it worked.

Reinstall cocoapods:

sudo gem uninstall cocoapods
sudo gem install cocoapods
Neil Cuthbert
  • 306
  • 2
  • 7
4

I used all of the given solution and get success.

First got to Product->Scheme->ManageScheme and then check the shared box(Selected Form)
now pod install
if problem still arise
Try this

pod setup
pod install

if still have problem.(this worked for me)

rm -rf ~/.cocoapods 
pod setup
pod install

if problem still there then last but not least

rm -rf ~/.cocoapods 
git clone https://github.com/CocoaPods/Specs.git ~/.cocoapods/repos/master
pod install
Mario Zigliotto
  • 8,315
  • 7
  • 52
  • 71
Sultan Ali
  • 2,497
  • 28
  • 25
3

If you've done all the above steps and if it's still not working, try

pod install --repo-update

I tried all the above steps, and still it was generating pod folders with blank dependency names. This step should download all the required dependencies for your project and will also create the .xcworkspace

qualiky
  • 66
  • 3
1

To generate a workspace you must have the installer line in your Podfile saying:

integrate_targets => true

like this:

install! 'cocoapods', :integrate_targets => true

If you are using frameworks you do not need the workspace generated.

Darryl E. Clarke
  • 7,537
  • 3
  • 26
  • 34
0

Try adding

use_frameworks!

between the platform line and the target line, then redo pod install from your terminal.

0

I did

rm -rf ~/.cocoapods/repos/trunk/

After that it worked again.

  • 1
    While that command may solve the question, [including an explanation](https://meta.stackexchange.com/q/114762) of how and why this solves the problem would really help to improve the quality of your post, and probably result in more up-votes. Remember that you are answering the question for readers in the future, not just the person asking now. Please [edit] your answer to add explanations and give an indication of what limitations and assumptions apply. – Brian61354270 Apr 12 '20 at 17:39
0

This worked for me:

rm Podfile
rm -r Pods
pod setup
pod init 
pod install //running it with 0 dependencies
pod install //running it with dependencies added

I could do this since I only had 2 dependencies. Be careful if you have other dependencies.