目前我正在开发一个旧项目,其中有一个客户端ID和客户端密钥.现在我想使用另一个开发者帐户更新具有新客户端ID和客户端密钥的那些.我跟着每一步
https://developers.google.com/+/mobile/ios/getting-started
但我只能看到客户端ID.客户的秘密在哪里?
有许多类似标题的问题,但没有一个问题对我有帮助.
但我可以将这个'NSGenericException'的解决方案联系起来,原因:Collection <__ NSArrayM:0x7fabb400>在 我的问题被枚举问题时发生了变异.因为在我添加时会发生这种终止,所以用数组删除字符串对象.
错误:
因未捕获的异常'NSGenericException'而终止应用程序,原因:'***Collection <__ NSArrayM:0x7fa1f2711910>在枚举时发生了变异.
第一次抛出调用堆栈:
(
0 CoreFoundation 0x00000001087b8c65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000108422bb7 objc_exception_throw + 45
2 CoreFoundation 0x00000001087b85c4 __NSFastEnumerationMutationHandler + 132
3 0x0000000107e24cf5 -[ProfessionalRegSecond tableView:didDeselectRowAtIndexPath:] + 773
4 UIKit 0x0000000109759d71 -[UITableView _deselectRowAtIndexPath:animated:notifyDelegate:] + 347
5 UIKit 0x000000010974deea -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 187
6 UIKit 0x000000010968062c _applyBlockToCFArrayCopiedToStack + 314
7 UIKit 0x00000001096804a6 _afterCACommitHandler + 533
8 CoreFoundation 0x00000001086ebca7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
9 CoreFoundation 0x00000001086ebc00 __CFRunLoopDoObservers + …
Run Code Online (Sandbox Code Playgroud) 我只是第一次连接到VPN服务器时出现"Error Domain = NEVPNErrorDomain Code = 1 \"(null)\"",以后它可以正常工作.
我在尝试启动类似于我的问题的TunnelProvider网络扩展时检查了NEVPNErrorDomain错误1,并按照其在此解决方案中说的方式但仍然得到相同的错误.
所以这是我使用网络扩展连接到VPN服务器的代码.
func initVPNTunnelProviderManager(){
self.vpnManager.loadFromPreferences { (error) -> Void in
if((error) != nil) {
print("VPN Preferences error: 1")
}
else {
let p = NEVPNProtocolIKEv2()
p.username = "******"
p.remoteIdentifier = "*****"
p.serverAddress = "******"
let keychain = KeychainSwift()
let data = keychain.getData("vpnPassword")
p.passwordReference = data
p.authenticationMethod = NEVPNIKEAuthenticationMethod.none
p.useExtendedAuthentication = true
p.disconnectOnSleep = false
self.vpnManager.protocolConfiguration = p
self.vpnManager.isEnabled = true
self.vpnManager.saveToPreferences(completionHandler: { (error) -> Void in …
Run Code Online (Sandbox Code Playgroud) ios ×3
objective-c ×2
google-plus ×1
nevpnmanager ×1
oauth-2.0 ×1
tunnel ×1
uitableview ×1
vpn ×1