Skip to content

Add catalyst support to abtesting#1279

Merged
jrcrespoh merged 6 commits into
masterfrom
jc-abtesting-catalyst
Sep 3, 2021
Merged

Add catalyst support to abtesting#1279
jrcrespoh merged 6 commits into
masterfrom
jc-abtesting-catalyst

Conversation

@jrcrespoh

Copy link
Copy Markdown
Contributor

No description provided.

@google-cla google-cla Bot added the cla: yes label Sep 2, 2021
@jrcrespoh

Copy link
Copy Markdown
Contributor Author

At the moment, the quickstart is unable to properly use Installations from what appear to be signing & certificate issues, so Installations was removed from the catalyst version of the app.

Comment thread abtesting/ABTestingExample.xcodeproj/project.pbxproj Outdated
@jrcrespoh jrcrespoh marked this pull request as ready for review September 2, 2021 03:21
@ncooke3

ncooke3 commented Sep 2, 2021

Copy link
Copy Markdown
Member

Will do a SPM only patch release of GDT to unblock this.

@ncooke3

ncooke3 commented Sep 2, 2021

Copy link
Copy Markdown
Member

GDT 9.1.1 is now published for SPM. This should fix the CoreTelephony issue @jrcrespoh

print("Error fetching token: \(error)")
} else if let token = token {
print("Installation auth token: \(token.authToken)")
#if !targetEnvironment(macCatalyst)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this still needed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, Installations is not installed due to code signing issues faced with catalyst. This is separate from CoreTelephony.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Error example

2021-09-02 15:47:01.618605-0500 ABTestingExample (catalyst)[30531:354255] 8.6.1 - [Firebase/RemoteConfig][I-RCN000073] Failed to get installations token. Error : Error Domain=com.firebase.installations Code=0 "Underlying error: The operation couldn’t be completed. SecItemAdd (-34018)" UserInfo={NSLocalizedFailureReason=Underlying error: The operation couldn’t be completed. SecItemAdd (-34018), NSUnderlyingError=0x60000138cf00 {Error Domain=com.gul.keychain.ErrorDomain Code=0 "SecItemAdd (-34018)" UserInfo={NSLocalizedFailureReason=SecItemAdd (-34018)}}}.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@maksymmalyhin Any ideas/suggestions here?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Installations SDK uses Keychain to store tokens. On Catalyst we need to configure Keychain sharing to get access to Keychain.

@maksymmalyhin maksymmalyhin Sep 3, 2021

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Probably eventually we should add comments with instructions to help developers to figure it out and remove the conditions.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

But I'm confused why we don't have a similar issue for macos testing?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

For macOS, a prompt asks for permission to allow access to Keychain, which then allows for the normal functioning of the application. Mac Catalyst doesn't surface a prompt when using the same entitlements (which don't include Keychain sharing).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hmm. Then the code is probably good as it is with docs since the script I pointed at makes sense for testing but not for a quickstart.

@paulb777

paulb777 commented Sep 2, 2021

Copy link
Copy Markdown
Member

@jrcrespoh Please rebase or merge to resolve conflicts

@jrcrespoh jrcrespoh force-pushed the jc-abtesting-catalyst branch from 5294f46 to f14263a Compare September 2, 2021 23:05
@jrcrespoh jrcrespoh merged commit d852a1e into master Sep 3, 2021
@jrcrespoh jrcrespoh deleted the jc-abtesting-catalyst branch September 3, 2021 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants