Skip to content

Commit

Permalink
make public
Browse files Browse the repository at this point in the history
  • Loading branch information
jvk75 committed Oct 9, 2017
1 parent a89e2a9 commit ca6e7ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions NFCNDEFParse/NDEFMessageWithWellKnownTypes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@

import Foundation
import CoreNFC
import UIKit

/// Currently supported types
/// - text
/// - uri
/// - smart poster
/// - smart poster (coming soon)
enum NFCForumWellKnownType: String {
case text = "T"
case uri = "U"
Expand All @@ -31,13 +30,13 @@ enum NFCForumWellKnownType: String {
/// Class that contains records of NFC Forum Well Known Types
/// - records : [NFCForumWellKnownTypeProtocol]
/// - collection of the NFCForumWellKnownTypes
class NDEFMessageWithWellKnownTypes {
public class NDEFMessageWithWellKnownTypes {

/// - records : [NFCForumWellKnownTypeProtocol]
/// - collection of the NFCForumWellKnownTypes
var records: [NFCForumWellKnownTypeProtocol] = []

init?(records: [NFCNDEFPayload]) {
public init?(records: [NFCNDEFPayload]) {
self.records = records.flatMap({ record in
let type = NFCForumWellKnownType(data: record.type)
switch type {
Expand All @@ -50,5 +49,4 @@ class NDEFMessageWithWellKnownTypes {
}
})
}

}
2 changes: 1 addition & 1 deletion NFCNDEFParse/NFCForumWellKnownTypeSmartPoster.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ class NFCForumWellKnownTypeSmartPoster: NFCForumWellKnownTypeProtocol {
var records: [NFCForumWellKnownTypeProtocol] = []

init?(payload: Data) {

//TBA
}
}

0 comments on commit ca6e7ce

Please sign in to comment.