Skip to content

Commit

Permalink
swift file fix
Browse files Browse the repository at this point in the history
  • Loading branch information
miniyarov committed Sep 21, 2019
1 parent cea3898 commit 39ae8ad
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
14 changes: 7 additions & 7 deletions ios/Keychain.swift
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import Foundation
import Security

class Keychain {
@objc class Keychain : NSObject {
func persistentRef(key: String) -> NSData? {
let query: [NSObject: AnyObject] = [
kSecClass: kSecClassGenericPassword,
kSecAttrGeneric: key as AnyObject,
kSecAttrAccount: key as AnyObject,
kSecAttrAccessible: kSecAttrAccessibleAlways,
kSecMatchLimit: kSecMatchLimitOne,
kSecAttrService: Bundle.mainBundle().bundleIdentifier!,
kSecAttrService: Bundle.main.bundleIdentifier! as AnyObject,
kSecReturnPersistentRef: kCFBooleanTrue
]

Expand All @@ -25,12 +25,12 @@ class Keychain {
func set(key: String, value: String) {

let query: [NSObject: AnyObject] = [
kSecValueData: value.dataUsingEncoding(NSUTF8StringEncoding)! as AnyObject,
kSecValueData: value.data(using: String.Encoding.utf8)! as AnyObject,
kSecClass: kSecClassGenericPassword,
kSecAttrGeneric: key,
kSecAttrAccount: key,
kSecAttrGeneric: key as AnyObject,
kSecAttrAccount: key as AnyObject,
kSecAttrAccessible: kSecAttrAccessibleAlways,
kSecAttrService: Bundle.mainBundle().bundleIdentifier!
kSecAttrService: Bundle.main.bundleIdentifier! as AnyObject
]

clear(key: key)
Expand All @@ -44,4 +44,4 @@ class Keychain {
]
SecItemDelete(query as CFDictionary)
}
}
}
5 changes: 4 additions & 1 deletion ios/RNNetworkExtension.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 58B511D21A9E6C8500147676;
Expand Down Expand Up @@ -122,6 +123,7 @@
58B511ED1A9E6C8500147676 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
Expand Down Expand Up @@ -166,6 +168,7 @@
58B511EE1A9E6C8500147676 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
Expand Down Expand Up @@ -204,7 +207,7 @@
isa = XCBuildConfiguration;
buildSettings = {
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(SRCROOT)/../../../React/**",
"$(SRCROOT)/../../react-native/React/**",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-network-extension",
"version": "0.1.16",
"version": "0.1.17",
"description": "React Native Network Extension",
"repository": "https://github.com/miniyarov/react-native-network-extension",
"main": "index.js",
Expand Down

0 comments on commit 39ae8ad

Please sign in to comment.