小编Mic*_*ård的帖子

Xcode 构建问题无法找到自动链接框架

我已经为这个问题苦苦挣扎了好几天了:( 在模拟器中构建我的 iOS 应用程序时,它工作正常(调试构建),但是当我尝试构建到我的 iPhone 11(v 14.5.1)时,我的构建失败并出现以下错误:

ld: warning: Could not find or use auto-linked framework 'GoogleDataTransport'
ld: warning: Could not find or use auto-linked framework 'FirebaseRemoteConfig'
ld: warning: Could not find or use auto-linked framework 'FirebaseCore'
ld: warning: Could not find or use auto-linked framework 'Protobuf'
ld: warning: Could not find or use auto-linked framework 'FirebaseInstallations'
ld: warning: Could not find or use auto-linked framework 'GoogleToolboxForMac'
Undefined symbols for architecture arm64:
Run Code Online (Sandbox Code Playgroud)

我正在使用 Xcode 12.5。我尝试过各种建议,例如:

  • 添加LD_VERIFY_BITCODEUser-Definedin …

xcode build-settings ios swift xcode-build-settings

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

完成ui-view动画时的回调

我在应用程序中使用角度与ui-router一起使用.我希望能够在ui-view的动画完成时执行一些代码.我已经读过$ stateChangeSuccess应该可以实现这一点,但它似乎在每个动画之前触发.目前我正在使用$ timeout,时间等于动画持续时间.我知道这不是一个很好的解决方案.任何人都有一个更好的建议如何解决这个问题?

到目前为止这是我的代码(指令):

app.directive('lazyBackground', ['$timeout', function($timeout) {

    return {
        restrict: 'A',
        link: function(scope, element, attrs) {

            var img = new Image();

            img.onload = function() {

                element.css({
                    'background-image': 'url(' + this.src + ')'
                });

                element.addClass('lazy-loaded');
            }

            $timeout(function() {
                img.src = attrs.lazyBackground;
            },500);

        }
    }

}]);
Run Code Online (Sandbox Code Playgroud)

从代码中可以看出,我正在尝试在新的ui-view动画完成后延迟加载图像.

angularjs angularjs-directive ng-animate angular-ui-router

5
推荐指数
0
解决办法
332
查看次数

将prop传递给样式组件的TypeScript错误

我很难解决这个TypeScript问题.

...message: 'Type '{ show: boolean; children: Element; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Component<ThemedOuterStyledProps<HTMLProps<HTMLDiv...'.
  Property 'show' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Component<ThemedOuterStyledProps<HTMLProps<HTMLDiv...'.'
Run Code Online (Sandbox Code Playgroud)

我正在使用React +样式组件+ TypeScript.如果我有这样的样式组件:

const Component = styled.div`
    opacity: ${props => props.show ? 1 : 0}
`
Run Code Online (Sandbox Code Playgroud)

和我的React组件看起来像这样:

const ReactComponent = (props: { appLoading: boolean }) => (
  <Component show={appLoading} />
)
Run Code Online (Sandbox Code Playgroud)

我对TypeScript很陌生,但我认为我需要在Component上定义show prop?

typescript reactjs styled-components

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

保存对其他集合的引用

如何在Firebase Firestore中保存对其他集合的引用?添加数据文档没有提及有关保存引用的任何内容.

firebase firebase-realtime-database google-cloud-firestore

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

如何在范围var中的textAngular编辑器中去掉占位符img?

我在一个带有Angular的应用程序中使用TextAngular指令.当我插入youTube链接(通过工具栏按钮)时,它会在编辑器中显示占位符图像.我希望将所有html保存在$ scope var中但没有占位符html.目前,如果我输出绑定到编辑器的ng scope var(ng-model),我会得到类似的结果:

"<p><img class="ta-insert-video" ta-insert-video="http://www.youtube.com/embed/cUeMF18zA4Y" src="" allowfullscreen="true" width="300" frameborder="0" height="250"/></p>"
Run Code Online (Sandbox Code Playgroud)

我真正想要的是这个:

"<p><iframe src="http://www.youtube.com/embed/cUeMF18zA4Y" allowfullscreen="true" width="300" frameborder="0" height="250"></iframe></p>"
Run Code Online (Sandbox Code Playgroud)

javascript angularjs

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

Gatsby GraphQL查询多个图像

我正在努力弄清楚如何在Gatsbyjs中使用GraphQL查询多个特定图像.我最初的想法是做这样的事情:

file(relativePath: {eq: "images/front.jpg"}) {
  id
}
file(relativePath: {eq: "images/front2.jpg"}) {
  id
}
Run Code Online (Sandbox Code Playgroud)

这会在GraphQL中引发错误:

{
  "errors": [
    {
      "message": "Fields \"file\" conflict because they have differing arguments. Use different aliases on the fields to fetch both if this was intentional.",
      "locations": [
        {
          "line": 28,
          "column": 1
        },
        {
          "line": 31,
          "column": 1
        }
      ]
    }
  ]
}
Run Code Online (Sandbox Code Playgroud)

查询一个特定文件(图像)工作正常:

file(relativePath: {eq: "images/front.jpg"}) {
  id
}
Run Code Online (Sandbox Code Playgroud)

有什么建议我在这里做错了吗?谢谢 :)

javascript reactjs graphql gatsby

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

触发knockout.js的事件绑定

我刚开始学习Knockout.js而且遇到了一些麻烦,我需要一些帮助才能解决.

基本上我想将我的touchend事件添加到我的Knockout生成列表中.目前我正在做这样的事情:

HTML:

<ul data-bind="foreach: names">
  <li data-bind="text: $data"></li>
</ul>
Run Code Online (Sandbox Code Playgroud)

JS:

var names = ['Tom','Jennifer','Jack','Poul'];

ko.observableArray(names);

ko.applyBindings(names);


$('li').on('touchend, function(){
 ... do something
});
Run Code Online (Sandbox Code Playgroud)

但我认为这不是正确的方法吗?如何使用Knockout对我的'touchend'进行数据绑定(如果这样做的话)?

提前致谢 :)

jquery touch knockout.js

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

Remix.run 不使用 Node.js 作为后端吗?

我对Remix.run非常感兴趣,但有一件事我真的不明白。在该框架的技术解释中写道:

虽然 Remix 在服务器上运行,但它实际上并不是服务器。它只是提供给实际 JavaScript 服务器的处理程序。

它基于 Web Fetch API 而不是 Node.js 构建。这使得 Remix 能够在任何 Node.js 服务器(如 Vercel、Netlify、Architect 等)以及非 Node.js 环境(如 Cloudflare Workers 和 Deno Deploy)中运行。

那么……后端是不是 Node.js 服务器?如果没有..它如何在后端执行JS?我觉得上面的解释有点矛盾。

frameworks node.js reactjs remix.run

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