Skip to content

Commit e8305f3

Browse files
authored
chore: release core 1.1.13 and plugin_idfa 1.0.3 (SPM fixes) (#219)
* fix(idfa): migrate iOS to the SPM layout Flutter 3.44+ expects Same restructure as core in #213: Package.swift moves to ios/segment_analytics_plugin_idfa/ with sources under Sources/segment_analytics_plugin_idfa/, depending on FlutterFramework. Podspec and pigeon output paths follow. * test: check segmentVersion matches pubspec version * chore: prepare release core 1.1.13 and plugin_idfa 1.0.3
1 parent 0f3e21e commit e8305f3

13 files changed

Lines changed: 66 additions & 33 deletions

File tree

‎packages/core/CHANGELOG.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 1.1.13
2+
3+
- Fixed Swift Package Manager support for iOS and macOS: the package now uses the layout Flutter 3.44+ expects (#213)
4+
- Allow `flutter_fgbg` 0.8.x, which adds Swift Package Manager support, on Dart 3.8+ (#218)
5+
- Android: changed the plugin namespace to `com.segment.analytics.flutter` so it no longer collides with analytics-kotlin under AGP 9 (#215)
6+
- Web: the anonymousId read from analytics.js localStorage no longer includes surrounding quotes. Affected users' anonymousId will now match analytics.js (#197)
7+
- Fixed `context.library.version` and the User-Agent reporting 1.1.11 in 1.1.12
8+
19
## 1.1.12
210

311
- Added Swift Package Manager support for iOS and macOS

‎packages/core/lib/version.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
const segmentVersion = "1.1.11";
1+
const segmentVersion = "1.1.13";

‎packages/core/pubspec.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: segment_analytics
22
description: The hassle-free way to add Segment analytics to your Flutter app.
3-
version: 1.1.12
3+
version: 1.1.13
44
homepage: https://github.com/segmentio/analytics_flutter#readme
55
repository: https://github.com/segmentio/analytics_flutter/tree/main/packages/core#readme
66
issue_tracker: https://github.com/segmentio/analytics_flutter/issues
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import 'dart:io';
2+
3+
import 'package:flutter_test/flutter_test.dart';
4+
import 'package:segment_analytics/version.dart';
5+
6+
void main() {
7+
// segmentVersion is sent as context.library.version and in the User-Agent,
8+
// and is bumped by hand alongside pubspec.yaml at release time.
9+
test('segmentVersion matches the pubspec version', () {
10+
final pubspec = File('pubspec.yaml').readAsStringSync();
11+
final match = RegExp(r'^version:\s*(\S+)', multiLine: true).firstMatch(pubspec);
12+
expect(match, isNotNull);
13+
expect(segmentVersion, match!.group(1));
14+
});
15+
}

‎packages/plugins/plugin_idfa/CHANGELOG.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.0.3
2+
3+
- Fixed Swift Package Manager support for iOS: the package now uses the layout Flutter 3.44+ expects
4+
15
## 1.0.2
26

37
- Added Swift Package Manager support for iOS
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
mkdir -p ios/Classes
1+
mkdir -p ios/segment_analytics_plugin_idfa/Sources/segment_analytics_plugin_idfa
22

33
flutter pub run pigeon \
44
--input pigeon/idfa.dart \
55
--dart_out lib/native_idfa.dart \
6-
--experimental_swift_out ios/Classes/Idfa.swift
6+
--experimental_swift_out ios/segment_analytics_plugin_idfa/Sources/segment_analytics_plugin_idfa/Idfa.swift

‎packages/plugins/plugin_idfa/ios/.gitignore‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,7 @@ Icon?
3535

3636
/Flutter/Generated.xcconfig
3737
/Flutter/ephemeral/
38-
/Flutter/flutter_export_environment.sh
38+
/Flutter/flutter_export_environment.sh
39+
40+
.build/
41+
.swiftpm/

‎packages/plugins/plugin_idfa/ios/Package.swift‎

Lines changed: 0 additions & 26 deletions
This file was deleted.

‎packages/plugins/plugin_idfa/ios/segment_analytics_plugin_idfa.podspec‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The hassle-free way to add Segment analytics to your Flutter app.
1313
s.license = { :file => '../LICENSE' }
1414
s.author = { 'Segment' => 'support@segment.com' }
1515
s.source = { :path => '.' }
16-
s.source_files = 'Classes/**/*'
16+
s.source_files = 'segment_analytics_plugin_idfa/Sources/segment_analytics_plugin_idfa/**/*.swift'
1717
s.dependency 'Flutter'
1818
s.platform = :ios, '9.0'
1919

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// swift-tools-version: 5.9
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
4+
import PackageDescription
5+
6+
let package = Package(
7+
name: "segment_analytics_plugin_idfa",
8+
platforms: [
9+
.iOS("13.0"),
10+
],
11+
products: [
12+
.library(name: "segment-analytics-plugin-idfa", targets: ["segment_analytics_plugin_idfa"]),
13+
],
14+
dependencies: [
15+
.package(name: "FlutterFramework", path: "../FlutterFramework"),
16+
],
17+
targets: [
18+
.target(
19+
name: "segment_analytics_plugin_idfa",
20+
dependencies: [
21+
.product(name: "FlutterFramework", package: "FlutterFramework"),
22+
],
23+
linkerSettings: [
24+
.linkedFramework("AdSupport"),
25+
.linkedFramework("AppTrackingTransparency"),
26+
]
27+
),
28+
]
29+
)

0 commit comments

Comments
 (0)