Ben Smiley
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # iOS integration **(A)** Cuando el usuario esta authenticado, hay que llamar esto ```ObjC [BChatSDK.auth authenticate].thenOnMain(^id(id success) { // Chat SDK esta listo return Nil; }, ^id(NSError * error) { return Nil; }); ``` **(B)** Comenzar una conversacion: ```ObjC id<PUser> otherUser = [BChatSDK.core userForEntityID:@"userEntityID"]; [BChatSDK.core createThreadWithUsers:@[otherUser] threadCreated:^(NSError * error, id<PThread> thread) { if (!error) { UIViewController * vc = [BChatSDK.ui chatViewControllerWithThread:thread]; [self.navigationController pushViewController:vc animated:YES]; } }]; ``` Los Pasos: 1. Conectar el Proyecto con Firebase [Info](https://github.com/chat-sdk/chat-sdk-ios/#firebase-setup) 2. Configurar Chat SDK en el App Delegate [Info](https://github.com/chat-sdk/chat-sdk-ios/#adding-the-chat-sdk-to-your-project) 3. Authenticar el usuario con Firebase 4. Llamar el codigo arriba (A) 5. Cuando el proceso ha cumplido, llamar el codigo (B) 6. Tendrias que tener 2 usuarios porque el `userEntityID` tiene que existir en Firebase --- Lo primero que hago es esto: estos datos fueron probado en tu demo chat y funcionan. ``` - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { //chat sdk // Create a network adapter to communicate with Firebase // The network adapter handles network traffic BConfiguration * config = [BConfiguration configuration]; config.rootPath = @"/v1"; config.allowUsersToCreatePublicChats = NO; config.showEmptyChats = NO; config.googleMapsApiKey = @"AIzaSyBUMCx0vctiADu6WbgSpkEDrEf9Ov4naxA"; config.clearDataWhenRootPathChanges = YES; config.loginUsernamePlaceholder = @"Email"; config.allowUsersToCreatePublicChats = YES; config.disablePresence = YES; config.disableProfileUpdateOnAuthentication = NO; config.developmentModeEnabled = YES; config.disablePublicThreads = NO; ``` Luego agrego los siguientes metodos: el metodo sourceApplication depecrated, y el didReceiveRemoteNotification comento el que vos decis que hay que registrar y lo agrego al metodo que esta en el juego. ``` - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation { return [BChatSDK application:application openURL:url sourceApplication:sourceApplication annotation:annotation]; } -(BOOL) application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options { return [BChatSDK application: app openURL: url options: options]; } -(void) application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { [BChatSDK application:application didRegisterForRemoteNotificationsWithDeviceToken:deviceToken]; } /*-(void) application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { [BChatSDK application:application didReceiveRemoteNotification:userInfo]; } */ - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler { _fetchCompletionHandler = completionHandler; //sdkchat [BChatSDK application:application didReceiveRemoteNotification:userInfo]; [self startBackgroundProcessing]; } ``` En tu ejemplo vos lo primero que haces es: ``` UIViewController * rootViewController = BChatSDK.ui.splashScreenNavigationController; [self.window setRootViewController:rootViewController]; ``` Lo primero que tengo yo es: ``` _windowInitialized = NO; if (!EgoIsRunningInDebugger()) { EgoStartLogRedirection(); } godot::StartInstabug("f59d39bdf61e15c7caf71c65b3c681b4", godot::InstabugApi::InvocationEventShake); [FIRApp configure]; NSArray<NSString *> *commandLineParams = [self _additionalCommandlineParameters]; _godotRuntime = [[GodotRuntime <GLViewDelegate> alloc] initWithAdditionalCommandlineParameters:commandLineParams]; _godotRuntime.delegate = self; [_godotRuntime preinitializeEngine]; EgoRegisterGodotClasses(); _godotViewController = [[GodotViewController alloc] init]; _godotRuntime.activeViewController = _godotViewController; UIStoryboard *splashScreenStoryboard = [UIStoryboard storyboardWithName:@"LaunchScreen" bundle:nil]; _splashViewController = [splashScreenStoryboard instantiateInitialViewController]; [_mainViewController addOverlay:_splashViewController]; if ([UIApplication sharedApplication].applicationState == UIApplicationStateBackground) { // This will start background processing when the app starts in background [self startBackgroundProcessing]; return YES; } // App is in foreground EgoApplication::get_singleton()->enter_foreground(); return [self initializeWindow]; } - (BOOL)initializeWindow { if (_windowInitialized) { return NO; } _windowInitialized = YES; [self _initializeSplashScreenCallback]; _mainViewController = [EgoMainViewController new]; _mainViewController.view.frame = [[UIScreen mainScreen] bounds]; [_mainViewController addOverlay:_godotViewController]; _window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; _window.rootViewController = _mainViewController; [_window makeKeyAndVisible]; [_godotRuntime start]; return YES; ``` Aqui es donde yo debiera hacer el overlay, para ellos pensaba crearme otra viewcontroller, y con botones desde el juego y chat cambiar el rootViewController Una vez aunteticado en ego-app, lo que tengo que hacer es registrar esos datos en firebase, para ello puedo usar: ``` BAccountDetails * accountDetails = [BAccountDetails username: @"some.email@domain.com" password:@"some password"]; [BChatSDK.auth authenticate: accountDetails].thenOnMain(...); ``` Actualmente para crear una cuenta en ego-app no se usa el email, si no el telefono. Luego para quedar logeado en el chat puedo usar ``` [BChatSDK.auth authenticate].thenOnMain(^id(id success) { ... return Nil; }, Nil); ``` Es cierto esto?

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully