Skip to content

Commit

Permalink
Migrate to swiftpm
Browse files Browse the repository at this point in the history
  • Loading branch information
jiegec committed Dec 20, 2024
1 parent b8d7d56 commit 0f40cc4
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 23 deletions.
2 changes: 1 addition & 1 deletion example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_nfc_kit: 965c98c3fa68f5609f1cc89abb968fe1b8ffdbaa
flutter_nfc_kit: 7a9a03f5ddd92ad95c470aa4b120cd123f4d4be7

PODFILE CHECKSUM: c4c93c5f6502fe2754f48404d3594bf779584011

Expand Down
Empty file removed ios/Assets/.gitkeep
Empty file.
4 changes: 0 additions & 4 deletions ios/Classes/FlutterNfcKitPlugin.h

This file was deleted.

15 changes: 0 additions & 15 deletions ios/Classes/FlutterNfcKitPlugin.m

This file was deleted.

2 changes: 1 addition & 1 deletion ios/flutter_nfc_kit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Pod::Spec.new do |s|
s.license = { :file => '../LICENSE' }
s.author = { 'nfc.im' => '[email protected]' }
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.source_files = 'flutter_nfc_kit/Sources/flutter_nfc_kit/**/*.swift'
s.dependency 'Flutter'
s.weak_frameworks = ['CoreNFC']
s.platform = :ios, '13.0'
Expand Down
1 change: 1 addition & 0 deletions ios/flutter_nfc_kit/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.swiftpm/
22 changes: 22 additions & 0 deletions ios/flutter_nfc_kit/Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "flutter_nfc_kit",
platforms: [
.iOS("13.0"),
],
products: [
.library(name: "flutter-nfc-kit", targets: ["flutter_nfc_kit"])
],
dependencies: [],
targets: [
.target(
name: "flutter_nfc_kit",
dependencies: [],
resources: []
)
]
)
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ func dataWithHexString(hex: String) -> Data {
return data
}

public class SwiftFlutterNfcKitPlugin: NSObject, FlutterPlugin, NFCTagReaderSessionDelegate {
public class FlutterNfcKitPlugin: NSObject, FlutterPlugin, NFCTagReaderSessionDelegate {
var session: NFCTagReaderSession?
var result: FlutterResult?
var tag: NFCTag?
var multipleTagMessage: String?

public static func register(with registrar: FlutterPluginRegistrar) {
let channel = FlutterMethodChannel(name: "flutter_nfc_kit", binaryMessenger: registrar.messenger())
let instance = SwiftFlutterNfcKitPlugin()
let instance = FlutterNfcKitPlugin()
registrar.addMethodCallDelegate(instance, channel: channel)
}

Expand Down

0 comments on commit 0f40cc4

Please sign in to comment.