sign in with apple in Apple Watch - watchkit

I want to sign in with apple in my Apple Watch .after I write those codes below ,start to run the code.It show me a view with label showed that AUTH ALERT SIGN_IN NOT COMPLETED
ASAuthorizationAppleIDProvider *provider = [ASAuthorizationAppleIDProvider new];
ASAuthorizationAppleIDRequest *request = [provider createRequest];
request.requestedScopes = #[ASAuthorizationScopeFullName,ASAuthorizationScopeEmail];
ASAuthorizationController *controller = [[ASAuthorizationController alloc]initWithAuthorizationRequests:#[request]];
controller.delegate = self;
[controller performRequests];

Add the Capability "Sign in With Apple" under Signing and Capabilities in your Watch Extension target.

Go to your WatchApp Extension Project Settings. There you can add the project capability.
Also you must go to developer.apple.com to create and download a .p8 file. Make sure to save this somewhere as you cannot download it again.

Related

Toggle audio in speaker to ear-speaker and ear-speaker to speaker

We are using third party Audio/Video SDK in our Xamarin.Forms.Android project. Now problem is that by default audio comes in speaker mode, instead of ear-speaker. I was tried to search solution in internet and found below code to set audio in ear-speaker and speaker. After implement below code audio off in speaker but not able to listen via ear-speaker, if I set SpeakerphoneOn=true then I can listen via Speakerphone but if I set SpeakerphoneOn=false then I can't list via ear-speaker.
Additional point, Mode value is always comes "InCommunication" even after change to InCall or any other mode.
I have set below permission too in my Xamarin project.
Permission:
var audioManager = (Android.Media.AudioManager)Android.App.Application.Context.GetSystemService(Android.Content.Context.AudioService);
audioManager.SpeakerphoneOn = !audioManager.SpeakerphoneOn;
Check when mode is ear-speaker , the volume value whether is 0 .The volume of their two modes is controlled separately.
var audioManager = (Android.Media.AudioManager)Android.App.Application.Context.GetSystemService(Android.Content.Context.AudioService);
audioManager.Mode = Mode.InCommunication;
audioManager.SpeakerphoneOn = false;
audioManager.SetStreamVolume(Stream.Music, audioManager.GetStreamMaxVolume(Stream.Music), VolumeNotificationFlags.ShowUi);

Is it possible to transfer sqlite file to watch os 2

Can any one help me out on this problem. I am struggling to transfer the sqlite to watch os 2. If you have any example share with me or please give your suggestion on this
Have not tried this for sqlLite files but works with audioFiles.
What I did is:
Turn ON App Group both on watch extension and main project.
Place file in App Group Container
// I create the file there so my code is
NSURL * urlOut = [[NSFileManager defaultManager] containerURLForSecurityApplicationGroupIdentifier: APP_CONECTIVITY_ID];
urlOut = [urlOut URLByAppendingPathComponent:#"myfile.wav"];
Send via WCSession sendMessage the link, need to send as string so you will send urlOut.absoluteString.
Profit?
You should be able to use stuff like sendMessageData //reading the file as date beforhand.
and there is also this WCSessionFileTransfer.
But I haven't had a chance to try that yet.

How to reset password in meteor application

I am building a Meteor application and am using the oaf:accounts-entry package to handle my user registration & authentication. I am working on the reset password function right now. However, when I click on "email reset password link", the application doesn't email me anything. Can someone help me or point me to instructions on how to configure the reset password function for the oaf:accounts-entry package? After doing a google search, I could not find instructions on how to configure it. The relevant packages I have installed are:
oaf:accounts-entry
accounts-password
email
Thank you!!
The password reset functionality should be working as it's provided by the package.
Have you properly configured your emails smtp settings and tested that your application is dispatching emails properly?
https://gentlenode.com/journal/meteor-3-smtp-configuration/5
NOTE: Using Meteor JS 1.6.1.1, package required are accounts-ui, accounts-password
To make forgot password link visible in the signup/sign in a widget, you need to do add little configuration in a file at location ROOT_FOLDER/client/main.js. The code is as below,
Accounts.ui.config({
passwordSignupFields: "USERNAME_AND_EMAIL"
});
If you do not choose passwordSignupFields: "USERNAME_AND_EMAIL" and choose something like passwordSignupFields: "USERNAME_ONLY", you won't be able to see forgot password option in the signup widget. (No one will tell you this, I discovered this weird scenario myself. Still, I wonder why MDG team did this? )
At Server end you also need to add little code at location PROJECT/server/main.js just outside Meteor.startup(()=>{}); to provide an email template for reset password link. Below is the code you need to adjust some properties yourself.
var username = 'you_id#gmail.com';
var password = 'your password';
var server = 'smtp.gmail.com';
var port = '465';
process.env.MAIL_URL = 'smtps://' +
encodeURIComponent(username) + ':' +
encodeURIComponent(password) + '#' +
encodeURIComponent(server) + ':' + port;
process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0;
Accounts.emailTemplates.from = 'support_team#yourappname.com';
Accounts.emailTemplates.siteName = 'APP NAME';
Accounts.emailTemplates.resetPassword = {
subject(user) {
return "Reset Password Link.";
},
text(user, url) {
return `Hello!
Click the link below to reset your password.
${url}
If you didn't request this email, please ignore it.
Thanks,
APP Team.
`
},
html(user, url) {
// This is where HTML email content would go.
// See the section about html emails below.
}
};
STEP 1:
See if you are able to view forgot password on the signup widget as below.
STEP 2:
When you click "forgot password", you should be able to view below popup at same widget location as below.
on valid Email entry, you must see a success full notification and most importantly you must receive a mail for reset password link as below.
Step 3:
When you click on the link, you can see a new window with a popup as below (NOTE: You must click the link before given token expiry time).
Voila!!! just add a new password and you automatically login to given page. Everything is already provided to us as discussed above by Meteor. You just need to configure the stuff and get it running.

How to make updater for GameMaker Game

I am using GameMaker. The game I am working on will need to be updated later on. How would I create an updater so people don't have to download the updated version. I would like it so the person playing it can push a button and the game update.
I have done it.
I created a file on a server, basically it can be every server. In this file I said:
[Version]
Version = 1010
So the newest version is 1.0.1.0. There is a function GM_version to check the current version of the game, but ot would return 1.0.0.1, I don't know why they done this.
So, in order to fix this, this is my create event:
//Re-order version and delete points
Version3 = string_replace(GM_version,'.','')
Point1 = string_pos('.',version3)
Version2 = string_delete(version3,point1,1)
Point2 = string_pos('.',version2)
Version1 = string_delete(version2,point2,1)
String1 = string_copy(version1,point1,point2 - point1)
Version0 = string_delete(version1,point1,point2 - point1)
Version_local = version0 + string1
//Delete old file and get serverfile
Version_online = 0
Got = 0
file_delete("your file")
File = http_get_file("your serverfile","your file")
In the Asynchronous HTTP Event is this code:
if ds_map_find_value(async_load,"id") == file {
if ds_map_find_value(async_load,"status") == 0 {
ini_open("your file")
Version_online = ini_read_string("version","version",version_local)
ini_close()
Got = 1
}
}
Last, in the step event:
if got == 1 {
if version_online > version_local {
//your code when there's an update, e.g. open your homepage.
}
Got = 0
}
Hope that helped!
Short answer: you can't do that in pure GM, and the easiest solution is to do it in another language and just launch it with GM.
You can't update a part of the game as it will be compiled to a single executable. Users will have to download the whole .exe of your game. Your best bet is to create another standalone program (with GM or another software/language). You can always launch that updater program through a button click in your game. You might find open-source code to make your own updater in C, C++ or C#.
If I were you, I would just make a small button "check for update" in the game and it would lead to a PHP website with the current version in the address (e.g. www.mygamesite/update?v=1.2345). Then you make the website compare the version passed in the URL to show either "your game is up to date" or "download the latest version" with a changelist.

How to get the desired format for a Windows phone 8 push notification sent from asp.net

I followed this tutorial:
https://msdn.microsoft.com/en-us/library/windows/apps/hh202967(v=vs.105).aspx
It works, but the toast that appears on the phone screen contains all of this:
Received Toast 4:05 PM:
wp:Text1: Please
wp:Text2: Help!
wp.Param: /Page2.xaml?
NavigatedFrom=Toast Notification
I would like for the toast to only contain text1 and text2. In this instance I only want "Please Help!" to appear. I've looked at everything on MSDN and everywhere else on google and there is nothing on it.
You should see what you want if the demo app isn't running when the toast arrives: an alert with "Please Help!" will show at the top of the screen.
If the app is running then the app's ShellToastNotificationReceived event fires instead of the toast appearing on the phone. This lets the app decide what to show. The demo code parses the received data and explicitly adds each key and value to a string and shows it in a MessageBox. This is purely for demonstration. A real app would never do that.
Typically a real app would find the interesting information and display it in-line rather than in a MessageBox, but the details will depend on the app.
If you want to display the contents of wp:Text1 and wp:Text2 in a TextBlock you can create the string something like:
StringBuilder message = new StringBuilder();
message.AppendFormat("{0} {1}",e.Collection["wp:Text1"],e.Collection["wp:Text2"]);
MyTextBlock.Text = message;
In production you'd probably want to verify that wp:Text1 and wp:Text2 existed, etc.

Resources