How to Use XCode Directly on Xamarin iOS Project?

Apple wants me to use XCode directly on a Xamarin cross-platform iOS project to build, deploy and debug it. Using VS I can build, deploy and debug the project, but if I load the project directly on the build MAC using XCode and try to run the project I am encountering a number of errors, the first being the Info.plist not being present and then the Entitlements.plist. I copied them over to the designated folder on the MAC and got past those errors to encounter more. I am surprised not to have the two plist files already present on the MAC.

Is there any documentation on how to accomplish what I have been asked to do?

Best Answer

  • alaskanroguealaskanrogue US ✭✭✭
    Accepted Answer

    Taking a totally different path of using notification details from my Azure Notification Hub, I was able to determine the problem's cause.

Answers

  • JamesMontemagnoJamesMontemagno USForum Administrator, Xamarin Team, Developer Group Leader Xamurai

    You do not need to open your project in Xcode at all, you just need to upload your .ipa via the bundle uploader: https://docs.microsoft.com/en-us/xamarin/ios/deploy-test/app-distribution/app-store-distribution/publishing-to-the-app-store?tabs=macos

  • alaskanroguealaskanrogue USMember ✭✭✭
    edited April 19

    Apple is attempting to help debug push notifications, not publish. Their instructions are:

    To test background push notifications, follow these steps.

    1. Attach your device to your Mac.
    2. Start your app from Xcode.
    3. When it has launched, stop your app from within Xcode by clicking the Stop button (square icon at upper left).
    4. In Xcode, do Debug -> Attach to Process -> [Fill in Process Name to wait for] -> Attach
    5. Send the push notification with content-available:1 and your app will receive the notification every time.

    This will disable the throttle, and your app will receive all notifications. Only after confirming that everything works as intended you will want to test the throttling issues.

    I don't see that as an option to perform in the link.

  • ColeXColeX Member, Xamarin Team Xamurai

    Could you attach the link of the instructions ?

  • alaskanroguealaskanrogue USMember ✭✭✭
    edited April 24

    There was no link. It was direct email from a support engineer. He said > My suggestion is to test your push notifications handling code first, by running it attached to Xcode:

    To test background push notifications, follow these steps.

    1. Attach your device to your Mac.
    2. Start your app from Xcode.
    3. When it has launched, stop your app from within Xcode by clicking the Stop button (square icon at upper left).
    4. In Xcode, do Debug -> Attach to Process -> [Fill in Process Name to wait for] -> Attach
    5. Send the push notification with content-available:1 and your app will receive the notification every time.

    This will disable the throttle, and your app will receive all notifications. Only after confirming that everything works as intended you will want to test the throttling issues.

    What I am not sure of is how VS uses XCode, i.e. as a build engine directly or indirectly where it actually has code to step through after attaching to the process. If the former, I don't see that it would be possible with just binary available.

  • alaskanroguealaskanrogue USMember ✭✭✭
    Accepted Answer

    Taking a totally different path of using notification details from my Azure Notification Hub, I was able to determine the problem's cause.

Sign In or Register to comment.