我有一个使用Office 365 SharePoint预览API的客户端应用程序.最近(截至2014年10月),Microsoft发布了该API的1.0版本.预览API使用的身份验证步骤不再适用于1.0版.
为了演示这个问题,我创建了一个简短的node.js脚本.该脚本执行以下操作:
POST以https://login.windows.net/common/oauth2/token获得一个访问令牌GET 到Office 365发现服务以获取SharePoint API端点POST到https://login.windows.net/common/oauth2/token了刷新令牌获取新的访问令牌GET 到SharePoint API端点以获取文件列表该脚本可以与API的预览API和版本1.0一起使用.它能够从预览API获取文件的JSON列表,但是对于版本1.0(在最后一次调用中)以及以下内容失败:
{
"error": {
"code": "-2147024891, System.UnauthorizedAccessException",
"message": "Access denied. You do not have permission to perform this action or access this resource."
}
}
Run Code Online (Sandbox Code Playgroud)
有没有人看到调用顺序有什么问题?
请查看示例脚本以获取更多详细信息.
我正在尝试在 Mac OS X 的 Swift 应用程序中使用外部框架。外部框架也使用 Swift,因此依赖于 Swift 共享库(例如,libswiftCore.dylib)。这是通过命令验证的
$ otool -L PromiseKit.framework/PromiseKit
PromiseKit.framework/PromiseKit:
...
@rpath/libswiftCore.dylib (compatibility version 0.0.0, current version 0.0.0)
Run Code Online (Sandbox Code Playgroud)
抬头@rpath看见
$ otool -l PromiseKit.framework/PromiseKit
...
cmd LC_RPATH
cmdsize 40
path @executable_path/Frameworks (offset 12)
Run Code Online (Sandbox Code Playgroud)
所以在运行时我希望@rpath解决@executable_path/Frameworks
我收到运行时错误
$ otool -l PromiseKit.framework/PromiseKit
...
cmd LC_RPATH
cmdsize 40
path @executable_path/Frameworks (offset 12)
Run Code Online (Sandbox Code Playgroud)
查看包含我构建的可执行文件的文件夹,我没有看到Frameworks文件夹。
我尝试设置EMBEDDED_CONTENT_CONTAINS_SWIFT到YES我的应用程序,但是这仍然不能创建Frameworks文件夹。
我尝试手动创建Frameworks文件夹并在 Swift 共享库中复制(从/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx. …