Sign in with Apple button

Anyone interested in Sign-in with Apple button for their apps?

This is a missing feature of MBS and I got it working using Declares.

If there is interest, I will cleanup the code and share the project.

15 Likes

Hi Jeremie,

Thanks for posting this! I was just looking for that functionality and I would love to see the declares or code if you have the time.

Thanks!

-Mike

1 Like

Hi Jeremie
I would really love to see the code.

Thanks!
Tim

1 Like

Sorry for not replying earlier to this thread.

Unfortunately it still doesn’t work as expected.
The button is displayed correctly but clicking on it always returns a Code 1000 error.

It would be easier if this was available in the MBS plugins (for Mac and iOS).

Anyway, the project is here.
If someone gets it working please share the steps to make it work. I just spent 5 hours trying…

Xojo Sign In with Apple.zip (124.3 KB)

Sounds like I have something to do on the weekend :slight_smile:

3 Likes

I’ll be interested if you see something that I don’t. I am unable to get this to work in an app for testing even with Apple’s code examples.

Looks like not only Microsoft and AutoCAD do not test their code examples. Maybe ChatGPT will be better ?

I started there. According to ChatGPT, there are several restrictions on testing

  1. Real devices only
  2. Entitlement Required
    A. Sign in with Apple
    B. App ID with the entitlement added
  3. The user must be signed into iCloud
  4. Network access is enabled
  5. The Apple ID cannot be a child ID or a managed ID
  6. Apple uses sandbox servers and delivers short expiration keys

I’ve done all these things but I still don’t get callbacks on the methods I should.

I got the buttons to show up.
With entitlement on macOS and provision profile, I got the dialog to show up:

Doesn’t complete yet as it gets denied server side.
Maybe I have to do something more on the Apple developer website to register my test app?

we get the callback for the error.
Anyone interested can try this with next pre-release of MBS Plugins.

I suspect you’re running into the same issue that we are, but dammed if I can figure out what that is.

Everyone using this may need to make a matching Xcode project for a dummy app.
There put in the same app name and bundle identifier. Then add entitlements you need and build the app, so Xcode makes your a mobile profile.

That profile can be installed by double click into system preferences:

It’s all a big mess and we try to reproduce what Xcode does automatically.

If anyone likes to play with it, here is the new plugin:

Now we need to figure out how to do all that on iOS since that’s what this thread was about.

That’s interesting. From what i found from Apple, they said you couldn’t be part of an organization or be a managed device to work. This looks like it indicates that it must be to work… interesting.

But it also doesn’t explain why Apple’s sample iOS app didn’t work either.

I just tried Christian’s iOS project and get the same results as the project Greg and I worked on.

Which is the same error we get in the Sign in with Apple demo project. :pensive_face:

@Christian_Schmitz
Thank you for trying to make this work.

Just found a typo in a method name of your plugin.

If Not ASAuthorizationController.HasEntiltement("...")

The method name should be HasEntitlement instead of HasEntiltement :slight_smile:

HasEntiltement? That method name is a real Pisa work?

(all apologies in advance for this terrible joke I needed to get out of my noggin.)

Anthony

Thanks for the typo notice. I just made that function to verify the entitlement is set.

I wonder if the app needs to be registered on apple’s developer portal.

That’s an interesting idea

which unfortunately didn’t work.

Anyone tried this setting:

The lower one “authentication”, maybe needed to turn on?