小编kru*_*ens的帖子

xcode错误:"使用未解析的标识符:GGLContext"(不使用CocoaPods)

我已经完成了几年的Web开发,这是我第一个使用iOS应用程序的项目.我已经按照Google的Get the Google Sign-in SDK for iOS(没有CocoaPods)的所有说明进行操作,我尝试模拟应用程序并收到此错误消息:Use of unresolved identifier 'GGLContext'

这是从Google页面复制并放入AppDelegate.swift的代码:

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
  // Override point for customization after application launch.
  // Initialize Google sign-in
  var configureError: NSError?
  GGLContext.sharedInstance().configureWithError(&configureError)  // THIS LINE HAS THE ERROR
  assert(configureError == nil, "Error configuring Google services: \(configureError)")

  //GIDSignIn.sharedInstance().delegate = self
  GIDSignIn.sharedInstance().clientID = MY_CLIENT_ID

        return true
    }
Run Code Online (Sandbox Code Playgroud)

有帮助吗?

xcode ios swift google-signin

9
推荐指数
1
解决办法
3950
查看次数

Google登录API - 如何使用PHP登录某人?

在Google的" 集成Google登录"页面上,底部的部分向您展示了如何使用Javascript对用户进行签名:

<a href="#" onclick="signOut();">Sign out</a>
<script>
  function signOut() {
    var auth2 = gapi.auth2.getAuthInstance();
    auth2.signOut().then(function () {
      console.log('User signed out.');
    });
  }
</script>
Run Code Online (Sandbox Code Playgroud)

我一直在寻找,我找不到使用PHP这样签署用户的方法.

我确实找到了如何完全退出Google的用户,但我不希望这样.我也知道我可以删除$_SESSION包含访问代码的变量,但这仍然不完全是我想要的.

有谁知道如何使用PHP将某人从我的Google应用程序中删除?

javascript php google-api-php-client google-signin

8
推荐指数
1
解决办法
2431
查看次数

Angular 中的 Google Sheets API

我试图找到如何在 Angular 中使用 Google Sheets API。文档页面上没有对 Angular 的引用。我已经尝试过这个,但它似乎不起作用。

有人可以指导我如何在我的 Angular 应用程序中使用 Google Sheets API 吗?

我目前正在使用 Angular 8

google-sheets-api angular

5
推荐指数
2
解决办法
8234
查看次数

Angular Material 更改应用程序背景和前景主题

这个关于在 Angular Material 中设置背景颜色的问题于 2017 年发布,答案已过时。最新版本的 Angular Material (12.0.4) 似乎对 scss mixin 进行了很大的改变。

在更新到当前版本之前,我能够从之前链接的问题中实现这个答案,如下所示:

// Background palette for light themes.
$mat-light-theme-background: (
  status-bar: map_get($mat-grey, 300),
  app-bar:    map_get($mat-grey, 100),
  background: map_get($mat-grey, 50),
  hover:      rgba(black, 0.04), // TODO(kara): check style with Material Design UX
  card:       white,
  dialog:     white,
  disabled-button: $black-12-opacity,
  raised-button: white,
  focused-button: $black-6-opacity,
  selected-button: map_get($mat-grey, 300),
  selected-disabled-button: map_get($mat-grey, 400),
  disabled-button-toggle: map_get($mat-grey, 200),
);

// Background palette for dark themes.
$mat-dark-theme-background: (
  status-bar: black,
  app-bar:    map_get($mat-grey, 900),
  background: #303030,
  hover: …
Run Code Online (Sandbox Code Playgroud)

themes sass angular-material

4
推荐指数
1
解决办法
2929
查看次数

php在文件路径之前包含".."

我最近正在观看一个php视频教程,作者正在展示如何包含一个文件.他正在使用XAMPP进行演示并拥有许多文件.

当他展示如何包含文件时,他提到了在文件路径(/xampp/content/example.html)前放置两个点(..)的原因,因为有些内容与文件的位置有关,假设我已经了解这个原则.但我没有.

任何人都可以解释在文件路径前面有一个点或两个点的情况吗?

是什么区别include("/xampp/content/example.html");,include("./xampp/content/example.html");include("../xampp/content/example.html");

php include-path

3
推荐指数
1
解决办法
1236
查看次数

php用密钥加密和解密数字字符串

关于这个主题已经提出和回答了很多问题,但没有一个答案对我有帮助。

我正在寻找一个 php 函数来加密一个像这样的小整数:

123456与只有一个加密的字符串A-Za-z0-9

所以输出看起来像a1b2c3d4.

我将能够使用一个密钥stringkey来将其转换回123456


有什么帮助吗?

php encryption

2
推荐指数
1
解决办法
6234
查看次数

firebase消息传递api php订阅主题411错误

我正在尝试将通知实施到我的Web应用程序中。我有这个php文件,我在其中发送通知:

<?php
  function sendGCM($title,$message, $id) {
    $url = 'https://fcm.googleapis.com/fcm/send';

    $fields = array (
        'registration_ids' => array (
                $id
        ),
        "notification" => array(
            "title" => $title,
            "body" => $message,
            "click_action" => "https://google.com"
        )
    );
    $fields = json_encode ( $fields );

    $headers = array (
        'Authorization: key=' . $MY_KEY,
        'Content-Type: application/json'
    );

    $ch = curl_init ();
    curl_setopt ( $ch, CURLOPT_URL, $url );
    curl_setopt ( $ch, CURLOPT_POST, true );
    curl_setopt ( $ch, CURLOPT_HTTPHEADER, $headers );
    curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, true );
    curl_setopt ( …
Run Code Online (Sandbox Code Playgroud)

php firebase http-status-code-411 firebase-cloud-messaging

1
推荐指数
1
解决办法
1835
查看次数