mirror of
https://github.com/yggdrasil-network/yggdrasil-ios.git
synced 2025-04-27 21:55:10 +03:00
Various tweaks
This commit is contained in:
parent
0245b6db5e
commit
9ce78d5007
9 changed files with 471 additions and 18 deletions
|
@ -15,5 +15,5 @@ extension Notification.Name {
|
|||
static let YggdrasilSelfUpdated = Notification.Name("YggdrasilSelfUpdated")
|
||||
static let YggdrasilPeersUpdated = Notification.Name("YggdrasilPeersUpdated")
|
||||
static let YggdrasilSettingsUpdated = Notification.Name("YggdrasilSettingsUpdated")
|
||||
static let YggdrasilDHTUpdated = Notification.Name("YggdrasilPeersUpdated")
|
||||
static let YggdrasilDHTUpdated = Notification.Name("YggdrasilDHTUpdated")
|
||||
}
|
||||
|
|
20
Yggdrasil Network iOS/Extensions/Data.swift
Normal file
20
Yggdrasil Network iOS/Extensions/Data.swift
Normal file
|
@ -0,0 +1,20 @@
|
|||
//
|
||||
// Data.swift
|
||||
// YggdrasilNetworkExtension
|
||||
//
|
||||
// Created by Neil on 15/11/2022.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Data {
|
||||
/// This computed value is only needed because of [this](https://github.com/golang/go/issues/33745) issue in the
|
||||
/// golang/go repository. It is a workaround until the problem is solved upstream.
|
||||
///
|
||||
/// The data object is converted into an array of bytes and than returned wrapped in an `NSMutableData` object. In
|
||||
/// thas way Gomobile takes it as it is without copying. The Swift side remains responsible for garbage collection.
|
||||
var mutable: Data {
|
||||
var array = [UInt8](self)
|
||||
return NSMutableData(bytes: &array, length: self.count) as Data
|
||||
}
|
||||
}
|
|
@ -38,17 +38,16 @@
|
|||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
</array>
|
||||
<key>UTExportedTypeDeclarations</key>
|
||||
<array>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue