Martifan 5 Posted August 22, 2020 (edited) Hello, please tell me any ideas, how can you implement authorization using Apple ID? thank you for advance Edited August 22, 2020 by Martifan Share this post Link to post
Chris Pim 34 Posted August 22, 2020 I’ve not tried it yet but there’s an article in Chinese here which takes you through how to do it. https://translate.googleusercontent.com/translate_c?depth=1&nv=1&pto=aue&rurl=translate.google.co.uk&sl=zh-CN&sp=nmt4&tl=en&u=https://blog.csdn.net/delphiteacher/article/details/104344285&usg=ALkJrhizIuLwrZCrBE-qSZ-hlKqRfCeYKQ If you manage to get it working, it would be great if you could share your findings with the group! I think David Nottage was also looking into this but not sure if he got anywhere with it yet. Share this post Link to post
Dave Nottage 557 Posted August 22, 2020 Just now, Chris Pim said: I think David Nottage was also looking into this but not sure if he got anywhere with it yet Yes, I have an implementation for it, and a while ago was seeking people to try it out. I haven't done anything to it for a while, however I have attached the work-in-progress to this reply. The plan is to include the final result into Kastri: https://github.com/DelphiWorlds/Kastri AppleSignin.zip 1 Share this post Link to post
Martifan 5 Posted August 22, 2020 (edited) I press the button and nothing happens i am using delphi 10.3.3 Edited August 22, 2020 by Martifan Share this post Link to post
Dave Nottage 557 Posted August 22, 2020 Did you follow the instructions in the ReadMe.txt file? 1 Share this post Link to post
Martifan 5 Posted August 23, 2020 but you can make it so that the button is not dynamically created, but so that for the previously present form, let Button1 Share this post Link to post
Dave Nottage 557 Posted August 23, 2020 1 hour ago, Martifan said: but you can make it so that the button is not dynamically created That's the plan. I have some other controls coming that will be included. Share this post Link to post
Martifan 5 Posted October 10, 2020 (edited) On 8/23/2020 at 8:03 AM, Dave Nottage said: but you can make it so that the button is not dynamically created Hello, haven't you include other items yet? Edited October 10, 2020 by Martifan Share this post Link to post
Dave Nottage 557 Posted October 10, 2020 19 minutes ago, Martifan said: Hello, haven't you include other items yet? Sorry.. been busy with Memorizor. They're still coming. Were you after an installable component for Apple Signin, or something else? Share this post Link to post
Martifan 5 Posted October 10, 2020 (edited) I want to change the style of the button or use another button with more effects Edited October 10, 2020 by Martifan Share this post Link to post
Martifan 5 Posted October 10, 2020 4 minutes ago, Dave Nottage said: Sorry.. been busy with Memorizor. They're still coming. Were you after an installable component for Apple Signin, or something else? I want to change the style of the button or use another button with more effects Share this post Link to post
Dave Nottage 557 Posted October 10, 2020 59 minutes ago, Martifan said: I want to change the style of the button or use another button with more effects The implementation I have done uses the native control, i.e. ASAuthorizationAppleIDButton, which is fairly limited in the styles available. Please refer to: https://developer.apple.com/documentation/authenticationservices/asauthorizationappleidbutton?language=objc https://developer.apple.com/documentation/authenticationservices/asauthorizationappleidbuttonstyle?language=objc If you have a sign-in button which does not have a style that is mandated by Apple, your app is likely to be rejected. See: https://developer.apple.com/design/human-interface-guidelines/sign-in-with-apple/overview/buttons/#creating-a-custom-sign-in-with-apple-button Examples of rejections: https://community.auth0.com/t/apple-store-rejected-app-because-of-sign-in-with-apple-styles/43854 https://github.com/firebase/FirebaseUI-iOS/issues/823 For these reasons, I'm not going to be implementing styles other than what they provide. Share this post Link to post
Martifan 5 Posted October 10, 2020 (edited) 9 minutes ago, Dave Nottage said: The implementation I have done uses the native control, i.e. ASAuthorizationAppleIDButton, which is fairly limited in the styles available. Please refer to: https://developer.apple.com/documentation/authenticationservices/asauthorizationappleidbutton?language=objc https://developer.apple.com/documentation/authenticationservices/asauthorizationappleidbuttonstyle?language=objc If you have a sign-in button which does not have a style that is mandated by Apple, your app is likely to be rejected. See: https://developer.apple.com/design/human-interface-guidelines/sign-in-with-apple/overview/buttons/#creating-a-custom-sign-in-with-apple-button Examples of rejections: https://community.auth0.com/t/apple-store-rejected-app-because-of-sign-in-with-apple-styles/43854 https://github.com/firebase/FirebaseUI-iOS/issues/823 For these reasons, I'm not going to be implementing styles other than what they provide. Ok, thanks, I just wanted a more round button to do. How do I change the color of buttons and text on a button? what style is on the phone? black and white? Edited October 10, 2020 by Martifan Share this post Link to post
Dave Nottage 557 Posted October 10, 2020 49 minutes ago, Martifan said: Ok, thanks, I just wanted a more round button to do. How do I change the color of buttons and text on a button? what style is on the phone? Ah yes, sorry.. the roundness can be changed. I'll take a look at adding that. These are the style values: ASAuthorizationAppleIDButtonStyleBlack A black button. ASAuthorizationAppleIDButtonStyleWhiteOutline A button with a white outline. ASAuthorizationAppleIDButtonStyleWhite Which are displayed in the link I gave: https://developer.apple.com/design/human-interface-guidelines/sign-in-with-apple/overview/buttons/#creating-a-custom-sign-in-with-apple-button I'll also take a look at adding support for those. Share this post Link to post
Martifan 5 Posted October 10, 2020 2 hours ago, Dave Nottage said: Ah yes, sorry.. the roundness can be changed. I'll take a look at adding that. These are the style values: ASAuthorizationAppleIDButtonStyleBlack A black button. ASAuthorizationAppleIDButtonStyleWhiteOutline A button with a white outline. ASAuthorizationAppleIDButtonStyleWhite Which are displayed in the link I gave: https://developer.apple.com/design/human-interface-guidelines/sign-in-with-apple/overview/buttons/#creating-a-custom-sign-in-with-apple-button I'll also take a look at adding support for those. i did so but still the button is black function TiOSAppleIDButton.GetView: ASAuthorizationAppleIDButton; begin Result := TASAuthorizationAppleIDButton.Wrap(TASAuthorizationAppleIDButton.OCClass.buttonWithType(ASAuthorizationAppleIDButtonTypeSignIn, ASAuthorizationAppleIDButtonStyleWhite)); end; Share this post Link to post
Dave Nottage 557 Posted October 10, 2020 1 hour ago, Martifan said: i did so but still the button is black I'll see if I can debug it, thanks Share this post Link to post
Martifan 5 Posted October 10, 2020 5 minutes ago, Dave Nottage said: I'll see if I can debug it, thanks Thank you very much in advance then I'll wait 🙂 and if you can add round buttons Share this post Link to post
Dave Nottage 557 Posted October 11, 2020 18 hours ago, Martifan said: Thank you very much in advance then I'll wait 🙂 and if you can add round buttons Has not been successful so far. The initWithAuthorizationButtonType method seems to ignore the 2nd parameter being passed to it, as well as the setCornerRadius method. Very odd Share this post Link to post
Martifan 5 Posted October 11, 2020 19 minutes ago, Dave Nottage said: Has not been successful so far. The initWithAuthorizationButtonType method seems to ignore the 2nd parameter being passed to it, as well as the setCornerRadius method. Very odd it could be some kind of bug? Share this post Link to post
Dave Nottage 557 Posted October 11, 2020 6 hours ago, Martifan said: it could be some kind of bug? Yes, it was a "Dave" bug. Updated demo attached - now allows you to set button type, style and corner radius. AppleSignInDemo.zip Share this post Link to post
Martifan 5 Posted October 11, 2020 2 hours ago, Dave Nottage said: Yes, it was a "Dave" bug. Updated demo attached - now allows you to set button type, style and corner radius. AppleSignInDemo.zip Thanks, it works 1 Share this post Link to post