Skip to content

Conversation

@robertherber
Copy link
Member

@robertherber robertherber commented Jan 2, 2025

Summary by CodeRabbit

  • New Features

    • Added optional parameter to requestAuthorization to specify authorization context for individual or child
    • Enhanced module to support more granular authorization requests
  • Dependencies

    • Updated package version to 0.0.35
    • Updated dependencies for @bacons/xcode and @kingstinct/expo-apple-targets
  • Refactor

    • Updated import paths for configuration types across multiple configuration files
    • Improved type definitions for authorization methods

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 2, 2025

Walkthrough

The pull request introduces modifications to multiple files across a React Native device activity module. The primary changes involve updating import paths for configuration types, renaming variables, and enhancing the requestAuthorization functionality. The changes span configuration files, Swift implementation, TypeScript type definitions, and package metadata, focusing on improving type imports and adding more granular authorization request capabilities.

Changes

File Change Summary
app.plugin.js Updated import path and variable name for target plugin configuration
example/targets/*/expo-target.config.js Updated type import paths for configuration across multiple target configurations
ios/ReactNativeDeviceActivityModule.swift Added optional forIndividualOrChild parameter to requestAuthorization function
ios/Shared.swift Added new serializeFamilyActivitySelection utility function
package.json Updated package and dependency versions
src/ReactNativeDeviceActivity.types.ts Modified requestAuthorization method signature
src/index.ts Updated requestAuthorization function with new parameter

Sequence Diagram

sequenceDiagram
    participant App
    participant DeviceActivityModule
    participant AuthorizationService
    
    App->>DeviceActivityModule: requestAuthorization("individual")
    DeviceActivityModule->>AuthorizationService: Request Authorization
    AuthorizationService-->>DeviceActivityModule: Authorization Result
    DeviceActivityModule-->>App: Return Authorization Status
Loading

Poem

🐰 A Rabbit's Code Review Delight 🚀

Import paths shift, types take flight,
Authorization now with context bright,
Swift and TypeScript dance so light,
Modules evolve with coding might,
A bunny's update, pure and tight! 🌟


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f44b7b9 and 9abba13.

📒 Files selected for processing (1)
  • package.json (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • package.json

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 2, 2025

Open in Stackblitz

npm i https://pkg.pr.new/kingstinct/react-native-device-activity@28

commit: 9abba13

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (22)
ios/ScreenTimeActivityPicker.swift (2)

40-43: Consider adding explicit error handling for the authorization request.
Currently, errors may be silently ignored due to try?. Providing explicit catch or fallback behavior would enhance resilience.


54-59: Maintain consistent authorization flow in earlier iOS versions.
Although you are conditionally requesting authorization on iOS 16.0 and later, consider logging or handling the case when the API is unavailable on lower versions, to provide clarity on why authorization isn’t fully requested.

ios/ReactNativeDeviceActivityView.swift (1)

73-73: Remove trailing comma in the literal if adhering to strict style rules.
Although trailing commas in array/dictionary literals are a matter of style, SwiftLint warns about them. If your team enforces this rule, remove the trailing comma:

-      "webDomainCount": selection.webDomainTokens.count,
+      "webDomainCount": selection.webDomainTokens.count
🧰 Tools
🪛 SwiftLint (0.57.0)

[Warning] 73-73: Collection literals should not have trailing commas

(trailing_comma)

targets/ShieldAction/ShieldActionExtension.swift (1)

62-63: Adjust brace positioning for SwiftLint compliance.
SwiftLint suggests aligning braces on the same line. If desired by your team’s style conventions, apply the fix:

-    ] as? [String: Any]
-{
+    ] as? [String: Any] {
🧰 Tools
🪛 SwiftLint (0.57.0)

[Warning] 63-63: Opening braces should be preceded by a single space and on the same line as the declaration

(opening_brace)

ios/ReactNativeDeviceActivityModule.swift (2)

69-70: Inline opening brace to align with the function declaration style.
To comply with the SwiftLint rule, place the brace after the function declaration on the same line:

-func convertToSwiftDateComponents(from dateComponentsFromJS: DateComponentsFromJS) -> DateComponents
-{
+func convertToSwiftDateComponents(from dateComponentsFromJS: DateComponentsFromJS) -> DateComponents {
🧰 Tools
🪛 SwiftLint (0.57.0)

[Warning] 70-70: Opening braces should be preceded by a single space and on the same line as the declaration

(opening_brace)


327-328: Adhere to a single-line brace for the closure declaration.
Adjust to align with SwiftLint’s preference:

-let decodedFamilyActivitySelections: [FamilyActivitySelection] = familyActivitySelections.map
-{ familyActivitySelection in
+let decodedFamilyActivitySelections: [FamilyActivitySelection] = familyActivitySelections.map {
+  familyActivitySelection in
🧰 Tools
🪛 SwiftLint (0.57.0)

[Warning] 328-328: Opening braces should be preceded by a single space and on the same line as the declaration

(opening_brace)

ios/Shared.swift (12)

27-28: Move the opening brace onto the same line for Swift style consistency.
SwiftLint recommends placing the brace ({) on the same line as the declaration, preceded by a space.

- if let shieldConfiguration = userDefaults?.dictionary(
-     forKey: "shieldConfiguration_\(shieldId)")
- {
+ if let shieldConfiguration = userDefaults?.dictionary(
+     forKey: "shieldConfiguration_\(shieldId)") {
    userDefaults?.set(shieldConfiguration, forKey: "shieldConfiguration")
}
🧰 Tools
🪛 SwiftLint (0.57.0)

[Warning] 28-28: Opening braces should be preceded by a single space and on the same line as the declaration

(opening_brace)


34-35: Apply the same-line brace style here as well.

- if let shieldActions = userDefaults?.dictionary(
-     forKey: "shieldActions_\(shieldId)")
- {
+ if let shieldActions = userDefaults?.dictionary(
+     forKey: "shieldActions_\(shieldId)") {
    userDefaults?.set(shieldActions, forKey: "shieldActions")
}
🧰 Tools
🪛 SwiftLint (0.57.0)

[Warning] 35-35: Opening braces should be preceded by a single space and on the same line as the declaration

(opening_brace)


222-223: Keep braces on the same line for function declarations.

-func sendHttpRequest(with url: String, config: [String: Any], placeholders: [String: String?])
-  -> URLSessionDataTask
-{
+func sendHttpRequest(with url: String, config: [String: Any], placeholders: [String: String?]) -> URLSessionDataTask {
    // ...
}
🧰 Tools
🪛 SwiftLint (0.57.0)

[Warning] 223-223: Opening braces should be preceded by a single space and on the same line as the declaration

(opening_brace)


266-267: Follow SwiftLint brace rules when entering the do block.

- if let json = try JSONSerialization.jsonObject(with: data, options: .mutableContainers)
-   as? [String: Any]
- {
+ if let json = try JSONSerialization.jsonObject(with: data, options: .mutableContainers) as? [String: Any] {
    print(json)
}
🧰 Tools
🪛 SwiftLint (0.57.0)

[Warning] 267-267: Opening braces should be preceded by a single space and on the same line as the declaration

(opening_brace)


292-293: One-line function signature brace style.

-func getTextToReplaceWithOptionalSpecialTreatment(_ stringToReplace: String)
-  -> TextToReplaceWithOptionalSpecialTreatment
-{
+func getTextToReplaceWithOptionalSpecialTreatment(_ stringToReplace: String) -> TextToReplaceWithOptionalSpecialTreatment {
    // ...
}
🧰 Tools
🪛 SwiftLint (0.57.0)

[Warning] 293-293: Opening braces should be preceded by a single space and on the same line as the declaration

(opening_brace)


295-296: Maintain consistent brace placement in conditional checks.

-if stringToReplace.starts(with: "{") && stringToReplace.hasSuffix("}")
-  && stringToReplace.contains(":")
-{
+if stringToReplace.starts(with: "{"),
+   stringToReplace.hasSuffix("}"),
+   stringToReplace.contains(":") {
    // ...
}
🧰 Tools
🪛 SwiftLint (0.57.0)

[Warning] 296-296: Opening braces should be preceded by a single space and on the same line as the declaration

(opening_brace)


330-331: Keep the brace on the same line when unwrapping placeholders.

- if let placeholderValue = placeholders[
-     textToReplaceWithOptionalSpecialTreatment.textToReplace] as? String
- {
+ if let placeholderValue = placeholders[textToReplaceWithOptionalSpecialTreatment.textToReplace] as? String {
    // ...
}
🧰 Tools
🪛 SwiftLint (0.57.0)

[Warning] 331-331: Opening braces should be preceded by a single space and on the same line as the declaration

(opening_brace)


339-340: Maintain consistent brace style in userDefaults fetch.

- if let value = userDefaults?.string(
-     forKey: textToReplaceWithOptionalSpecialTreatment.textToReplace)
- {
+ if let value = userDefaults?.string(forKey: textToReplaceWithOptionalSpecialTreatment.textToReplace) {
    // ...
}
🧰 Tools
🪛 SwiftLint (0.57.0)

[Warning] 340-340: Opening braces should be preceded by a single space and on the same line as the declaration

(opening_brace)


368-369: Same-line brace for dictionary retrieval from userDefaults.

- if let familyActivitySelectionIds = userDefaults?.dictionary(
-     forKey: "familyActivitySelectionIds")
- {
+ if let familyActivitySelectionIds = userDefaults?.dictionary(forKey: "familyActivitySelectionIds") {
    // ...
}
🧰 Tools
🪛 SwiftLint (0.57.0)

[Warning] 369-369: Opening braces should be preceded by a single space and on the same line as the declaration

(opening_brace)


385-386: Apply the brace style consistently here.

- if let familyActivitySelectionIds = userDefaults?.dictionary(forKey: "familyActivitySelectionIds")
- {
+ if let familyActivitySelectionIds = userDefaults?.dictionary(forKey: "familyActivitySelectionIds") {
    // ...
}
🧰 Tools
🪛 SwiftLint (0.57.0)

[Warning] 386-386: Opening braces should be preceded by a single space and on the same line as the declaration

(opening_brace)


434-435: Include the brace on the same line for the function header.

- func deserializeFamilyActivitySelection(familyActivitySelectionStr: String)
-   -> FamilyActivitySelection
- {
+ func deserializeFamilyActivitySelection(familyActivitySelectionStr: String) -> FamilyActivitySelection {
    // ...
}
🧰 Tools
🪛 SwiftLint (0.57.0)

[Warning] 435-435: Opening braces should be preceded by a single space and on the same line as the declaration

(opening_brace)


564-564: Remove trailing comma in collection literal.
SwiftLint warns about trailing commas in array or dictionary literals.

- "secondaryButtonAction": secondary.actions.map({ _ in
-   return ["type": "unblockAll"]
- }),
+ "secondaryButtonAction": secondary.actions.map({ _ in
+   return ["type": "unblockAll"]
+ })
🧰 Tools
🪛 SwiftLint (0.57.0)

[Warning] 564-564: Collection literals should not have trailing commas

(trailing_comma)

package.json (1)

36-38: Pinning @kingstinct/expo-apple-targets to version 0 might be risky.
Pinning dependencies to zero or a non-semantic version can make it hard to get updates or track stable releases.

Would you consider specifying a semantic range for better maintainability?

targets/ActivityMonitorExtension/DeviceActivityMonitorExtension.swift (2)

55-56: Maintain Swift style conventions for brace placement

The opening brace should be on the same line as the function declaration, preceded by a single space, following Swift style conventions.

-  func executeActionsForEvent(activityName: String, callbackName: String, eventName: String? = nil)
-  {
+  func executeActionsForEvent(activityName: String, callbackName: String, eventName: String? = nil) {
🧰 Tools
🪛 SwiftLint (0.57.0)

[Warning] 56-56: Opening braces should be preceded by a single space and on the same line as the declaration

(opening_brace)


63-63: Remove trailing comma from dictionary literal

Swift style conventions typically avoid trailing commas for the last item in collection literals.

-      "activityName": activityName, "callbackName": callbackName, "eventName": eventName,
+      "activityName": activityName, "callbackName": callbackName, "eventName": eventName
🧰 Tools
🪛 SwiftLint (0.57.0)

[Warning] 63-63: Collection literals should not have trailing commas

(trailing_comma)

targets/ShieldConfiguration/ShieldConfigurationExtension.swift (1)

25-26: Maintain consistent Swift style conventions across the file

Multiple instances of style deviations from Swift conventions:

  1. Opening braces should be on the same line as declarations (lines 26, 58, 125, 171)
  2. Trailing commas should be removed from the last items in collection literals (lines 113, 137, 158, 183)

Example fixes for brace placement:

-func buildLabel(text: String?, with color: UIColor?, placeholders: [String: String?])
-  -> ShieldConfiguration.Label?
-{
+func buildLabel(text: String?, with color: UIColor?, placeholders: [String: String?]) -> ShieldConfiguration.Label? {

Example fixes for trailing commas:

-      ),
+      )

If these changes are from an automated formatter, consider updating its configuration to align with Swift style conventions.

Also applies to: 57-58, 124-125, 170-171, 113-113, 137-137, 158-158, 183-183

🧰 Tools
🪛 SwiftLint (0.57.0)

[Warning] 26-26: Opening braces should be preceded by a single space and on the same line as the declaration

(opening_brace)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 45326b8 and 0ba5807.

⛔ Files ignored due to path filters (2)
  • example/ios/Podfile.lock is excluded by !**/*.lock
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (15)
  • app.plugin.js (2 hunks)
  • example/targets/ActivityMonitorExtension/expo-target.config.js (1 hunks)
  • example/targets/ShieldAction/expo-target.config.js (1 hunks)
  • example/targets/ShieldConfiguration/expo-target.config.js (1 hunks)
  • ios/ReactNativeDeviceActivityModule.swift (4 hunks)
  • ios/ReactNativeDeviceActivityView.swift (2 hunks)
  • ios/ScreenTimeActivityPicker.swift (2 hunks)
  • ios/Shared.swift (10 hunks)
  • package.json (3 hunks)
  • targets/ActivityMonitorExtension/DeviceActivityMonitorExtension.swift (1 hunks)
  • targets/ActivityMonitorExtension/expo-target.config.js (1 hunks)
  • targets/ShieldAction/ShieldActionExtension.swift (1 hunks)
  • targets/ShieldAction/expo-target.config.js (1 hunks)
  • targets/ShieldConfiguration/ShieldConfigurationExtension.swift (8 hunks)
  • targets/ShieldConfiguration/expo-target.config.js (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • example/targets/ShieldAction/expo-target.config.js
🧰 Additional context used
🪛 SwiftLint (0.57.0)
ios/ReactNativeDeviceActivityView.swift

[Warning] 41-41: Collection literals should not have trailing commas

(trailing_comma)


[Warning] 73-73: Collection literals should not have trailing commas

(trailing_comma)

targets/ShieldAction/ShieldActionExtension.swift

[Warning] 63-63: Opening braces should be preceded by a single space and on the same line as the declaration

(opening_brace)

ios/ReactNativeDeviceActivityModule.swift

[Warning] 70-70: Opening braces should be preceded by a single space and on the same line as the declaration

(opening_brace)


[Warning] 328-328: Opening braces should be preceded by a single space and on the same line as the declaration

(opening_brace)

ios/Shared.swift

[Warning] 28-28: Opening braces should be preceded by a single space and on the same line as the declaration

(opening_brace)


[Warning] 35-35: Opening braces should be preceded by a single space and on the same line as the declaration

(opening_brace)


[Warning] 223-223: Opening braces should be preceded by a single space and on the same line as the declaration

(opening_brace)


[Warning] 267-267: Opening braces should be preceded by a single space and on the same line as the declaration

(opening_brace)


[Warning] 293-293: Opening braces should be preceded by a single space and on the same line as the declaration

(opening_brace)


[Warning] 296-296: Opening braces should be preceded by a single space and on the same line as the declaration

(opening_brace)


[Warning] 331-331: Opening braces should be preceded by a single space and on the same line as the declaration

(opening_brace)


[Warning] 340-340: Opening braces should be preceded by a single space and on the same line as the declaration

(opening_brace)


[Warning] 369-369: Opening braces should be preceded by a single space and on the same line as the declaration

(opening_brace)


[Warning] 386-386: Opening braces should be preceded by a single space and on the same line as the declaration

(opening_brace)


[Warning] 435-435: Opening braces should be preceded by a single space and on the same line as the declaration

(opening_brace)


[Warning] 564-564: Collection literals should not have trailing commas

(trailing_comma)

targets/ActivityMonitorExtension/DeviceActivityMonitorExtension.swift

[Warning] 56-56: Opening braces should be preceded by a single space and on the same line as the declaration

(opening_brace)


[Warning] 63-63: Collection literals should not have trailing commas

(trailing_comma)

targets/ShieldConfiguration/ShieldConfigurationExtension.swift

[Warning] 26-26: Opening braces should be preceded by a single space and on the same line as the declaration

(opening_brace)


[Warning] 58-58: Opening braces should be preceded by a single space and on the same line as the declaration

(opening_brace)


[Warning] 113-113: Collection literals should not have trailing commas

(trailing_comma)


[Warning] 125-125: Opening braces should be preceded by a single space and on the same line as the declaration

(opening_brace)


[Warning] 137-137: Collection literals should not have trailing commas

(trailing_comma)


[Warning] 158-158: Collection literals should not have trailing commas

(trailing_comma)


[Warning] 171-171: Opening braces should be preceded by a single space and on the same line as the declaration

(opening_brace)


[Warning] 183-183: Collection literals should not have trailing commas

(trailing_comma)

🔇 Additional comments (15)
targets/ShieldConfiguration/expo-target.config.js (1)

1-1: **The new import reference looks solid. **

The switch from expo-apple-targets/target-plugin/config to @kingstinct/expo-apple-targets/build/config-plugin effectively aligns with the updated library structure. No further changes required here.

example/targets/ShieldConfiguration/expo-target.config.js (1)

1-1: **Consistent library reference update. **

This import path change is consistent with the rest of the project’s move to @kingstinct/expo-apple-targets/build/config-plugin. If everything compiles and no calls to the old path remain, you should be all set.

example/targets/ActivityMonitorExtension/expo-target.config.js (1)

1-1: **Corrected import for Activity Monitor config. **

Similarly, updating the Config import path from the old package to @kingstinct/expo-apple-targets/build/config-plugin keeps the code uniform. Looks good.

app.plugin.js (2)

17-17: **Usage of withTargetsDir in the return statement. **

Calling withTargetsDir(...) in line 17 is consistent with the updated import naming. This preserves the original plugin flow, just referencing the library’s new symbol.


1-2: **Confirm the imported symbols and types. **

You’re importing Config from @kingstinct/expo-apple-targets/build/config-plugin and storing it in withTargetsDir. Make sure withTargetsDir is the intended symbol from that library and that it provides the correct functionality for your plugin.

Suggested verification script:

ios/ReactNativeDeviceActivityView.swift (4)

29-31: Auto Layout initialization is correct.
Disabling AutoResizingMask and setting a clear background is a good practice when using constraints in SwiftUI hosting controllers.


33-35: View hierarchy addition looks fine.
Adding the hosting controller’s .view directly to this container is an appropriate approach.


36-42: Constraint setup is correct.
Your usage of NSLayoutConstraint.activate ensures the contentView fills its superview.

🧰 Tools
🪛 SwiftLint (0.57.0)

[Warning] 41-41: Collection literals should not have trailing commas

(trailing_comma)


44-48: Child view controller addition is correct.
Including the hosting controller as part of the root view controller’s hierarchy is essential for correct appearance callbacks.

ios/ReactNativeDeviceActivityModule.swift (2)

464-469: Authorization request logic is well-structured.
Switching behavior based on the forIndividualOrChild parameter is beneficial for customizing requests. Adding logging for failures or user feedback could enrich user experience.


521-522: Block selection logic is correct.
Consistent usage of blockSelectedApps or a fallback to block all apps is a clear approach.

targets/ShieldAction/expo-target.config.js (1)

1-1: Changes to import path look good.
No issues here; updating the import path to @kingstinct/expo-apple-targets/build/config-plugin is consistent with the rest of the PR.

targets/ActivityMonitorExtension/expo-target.config.js (1)

1-1: Import path updated properly.
All references appear consistent and correct.

package.json (2)

3-3: Package version increment acknowledged.
No problems are apparent with this version bump, but ensure proper semantic versioning.


49-49: Fixed dev dependency version recognized.
Check if pinning pkg-pr-new to 0 is intentional; zero-based versions often indicate alpha or incomplete states.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/index.ts (1)

30-36: Consider documenting the new parameter for clarity.

The addition of the forIndividualOrChild parameter is logical, but it would be helpful to briefly document its purpose (e.g., what "child" implies) for future maintainers.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0ba5807 and f44b7b9.

⛔ Files ignored due to path filters (1)
  • example/ios/Podfile.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • ios/ReactNativeDeviceActivityModule.swift (2 hunks)
  • ios/ReactNativeDeviceActivityView.swift (1 hunks)
  • ios/Shared.swift (1 hunks)
  • src/ReactNativeDeviceActivity.types.ts (1 hunks)
  • src/index.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • ios/ReactNativeDeviceActivityView.swift
  • ios/ReactNativeDeviceActivityModule.swift
🔇 Additional comments (2)
src/ReactNativeDeviceActivity.types.ts (1)

238-240: Looks good and consistent with the calling side.

The method signature aligns well with the updated code in src/index.ts, ensuring type safety and clarity for consumers of the module.

ios/Shared.swift (1)

438-438: Implementation is clear for encoding FamilyActivitySelection.

This function properly handles empty selections and returns nil. The base64 encoding with JSON ensures that more complex selections remain intact. The logic is straightforward and aligns with the rest of the module.

…litch in some cases"

This reverts commit 9bc7670.

# Conflicts:
#	ios/ReactNativeDeviceActivityView.swift
@robertherber robertherber merged commit 4f402b3 into main Jan 4, 2025
7 checks passed
This was referenced Jan 21, 2025
@robertherber robertherber deleted the upgrade-expo-apple-targets branch April 9, 2025 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants