Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swift migration: merge changes from main #665

Merged
merged 22 commits into from
Jul 21, 2021
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
21b59b3
Create CODE_OF_CONDUCT.md (#589)
taquitos Jun 25, 2021
21a570a
Update issue templates (#537)
taquitos Jun 25, 2021
1c5ed24
Update README.md (#636)
CoreyRab Jul 9, 2021
125da78
ETags support (#509)
vegaro Jul 9, 2021
956da62
identity v3: public-facing changes (#453)
aboedo Jul 13, 2021
df3d21b
Integration tests: Identity v3 test cases (#506)
aboedo Jul 13, 2021
3e0d200
Bump addressable in /IntegrationTests/CocoapodsIntegration (#647)
dependabot[bot] Jul 13, 2021
9581bcc
remove unused typedef to fix build warning (#649)
aboedo Jul 14, 2021
0b890a7
Release: 3.12.0 (#648)
aboedo Jul 15, 2021
81345fb
Preparing for next version (#656)
revenuecat-ops Jul 15, 2021
5e70f74
added swiftlint installation to all places that were missing it (#657)
aboedo Jul 15, 2021
9271a91
Release: 3.12.1 (#659)
aboedo Jul 19, 2021
321fe97
Preparing for next version (#661)
revenuecat-ops Jul 19, 2021
fec8ca4
Fix: Calling `setDebugLogsEnabled(false)` enables debug logs when it …
aboedo Jul 19, 2021
e0a917e
Merge branch 'main' into swift_migration_main_merge
aboedo Jul 19, 2021
088ab3c
reverted changes in SystemInfo initialization
aboedo Jul 19, 2021
4eda249
format fixes
aboedo Jul 19, 2021
0f28d18
removed rchttpRequest
aboedo Jul 19, 2021
51f56c4
updated call in `buildTvWatchAndMacOS`: install-gems -> install-depen…
aboedo Jul 19, 2021
c7141be
undo accidental whitespace
aboedo Jul 19, 2021
6c2662f
Merge branch 'swift_migration' into swift_migration_main_merge
aboedo Jul 21, 2021
338a9de
deleted empty RCSystemInfo.m file
aboedo Jul 21, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 23 additions & 22 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ release-tags: &release-tags

version: 2.1
commands:
install-gems:
install-dependencies:
parameters:
directory:
type: string
Expand All @@ -40,6 +40,10 @@ commands:
key: v1-gem-cache-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle
- run:
name: Install swiftlint
command: brew install swiftlint

scan-and-archive:
parameters:
directory:
Expand All @@ -65,12 +69,12 @@ commands:
command: |
bundle exec fastlane archive

install-gems-scan-and-archive:
install-dependencies-scan-and-archive:
parameters:
directory:
type: string
steps:
- install-gems:
- install-dependencies:
directory: << parameters.directory >>
- scan-and-archive:
directory: << parameters.directory >>
Expand All @@ -87,16 +91,15 @@ commands:

update-spm-integration-commit:
steps:
- install-gems
- install-dependencies
- run:
name: Update git commit in SPM package
working_directory: IntegrationTests/SPMIntegration/
name: Update git commit in targets that use SPM for dependencies
command: |
bundle exec fastlane update_swift_package_commit

update-carthage-integration-commit:
steps:
- install-gems
- install-dependencies
- run:
name: Update git commit in Carthage Integration tests
working_directory: IntegrationTests/CarthageIntegration/
Expand All @@ -112,7 +115,7 @@ jobs:
steps:
- checkout

- install-gems
- install-dependencies

- run:
name: Run tests
Expand All @@ -134,7 +137,7 @@ jobs:
- run:
name: Install swiftlint
command: brew install swiftlint
- install-gems
- install-dependencies
- run:
name: Build AppleTV, WatchOS, and macOS
command: bundle exec fastlane build_tv_watch_mac
Expand All @@ -158,15 +161,15 @@ jobs:
- checkout
- run:
name: Open simulator
command: xcrun instruments -w "iPhone 11 Pro (14.2) [" || true
command: xcrun instruments -w "iPhone 11 Pro (14.5) [" || true

- install-gems
- install-dependencies

- run:
name: Run StoreKit Tests
command: bundle exec fastlane storekit_tests
environment:
SCAN_DEVICE: iPhone 11 Pro (14.2)
SCAN_DEVICE: iPhone 11 Pro (14.5)
- store_test_results:
path: fastlane/test_output
- store_artifacts:
Expand Down Expand Up @@ -213,7 +216,7 @@ jobs:
shell: /bin/bash --login -o pipefail
steps:
- checkout
- install-gems
- install-dependencies
- run:
name: Build docs
command: bundle exec fastlane run jazzy
Expand Down Expand Up @@ -247,7 +250,7 @@ jobs:
shell: /bin/bash --login -o pipefail
steps:
- checkout
- install-gems
- install-dependencies
- trust-github-key
- run:
name: Prepare next version
Expand All @@ -261,8 +264,8 @@ jobs:
steps:
- checkout

- install-gems
- install-gems:
- install-dependencies
- install-dependencies:
directory: IntegrationTests/CocoapodsIntegration

- run:
Expand All @@ -283,7 +286,7 @@ jobs:
- checkout
- trust-github-key
- update-spm-integration-commit
- install-gems-scan-and-archive:
- install-dependencies-scan-and-archive:
directory: IntegrationTests/SPMIntegration/

integration-tests-carthage:
Expand Down Expand Up @@ -313,7 +316,7 @@ jobs:
paths:
- Carthage

- install-gems-scan-and-archive:
- install-dependencies-scan-and-archive:
directory: IntegrationTests/CarthageIntegration/

integration-tests-xcode-direct-integration:
Expand All @@ -324,7 +327,7 @@ jobs:
steps:
- checkout

- install-gems-scan-and-archive:
- install-dependencies-scan-and-archive:
directory: IntegrationTests/XcodeDirectIntegration/

lint:
Expand All @@ -334,9 +337,7 @@ jobs:
shell: /bin/bash --login -o pipefail
steps:
- checkout
- run:
name: Install swiftlint
command: brew install swiftlint
- install-dependencies
- run:
name: Run fastlane swiftlint lane
command: fastlane run swiftlint raise_if_swiftlint_error:true strict:true
Expand Down
5 changes: 3 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
name: Bug report
about: Filling a bug report
title: ""
title: ''
labels: bug
assignees: ""
assignees: ''

---

- [ ] I have updated Purchases SDK to the latest version
Expand Down
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/custom.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: Swift Migration Task
about: For use when creating issues for any work relating to our Swift migration.
title: ''
labels: swift migration
assignees: ''

---

Please add screenshots, links to code, any relevant information, and then add any relevant tag, e.g.:
"Test backfill" for when more tests are needed, or "you can do this" for things that don't need any extra context and are good issues for new folks to help out with.
3 changes: 0 additions & 3 deletions .github/ISSUE_TEMPLATE/migration_task.md

This file was deleted.

4 changes: 2 additions & 2 deletions .jazzy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ objc: true
sdk: iphonesimulator
module: Purchases
umbrella_header: Purchases/Public/Purchases.h
module_version: 3.12.0-SNAPSHOT
module_version: 3.13.0-SNAPSHOT
github_url: https://github.com/revenuecat/purchases-ios
github_file_prefix: https://github.com/revenuecat/purchases-ios/tree/3.12.0-SNAPSHOT
github_file_prefix: https://github.com/revenuecat/purchases-ios/tree/3.13.0-SNAPSHOT
output: docs
# Leaving this commented out. We used to specify this before, but now it's working without it
# xcodebuild_arguments: [--objc,Purchases/Public/Purchases.h,--,-x,objective-c,-isysroot,$(xcrun --show-sdk-path),-I,$(pwd)]
3 changes: 2 additions & 1 deletion .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ excluded:
- StoreKitTests
- PublicSDKAPITester
- vendor
- scan_derived_data
disabled_rules:
- trailing_comma
- todo
Expand All @@ -22,4 +23,4 @@ opt_in_rules:
identifier_name:
max_length:
warning: 60
error: 80
error: 80
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.12.0-SNAPSHOT
3.13.0-SNAPSHOT
6 changes: 2 additions & 4 deletions CHANGELOG.latest.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
- Updates log message for `createAlias` to improve clarity
https://github.com/RevenueCat/purchases-ios/pull/498
- Adds `rc_` to all Foundation extensions to prevent name collisions
https://github.com/RevenueCat/purchases-ios/pull/500
- Fixed an issue in some versions of Xcode where compiling would fail with `Definition conflicts with previous value` in `ETagManager.swift`
https://github.com/revenuecat/purchases-ios/pull/659
64 changes: 64 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,67 @@
## 3.12.1
- Fixed an issue in some versions of Xcode where compiling would fail with `Definition conflicts with previous value` in `ETagManager.swift`
https://github.com/revenuecat/purchases-ios/pull/659

## 3.12.0

### Identity V3:

#### New methods
- Introduces `logIn`, a new way of identifying users, which also returns whether a new user has been registered in the system.
`logIn` uses a new backend endpoint.
- Introduces `logOut`, a replacement for `reset`.

#### Deprecations
- deprecates `createAlias` in favor of `logIn`
- deprecates `identify` in favor of `logIn`
- deprecates `reset` in favor of `logOut`
- deprecates `allowSharingAppStoreAccount` in favor of dashboard-side configuration

https://github.com/RevenueCat/purchases-ios/pull/453
https://github.com/RevenueCat/purchases-ios/pull/438
https://github.com/RevenueCat/purchases-ios/pull/506


### Other changes:

#### Public additions
##### SharedPurchases nullability
- Fixed `sharedPurchases` nullability
- Introduced new property, `isConfigured`, that can be used to check whether the SDK has been configured and `sharedPurchases` won't be `nil`.
https://github.com/RevenueCat/purchases-ios/pull/508

##### Improved log handling
- Added new property `logLevel`, which provides more granular settings for the log level. Valid values are `debug`, `info`, `warn` and `error`.
- Added new method, `setLogHandler`, which allows developers to use their own code to handle logging, and integrate their existing systems.
https://github.com/RevenueCat/purchases-ios/pull/481
https://github.com/RevenueCat/purchases-ios/pull/515


#### Deprecations
- Deprecated `debugLogsEnabled` property in favor of `LogLevel`. Use `Purchases.logLevel = .debug` as a replacement.

#### Other

- Fixed CI issues with creating pull requests
https://github.com/RevenueCat/purchases-ios/pull/504
- Improved Github Issues bot behavior
https://github.com/RevenueCat/purchases-ios/pull/507
- Added e-tags to reduce network traffic usage
https://github.com/RevenueCat/purchases-ios/pull/509
- Fixed a warning in Xcode 13 with an outdated path in Package.swift
https://github.com/RevenueCat/purchases-ios/pull/522
- Switched to Swift Package Manager for handling dependencies for test targets.
https://github.com/RevenueCat/purchases-ios/pull/527
- Removed all `fatalError`s from the codebase
https://github.com/RevenueCat/purchases-ios/pull/529
https://github.com/RevenueCat/purchases-ios/pull/527
- Updated link for error message when UserDefaults are deleted outside the SDK
https://github.com/RevenueCat/purchases-ios/pull/531
- Improved many of the templates and added `CODE_OF_CONDUCT.md` to make contributing easier
https://github.com/RevenueCat/purchases-ios/pull/534
https://github.com/RevenueCat/purchases-ios/pull/537
https://github.com/RevenueCat/purchases-ios/pull/589

## 3.11.1
- Updates log message for `createAlias` to improve clarity
https://github.com/RevenueCat/purchases-ios/pull/498
Expand Down
Loading