Skip to content

Add installation message signing quickstart hooks#2

Open
charlesoj6205 wants to merge 2 commits into
masterfrom
nsurlsession-quickstart-msgsigning
Open

Add installation message signing quickstart hooks#2
charlesoj6205 wants to merge 2 commits into
masterfrom
nsurlsession-quickstart-msgsigning

Conversation

@charlesoj6205

Copy link
Copy Markdown

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the Shapes quickstart app to include hooks for Approov installation message signing and improves visibility into Shapes API responses during debugging, alongside an Approov SDK version bump.

Changes:

  • Bump approov-service-nsurlsession CocoaPods dependency from 3.5.3 to 3.5.4.
  • Add commented “installation message signing” hooks (v5 endpoint + message signing mode setter).
  • Add more detailed logging for Shapes responses to help diagnose Approov/message-signing related failures.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
shapes-app/ApproovShapes/Podfile Updates Approov CocoaPods dependency version to pick up the SDK changes needed for the quickstart hooks.
shapes-app/ApproovShapes/ApproovShapes/ViewController.m Adds message-signing quickstart toggle points and expands response logging to aid troubleshooting.
Comments suppressed due to low confidence (1)

shapes-app/ApproovShapes/ApproovShapes/ViewController.m:160

  • This declares a new local NSError* error that shadows the NSError *error parameter of the completion handler, making the code harder to follow. Rename the JSON parsing error to a distinct variable (e.g., jsonError).
                NSError* error;
                NSDictionary* jsonDict = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&error];
                if (error != nil) {

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +135 to +139
// Log the full Shapes response so Approov/message-signing failures are visible in Xcode.
NSString* responseBody = @"<empty>";
if (data != nil && data.length > 0) {
responseBody = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
if (responseBody == nil)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fixed in a592146: the detailed response logging is now wrapped in #ifdef DEBUG so it only runs in debug builds, and the redundant NSLog(@"Data: %@", responseBody) in the 200-path has been removed.

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.

3 participants