Not able to install pod file xamarin iOS

ArvindrajaArvindraja INMember ✭✭✭
edited November 2017 in Xamarin.iOS

Showing these errors in terminal
Mac:iOS gsps$ pod install
[!] No `Podfile' found in the project directory.
iMac:iOS gsps$ pod init
[!] No Xcode project found, please specify one
iMac:iOS gsps$

How to solve these
Thank you.

Best Answer

  • TedRogersTedRogers US ✭✭✭✭
    Accepted Answer

    you cannot use a CocoaPod in Xamarin iOS as far as I know without manually getting the library and creating all your own bindings. You should looks for a Nuget package that does what you need.

Answers

  • TedRogersTedRogers USMember ✭✭✭✭
    Accepted Answer

    you cannot use a CocoaPod in Xamarin iOS as far as I know without manually getting the library and creating all your own bindings. You should looks for a Nuget package that does what you need.

  • ArvindrajaArvindraja INMember ✭✭✭

    @TedRogers Thank you.

    The actual issue i am facing is not working push notifications in iOS, when i am executing my project it is getting crash and showing error in log

    "You have enabled the CloudMessaging service in Developer Console, but it appears as though your Podfile is missing the line: 'pod "Google/CloudMessaging" or you may need to run pod update in your project directory."

    Somewhere i found that to run pod commands in terminal to sort out above issue, while doing so i was facing above errors.
    I dont think so nuget can help for cocoa pads.
    Please go through screenshot.
    And suggest me the better way.

  • TedRogersTedRogers USMember ✭✭✭✭

    @Arvindraja I have never used GCM in an iOS app so not sure I can be much help besides telling you that you cannot use a CocoaPod in a Xamarin project.

    What component are you using that requiring GCM?

  • ArvindrajaArvindraja INMember ✭✭✭

    Google.iOS.Core,
    Google.iOS.GoogleCloudMessaging,
    Google.iOS.InstanceID
    These are the components i am using.

    Inside if condition my app crashing. in AppDelegate class.

    if (UIDevice.CurrentDevice.CheckSystemVersion(10, 0))
                {
                    UNUserNotificationCenter.Current.RequestAuthorization(UNAuthorizationOptions.Alert, (approved, err) =>
                    {
                        // Handle approval
                        if (approved == true)
                        {
                            UIApplication.SharedApplication.RegisterForRemoteNotifications();
                        }
                    });
                }
    

    Anyway I figure out this that we can't use cocoa pod's in Xamarin iOS as you said. why because for that we should have xcodeproject file where(location) we trying run pod update or pod init.

    for iOS push notifications need follow some other workaround.
    Thank You @TedRogers you are the Boss :)
    Still you can continue if you better answers regarding GCM.

  • TedRogersTedRogers USMember ✭✭✭✭

    @Arvindraja My suggestion would be to NOT use GCM for iOS. If you must, see here:

    https://components.xamarin.com/view/firebaseioscloudmessaging

    Ted

  • ArvindrajaArvindraja INMember ✭✭✭

    @TedRogers Thank you.

    Yeah even i am now moving to FCM as it is latest version of GCM.

    Many Thanks.

  • ArvindrajaArvindraja INMember ✭✭✭
    edited December 2017

    @TedRogers thank you.
    This forum post you shared also relevant to our tread. And i wonder if someone got solution, everyone had to change their configurations :smiley: Anyhow i have solved this issue integrated FCM push notifications in my iOS.
    FCM working with some small issues :wink:

    Thank you

Sign In or Register to comment.