I want RealmSwift to be deployed with CocoaPods

Asked 2 months ago, Updated 2 months ago, 5 views

environment for xcode 7.2, realm-swift-0.96-2.3.

At the terminal, enter sudogem install cocoapods to install pod setupSuccessfully installed cocoapods -0.39.0.

Then you enter pod setup, Setting up CocoaPods master repo, Setup completedxcode.

So I typed $pod install and it printed command not found, so I typed $pod install again.

[!] No `Podfile' found in the project directory.

printed.The result was the same when I moved to the directory where the folder for the Xcode project was located.

How do I make RealmSwift available for Swift projects?

realm cocoapods

2022-09-30 11:53

1 Answers

I think it will be about how to deploy libraries with common CocoaPods.

Read GET STARTED on Official site and the site that explains CocoaPods

Before you can deploy a library for Swift's projects, you must first create a Swift project.Then create a Podfile in the directory with the xcodeproj.

For RealmSwift, see How to deploy the formula.For example, the text file looks like the following:

platform:ios, '8.0'
use_frameworks!

target 'target name' do
  pod 'RealmSwift'
end

You can create a text editor or anything.

The target name will be displayed in TARGETS when you view project information in Xcode.

The use_frameworks! specification is required when deploying a library for Swift and generates and links a Dynamic Framework instead of a traditional Static Link Library.You can use the library in import without a bridging header (but will no longer work with iOS 7 or earlier).

The rest is a directory with Podfile and

 pod install

Open the workspace from the .xcworkspace file that will be created after running and waiting for a while.


2022-09-30 11:53

If you have any answers or tips


© 2022 OneMinuteCode. All rights reserved.