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;
}







-3
















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.










share|improve this question













marked as duplicate by Gereon, Martin R ios
Users with the  ios badge can single-handedly close ios questions as duplicates and reopen them as needed.

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.

























    -3
















    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.










    share|improve this question













    marked as duplicate by Gereon, Martin R ios
    Users with the  ios badge can single-handedly close ios questions as duplicates and reopen them as needed.

    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.





















      -3












      -3








      -3









      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.










      share|improve this question















      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






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 29 '18 at 6:22









      Ruban4AxisRuban4Axis

      348114




      348114




      marked as duplicate by Gereon, Martin R ios
      Users with the  ios badge can single-handedly close ios questions as duplicates and reopen them as needed.

      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 ios
      Users with the  ios badge can single-handedly close ios questions as duplicates and reopen them as needed.

      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.


























          2 Answers
          2






          active

          oldest

          votes


















          2














          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!






          share|improve this answer































            0














            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?






            share|improve this answer
























            • 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


















            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2














            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!






            share|improve this answer




























              2














              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!






              share|improve this answer


























                2












                2








                2







                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!






                share|improve this answer













                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!







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 29 '18 at 6:36









                HSAMHSAM

                378218




                378218

























                    0














                    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?






                    share|improve this answer
























                    • 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
















                    0














                    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?






                    share|improve this answer
























                    • 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














                    0












                    0








                    0







                    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?






                    share|improve this answer













                    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?







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Nov 29 '18 at 6:32









                    MoazzamMoazzam

                    245




                    245













                    • 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

















                    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



                    Popular posts from this blog

                    Lallio

                    Futebolista

                    Jornalista