Pod Written in Obj C to Use in Swift [duplicate]
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
This question already has an answer here:
How to use Objective-C CocoaPods in a Swift Project
3 answers
Is there any possible way to use the pods which is coded in Obj C in Swift language.
ios objective-c swift
marked as duplicate by Gereon, Martin R
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 29 '18 at 6:54
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
How to use Objective-C CocoaPods in a Swift Project
3 answers
Is there any possible way to use the pods which is coded in Obj C in Swift language.
ios objective-c swift
marked as duplicate by Gereon, Martin R
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 29 '18 at 6:54
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
How to use Objective-C CocoaPods in a Swift Project
3 answers
Is there any possible way to use the pods which is coded in Obj C in Swift language.
ios objective-c swift
This question already has an answer here:
How to use Objective-C CocoaPods in a Swift Project
3 answers
Is there any possible way to use the pods which is coded in Obj C in Swift language.
This question already has an answer here:
How to use Objective-C CocoaPods in a Swift Project
3 answers
ios objective-c swift
ios objective-c swift
asked Nov 29 '18 at 6:22
Ruban4AxisRuban4Axis
348114
348114
marked as duplicate by Gereon, Martin R
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 29 '18 at 6:54
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Gereon, Martin R
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 29 '18 at 6:54
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
You can directly use Objective c pod into your swift project
Example:
Step 1. Go to your project directory in your terminal and type pod init. This will create a pod file, edit the pod file by writing pod 'Toast', '~> 4.0.0'.
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'ObjcPOD' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'Toast', '~> 4.0.0'
# Pods for ObjcPOD
end
Step 2. Run the command pod install in the terminal which will install pod into your project and thus generating .xcodeworkspace file. Open that file and then write:
import UIKit
import Toast
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
self.view.makeToast("Toast Here")
}
}
Now you can run the app, done!
add a comment |
Just use use_frameworks! flag in the podfile before giving pod name that you want to install like this:
// Podfile
use_frameworks!
pod 'CoolObjectiveCLib'
for more detailed answer you can check @Vlad Papko answer here :
How to use Objective-C Cocoapods in a Swift Project?
It's no longer required sincecocoapods 1.5.0. Swift can use pods as static libs now.
– user28434
Nov 29 '18 at 9:06
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can directly use Objective c pod into your swift project
Example:
Step 1. Go to your project directory in your terminal and type pod init. This will create a pod file, edit the pod file by writing pod 'Toast', '~> 4.0.0'.
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'ObjcPOD' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'Toast', '~> 4.0.0'
# Pods for ObjcPOD
end
Step 2. Run the command pod install in the terminal which will install pod into your project and thus generating .xcodeworkspace file. Open that file and then write:
import UIKit
import Toast
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
self.view.makeToast("Toast Here")
}
}
Now you can run the app, done!
add a comment |
You can directly use Objective c pod into your swift project
Example:
Step 1. Go to your project directory in your terminal and type pod init. This will create a pod file, edit the pod file by writing pod 'Toast', '~> 4.0.0'.
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'ObjcPOD' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'Toast', '~> 4.0.0'
# Pods for ObjcPOD
end
Step 2. Run the command pod install in the terminal which will install pod into your project and thus generating .xcodeworkspace file. Open that file and then write:
import UIKit
import Toast
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
self.view.makeToast("Toast Here")
}
}
Now you can run the app, done!
add a comment |
You can directly use Objective c pod into your swift project
Example:
Step 1. Go to your project directory in your terminal and type pod init. This will create a pod file, edit the pod file by writing pod 'Toast', '~> 4.0.0'.
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'ObjcPOD' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'Toast', '~> 4.0.0'
# Pods for ObjcPOD
end
Step 2. Run the command pod install in the terminal which will install pod into your project and thus generating .xcodeworkspace file. Open that file and then write:
import UIKit
import Toast
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
self.view.makeToast("Toast Here")
}
}
Now you can run the app, done!
You can directly use Objective c pod into your swift project
Example:
Step 1. Go to your project directory in your terminal and type pod init. This will create a pod file, edit the pod file by writing pod 'Toast', '~> 4.0.0'.
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'ObjcPOD' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'Toast', '~> 4.0.0'
# Pods for ObjcPOD
end
Step 2. Run the command pod install in the terminal which will install pod into your project and thus generating .xcodeworkspace file. Open that file and then write:
import UIKit
import Toast
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
self.view.makeToast("Toast Here")
}
}
Now you can run the app, done!
answered Nov 29 '18 at 6:36
HSAMHSAM
378218
378218
add a comment |
add a comment |
Just use use_frameworks! flag in the podfile before giving pod name that you want to install like this:
// Podfile
use_frameworks!
pod 'CoolObjectiveCLib'
for more detailed answer you can check @Vlad Papko answer here :
How to use Objective-C Cocoapods in a Swift Project?
It's no longer required sincecocoapods 1.5.0. Swift can use pods as static libs now.
– user28434
Nov 29 '18 at 9:06
add a comment |
Just use use_frameworks! flag in the podfile before giving pod name that you want to install like this:
// Podfile
use_frameworks!
pod 'CoolObjectiveCLib'
for more detailed answer you can check @Vlad Papko answer here :
How to use Objective-C Cocoapods in a Swift Project?
It's no longer required sincecocoapods 1.5.0. Swift can use pods as static libs now.
– user28434
Nov 29 '18 at 9:06
add a comment |
Just use use_frameworks! flag in the podfile before giving pod name that you want to install like this:
// Podfile
use_frameworks!
pod 'CoolObjectiveCLib'
for more detailed answer you can check @Vlad Papko answer here :
How to use Objective-C Cocoapods in a Swift Project?
Just use use_frameworks! flag in the podfile before giving pod name that you want to install like this:
// Podfile
use_frameworks!
pod 'CoolObjectiveCLib'
for more detailed answer you can check @Vlad Papko answer here :
How to use Objective-C Cocoapods in a Swift Project?
answered Nov 29 '18 at 6:32
MoazzamMoazzam
245
245
It's no longer required sincecocoapods 1.5.0. Swift can use pods as static libs now.
– user28434
Nov 29 '18 at 9:06
add a comment |
It's no longer required sincecocoapods 1.5.0. Swift can use pods as static libs now.
– user28434
Nov 29 '18 at 9:06
It's no longer required since
cocoapods 1.5.0. Swift can use pods as static libs now.– user28434
Nov 29 '18 at 9:06
It's no longer required since
cocoapods 1.5.0. Swift can use pods as static libs now.– user28434
Nov 29 '18 at 9:06
add a comment |