From 91360f76653adb36042b9e4d97359259d1925242 Mon Sep 17 00:00:00 2001 From: ChristianEdwardPadilla Date: Thu, 2 Sep 2021 10:59:53 -0700 Subject: [PATCH 1/2] Remove unused IPHelper file --- .../macos/Classes/IPHelper.h | 51 ------------------- 1 file changed, 51 deletions(-) delete mode 100644 packages/connectivity_plus/connectivity_plus_macos/macos/Classes/IPHelper.h diff --git a/packages/connectivity_plus/connectivity_plus_macos/macos/Classes/IPHelper.h b/packages/connectivity_plus/connectivity_plus_macos/macos/Classes/IPHelper.h deleted file mode 100644 index 5fef2b9721..0000000000 --- a/packages/connectivity_plus/connectivity_plus_macos/macos/Classes/IPHelper.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#import - -#import "SystemConfiguration/CaptiveNetwork.h" - -#include -#include - -NSString* getWifiIP() { - NSString* address = @"error"; - struct ifaddrs* interfaces = NULL; - struct ifaddrs* temp_addr = NULL; - int success = 0; - - // Retrieve the current interfaces - returns 0 on success. - success = getifaddrs(&interfaces); - if (success == 0) { - // Loop through linked list of interfaces. - temp_addr = interfaces; - while (temp_addr != NULL) { - if (temp_addr->ifa_addr->sa_family == AF_INET) { - // Check if interface is en0 which is the wifi connection on the iPhone. - if ([[NSString stringWithUTF8String:temp_addr->ifa_name] isEqualToString:@"en0"]) { - // Get NSString from C String - address = [NSString - stringWithUTF8String:inet_ntoa(((struct sockaddr_in*)temp_addr->ifa_addr)->sin_addr)]; - } - } - - temp_addr = temp_addr->ifa_next; - } - } - - // Free memory - freeifaddrs(interfaces); - - return address; -} From 5c2fd74b1d38a470cd0de301beb3f2b4f1d7e679 Mon Sep 17 00:00:00 2001 From: ChristianEdwardPadilla Date: Tue, 14 Sep 2021 10:08:23 -0700 Subject: [PATCH 2/2] fix license headers and increment version patch --- .../connectivity_plus_macos/CHANGELOG.md | 4 ++++ .../macos/Classes/ConnectivityPlugin.swift | 16 +++------------- .../macos/Classes/IPHelper.h | 16 +++------------- .../connectivity_plus_macos/pubspec.yaml | 2 +- 4 files changed, 11 insertions(+), 27 deletions(-) diff --git a/packages/connectivity_plus/connectivity_plus_macos/CHANGELOG.md b/packages/connectivity_plus/connectivity_plus_macos/CHANGELOG.md index 4f9609f2c1..2a002663fc 100644 --- a/packages/connectivity_plus/connectivity_plus_macos/CHANGELOG.md +++ b/packages/connectivity_plus/connectivity_plus_macos/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.1.1 + +- Update license headers. + ## 1.1.0 - Add ethernet as connectivity result. diff --git a/packages/connectivity_plus/connectivity_plus_macos/macos/Classes/ConnectivityPlugin.swift b/packages/connectivity_plus/connectivity_plus_macos/macos/Classes/ConnectivityPlugin.swift index 4f63f8de44..6c5e4cb098 100644 --- a/packages/connectivity_plus/connectivity_plus_macos/macos/Classes/ConnectivityPlugin.swift +++ b/packages/connectivity_plus/connectivity_plus_macos/macos/Classes/ConnectivityPlugin.swift @@ -1,16 +1,6 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright 2019 The Chromium Authors. All rights reserved. +// Use of this source is governed by a BSD-style license that can +// be found in the LICENSE file. import Cocoa import FlutterMacOS diff --git a/packages/connectivity_plus/connectivity_plus_macos/macos/Classes/IPHelper.h b/packages/connectivity_plus/connectivity_plus_macos/macos/Classes/IPHelper.h index 5fef2b9721..fe0ed70fe9 100644 --- a/packages/connectivity_plus/connectivity_plus_macos/macos/Classes/IPHelper.h +++ b/packages/connectivity_plus/connectivity_plus_macos/macos/Classes/IPHelper.h @@ -1,16 +1,6 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright 2019 The Chromium Authors. All rights reserved. +// Use of this source is governed by a BSD-style license that can +// be found in the LICENSE file. #import diff --git a/packages/connectivity_plus/connectivity_plus_macos/pubspec.yaml b/packages/connectivity_plus/connectivity_plus_macos/pubspec.yaml index 4971e92574..e2afea4fd6 100644 --- a/packages/connectivity_plus/connectivity_plus_macos/pubspec.yaml +++ b/packages/connectivity_plus/connectivity_plus_macos/pubspec.yaml @@ -1,6 +1,6 @@ name: connectivity_plus_macos description: macOS implementation of the connectivity_plus plugin. -version: 1.1.0 +version: 1.1.1 homepage: https://plus.fluttercommunity.dev/ repository: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/