CocoaPods and the Kingdom of Swift

Using Xcode-6.3.1, iOS-8.3 and MacOS-10.10.3, I am trying to use RealmSwift (0.92.3) and CocoaPods 0.37.1

I am using the following procedure:

  • install cocoapods (in terminal):

     $ sudo gem install cocoapods
    
  • Create a new Xcode project (named MyApp)

  • Create Subfile

    platform :ios, '8.3'
    use_frameworks!
    
    target 'MyApp' do
      pod 'RealmSwift', '>= 0.92.3'
    end
    
    target 'MyAppTests' do
      pod 'RealmSwift', '>= 0.92.3'
    end
    
  • Place the subfile in the MyApp folder (next to MyApp.xcodeproj)

  • Download the newest kingdom (0.92.3 from here ) (i.e. Swift version)

    • unzip it
    • go to the / ios folder
    • copy RealmSwift.framework to the MyApp-project folder

(after points 4 and 5 you end up, as in the picture here)

enter image description here

  1. Inside the terminal, go to the MyApp folder and enter

        pod install
    
  2. After installing pod-install, I get the following text inside the terminal:

enter image description here

  1. After that, I just open a new application MyApp.xcworkspace

- : NO FRAMEWORK SEEMS !! (. )...

????

!

enter image description here

+2
1

- , "" . CocoaPods, , Xcode . , , ...

THREFORE (pt 1-8) !

, " MyApp WatchKit". :

xcodeproj 'MyApp.xcodeproj'
workspace 'MyApp.xcworkspace'
platform :ios, '8.3'

source 'https://github.com/artsy/Specs.git'
source 'https://github.com/CocoaPods/Specs.git'

use_frameworks!
link_with 'MyApp', 'MyApp WatchKit Extension'

def shared_pods
      pod 'RealmSwift', '>= 0.92.3'
end

target 'MyApp' do
    shared_pods
end

target 'MyAppTests' do
    shared_pods
end

target 'MyApp WatchKit Extension' do
    shared_pods
end

, , - " RealmSwift" Realm-Object, :

enter image description here

, Realm (, "MyApp" "MyApp WatchKit Extension" ), , RealmObject.swift( . ):

enter image description here

+6

All Articles