.pkpass giving file not supported on Apple device - c#

I am currently working on apple wallet functionality where I have to save Event tickets in the user's apple wallet.
I am using NuGet package written by Tomas (https://github.com/tomasmcguinness/dotnet-passbook).
I am currently facing an issue like I have created a .pkpass file from the code and when I am trying to open that file in Apple device I am getting a "File not supported issue" but If I open the same pass in android (PassWallet or Passes) it works fine.
Anyone can help me here?
Below is my pass.json file
{
"passTypeIdentifier": "pass.tomsamcguinness.events",
"formatVersion": 1,
"serialNumber": "121212",
"description": "My first pass",
"organizationName": "Test Org",
"teamIdentifier": "4T64559QVN",
"sharingProhibited": false,
"logoText": "Test Inc.",
"foregroundColor": "rgb(0,0,0)",
"labelColor": "rgb(0,0,0)",
"barcodes": [
{
"format": "PKBarcodeFormatCode128",
"message": "10000151",
"messageEncoding": "ISO-8859-1",
"altText": "10000010"
}
],
"eventTicket": {
"headerFields": [
{
"key": "date",
"label": "Date",
"value": "16th July"
}
],
"primaryFields": [
{
"key": "event-name",
"label": "Event",
"value": "The Hectic Glow in concert"
}
],
"secondaryFields": [
{
"key": "location",
"label": "Location",
"value": "Central Park Zoo"
}
],
"auxiliaryFields": [],
"backFields": []
}
}

Can you double check the format version of the pass. From your code, I can see it is mentioned as
"formatVersion": 1,
Can you try the format version 2 as given below,
"formatVersion": 2,
and see if that works?

Related

Azure Search why OCRed text is not merged in correct order in merged_content field?

I need to develop my own webapi custom skill that make us of Read API. I will use it in my custom skillset. I can't use built-in OCR skill from Azure Cognitive Search (t
Output of my webapi skill looks like this:
// logic to get result...
// now creating output to custom skill
var textUrlFileResults = results.AnalyzeResult.ReadResults;
foreach (ReadResult page in textUrlFileResults)
{
var newValue = new
{
RecordId = value.RecordId,
Data = new
{
text = string.Join(" ", page.Lines?.Select(x => x.Text))
}
};
output.Values.Add(newValue);
}
}
return new OkObjectResult(output);
And here is my skillset definition:
"skills": [
{
"#odata.type": "#Microsoft.Skills.Text.MergeSkill",
"name": "#1",
"context": "/document",
"insertPreTag": " ",
"insertPostTag": " ",
"inputs": [
{
"name": "text",
"source": "/document/content"
},
{
"name": "itemsToInsert",
"source": "/document/normalized_images/*/text"
},
{
"name": "offsets",
"source": "/document/normalized_images/*/contentOffset"
}
],
"outputs": [
{
"name": "mergedText",
"targetName": "merged_content"
}
]
},
{
"#odata.type": "#Microsoft.Skills.Custom.WebApiSkill",
"name": "#2",
"description": null,
"context": "/document/normalized_images/*",
// i cut some info
"inputs": [
{
"name": "image",
"source": "/document/normalized_images/*"
}
],
"outputs": [
{
"name": "text",
"targetName": "text"
}
]
}
],
I am trying to OCR pdf document that look like this:
And in Index i get this document that looks like this:
{
"#odata.context": " cutted ",
"value": [
{
"#search.score": 1,
"content": "\nText before shell\n\nText after shell\n\nText after bw\n\n\n\n\n\n\n\nAnd here second page\n\n\n",
"merged_content": "\nText before shell\n\nText after shell\n\nText after bw\n\n SHELL 1900 1904 1909 1930 1948 SHELL SHELL Shell Shell 1955 1961 1971 1995 1999 \n\n B+W BLACK+WHITE PHOTOGRAPHY \n\n\n\nAnd here second page\n\n\n",
"text": [
"SHELL 1900 1904 1909 1930 1948 SHELL SHELL Shell Shell 1955 1961 1971 1995 1999",
"B+W BLACK+WHITE PHOTOGRAPHY"
],
"layoutText": [],
"textFromOcr": "[\"SHELL 1900 1904 1909 1930 1948 SHELL SHELL Shell Shell 1955 1961 1971 1995 1999\",\"B+W BLACK+WHITE PHOTOGRAPHY\"]"
}
]
}
My question is, why OCRed text is not placed in correct order with standard text when i am using /document/normalized_images/*/contentOffset" in MergeSkill? To be honest my skillset is copy-pasted from ms docs and it is not working as expected. I dont really understand, what special comes from OCR skill. I need to develop my own OCR skill, i can't use OCR from Search out of the box, i need to write it on my own.
Unfortunately, that is the behavior of the skill by design. It gets the text first and leave the image translation at the bottom. This is not something that can be changed at this time with code within the skill due to an implementation limitation. Changes to OCR skill documentation have been made to reflect this, and it will be published hopefully this week, to clarify and avoid confusion.

DocuSign API: Signing issues with sending multiple documents in the same envelope

Using C#, DocuSign API SDK 4.5.2.
I'm sending out 3 documents for signatures in the same envelope. Each document will use the same server template (which just places the signature elements over the document using anchor tags). I can send out the envelope and I get the email back from DocuSign to view/sign the documents.
The issue I'm having is when I go to sign, I have to sign each document 3 times -- 9 times total -- before I'm allowed to click the Finish button. There is only 1 place to sign on each document, but I have to click the sign button 3 times before it's accepted. If I have 2 recipients, it's the same for each of them. If I change the code to send out only 1 document, it works fine so it's obvious something is not being generated correctly in the envelope request.
I have also tried giving each recipient a different Id number even though there are only 2 roles and 2 distinct names/email addresses.
Right before I call the API to actually send the document, I capture the JSON for debugging purposes:
{
"compositeTemplates": [
{
"compositeTemplateId": "1",
"document": {
"documentBase64": "---Document 1 Bytes---",
"documentId": "1",
"fileExtension": "pdf",
"name": "MultiDocument1"
},
"inlineTemplates": [
{
"recipients": {
"signers": [
{
"email": "client#gmail.com",
"name": "Client Name",
"recipientId": "1",
"roleName": "Signer1"
},
{
"email": "advisor#gmail.com",
"name": "Advisor Name",
"recipientId": "2",
"roleName": "Advisor"
}
]
},
"sequence": "2"
}
],
"serverTemplates": [
{
"sequence": "1",
"templateId": "99321CB1-A3E8-44A0-BDF4-D4F20069BC7B"
}
]
},
{
"compositeTemplateId": "2",
"document": {
"documentBase64": "---Document 2 Bytes---",
"documentId": "2",
"fileExtension": "pdf",
"name": "MultiDocument2"
},
"inlineTemplates": [
{
"recipients": {
"signers": [
{
"email": "client#gmail.com",
"name": "Client Name",
"recipientId": "1",
"roleName": "Signer1"
},
{
"email": "advisor#gmail.com",
"name": "Advisor Name",
"recipientId": "2",
"roleName": "Advisor"
}
]
},
"sequence": "2"
}
],
"serverTemplates": [
{
"sequence": "1",
"templateId": "99321CB1-A3E8-44A0-BDF4-D4F20069BC7B"
}
]
},
{
"compositeTemplateId": "3",
"document": {
"documentBase64": "---Document 3 Bytes---",
"documentId": "3",
"fileExtension": "pdf",
"name": "MultiDocument3"
},
"inlineTemplates": [
{
"recipients": {
"signers": [
{
"email": "client#gmail.com",
"name": "Client Name",
"recipientId": "1",
"roleName": "Signer1"
},
{
"email": "advisor#gmail.com",
"name": "Advisor Name",
"recipientId": "2",
"roleName": "Advisor"
}
]
},
"sequence": "2"
}
],
"serverTemplates": [
{
"sequence": "1",
"templateId": "99321CB1-A3E8-44A0-BDF4-D4F20069BC7B"
}
]
}
],
"emailSubject": "Multiple Documents for Signature",
"status": "Sent"
}
Here's one of the documents I'm using. The other 2 are similar -- different text, but using the same anchor tags.
I've also tried substituting another document I have used successfully in testing for Document 1 -- it is completely different, but still uses the same anchor tags. I'm getting the same results -- having to sign each signature 3 times.
Can anyone see what I'm doing wrong? If you need more information, please let me know.
thanks,
randy
Update: As suggested by Inbar and Larry, I contacted DocuSign Support and had the "Anchor Population Scope" setting changed from "Envelope" to "Document". Unfortunately, this made things worse. I still have to click the signature element multiple times to sign, but only the first document can be signed. The other documents do not have any signature elements attached.
Update #2: I'm wondering if the way I'm using templates might be confusing and causing these issues. I probably should have explained myself clearer. The server template I'm using has a "dummy" Word document that just contains a common set of anchor tags for signatures and dates. I uploaded it as a template and assigned the signature and date UI elements to the anchor tags. But when I'm sending a request from my application, I'm using a different document I choose/generate at runtime. This document replaces the dummy Word document in the template, but has the same anchor tags so all the signature & date elements find their places on the real document. This works great when sending out just 1 document, but I can't get things to work for more than one.
Update #3: Requirements -- We are adding digital signature capability to our website (ASP.NET, WinForms). We already have a page where an Advisor can either print out a document for a physical signature or start a digital signature process with DocuSign. All our documents come from MS Report Server because they need to contain Client data from our database. We currently do not send out any static documents. In the code behind on the page, I get the PDF bytes from Report Server and add that (as a document) to a composite template to be sent to DocuSign. It also contains a reference to a server template in my account of a Word document (see below) containing the anchor tags and signature elements (mentioned in Update #2) to be overlaid on the Report Server document. What happens is the Report Server document replaces the text of the Word template (like a form background) and because I'm using the same text as anchor tags, the signature elements on the Word template find their match on the Report Server document and move to their positions on the document. I finally include 1 or more names/email addresses of the Clients and usually 2 other required signers (Advisor and Manager). This is then sent to DocuSign (SDK API) to start the signing process. Using a single document, this is working well. We are preparing for when we will need to send more than 1 document to a Client and we'd like to do that in a single request. If you need more info, please let me know.
DocuSign Customer Service put me in touch with a Developer Support Representative who was VERY patient and helpful. I explained what I was trying to do and he was able to come up with a solution which was very easily integrated into my existing codebase.
To get this to work, you need 2 pieces of the puzzle. The first item was mentioned above: you must have the Anchor Population Scope value in your account set to "Document". This has to be done by a DocuSign Customer Service rep as the setting is not user accessible.
The second item was what was contributing to the signature tags all being stacked on the first document. In your Composite Template, the Inner Template must have a sequence number of "1" and the Server Template must use a sequence number of "2". Once both of these items were in place, I could send out multiple documents each using the same server template (to define AutoPlace tags and roles) to multiple signers in a single envelope.
Here's the sample JSON which works for me:
{
"compositeTemplates": [
{
"compositeTemplateId": "1",
"inlineTemplates": [
{
"documents": [
{
"documentBase64": "<PDF Bytes>",
"documentId": "1",
"fileExtension": "PDF",
"name": "MultiDocument1"
}
],
"recipients": {
"signers": [
{
"email": "client#email.com",
"name": "Client Name",
"recipientId": "1",
"roleName": "Signer1"
},
{
"email": "advisor#email.com",
"name": "Advisor Name",
"recipientId": "2",
"roleName": "Advisor"
}
]
},
"sequence": "1"
}
],
"serverTemplates": [
{
"sequence": "2",
"templateId": "1234xxxx-xxxx-xxxx-xxxx-xxxxxxxx5678"
}
]
},
{
"compositeTemplateId": "2",
"inlineTemplates": [
{
"documents": [
{
"documentBase64": "<PDF Bytes>",
"documentId": "2",
"fileExtension": "PDF",
"name": "MultiDocument2"
}
],
"recipients": {
"signers": [
{
"email": "client#email.com",
"name": "Client Name",
"recipientId": "1",
"roleName": "Signer1"
},
{
"email": "advisor#email.com",
"name": "Advisor Name",
"recipientId": "2",
"roleName": "Advisor"
}
]
},
"sequence": "1"
}
],
"serverTemplates": [
{
"sequence": "2",
"templateId": "1234xxxx-xxxx-xxxx-xxxx-xxxxxxxx5678"
}
]
},
{
"compositeTemplateId": "3",
"inlineTemplates": [
{
"documents": [
{
"documentBase64": "<PDF Bytes>",
"documentId": "3",
"fileExtension": "PDF",
"name": "MultiDocument3"
}
],
"recipients": {
"signers": [
{
"email": "client#email.com",
"name": "Client Name",
"recipientId": "1",
"roleName": "Signer1"
},
{
"email": "advisor#email.com",
"name": "Advisor Name",
"recipientId": "2",
"roleName": "Advisor"
}
]
},
"sequence": "1"
}
],
"serverTemplates": [
{
"sequence": "2",
"templateId": "1234xxxx-xxxx-xxxx-xxxx-xxxxxxxx5678"
}
]
}
],
"emailSubject": "Multiple Documents for Signatures",
"status": "Sent"
}
If you have any questions, please let me know. Thanks to Larry K and Inbar Gazit for the assist!
I believe the problem is that your account is set so that anchor tab positioning works across all of the documents in the envelope, not just the one document that you're applying the template to.
So you're ending up with three signing fields, positioned directly on top of one-another.
Suggestions for fixing:
Only apply the last template.
Or have your account changed so anchor positioning only affects the document the template is applied to.

could not find app configuration tab when trying to deploy bot in teams

when i am trying to configure tab in teams channel,i followed the steps from article https://learn.microsoft.com/en-in/microsoftteams/platform/tutorials/get-started-dotnet-app-studio i could not find selection of tab and save button enabled , why this happned? how to solve it?, I am using echo bot template which is running on bot emulator properly.
Following is the json
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json",
"manifestVersion": "1.5",
"version": "1.0.0",
"id": "2fac8fdd-7fa3-451f-8562-adba3ab84c8d",
"packageName": "com.contoso.helloworld",
"developer": {
"name": "Hello World App ",
"websiteUrl": "https://www.microsoft.com",
"privacyUrl": "https://www.microsoft.com/privacy",
"termsOfUseUrl": "https://www.microsoft.com/termsofuse"
},
"icons": {
"color": "color.png",
"outline": "outline.png"
},
"name": {
"short": "janApp",
"full": "janApp"
},
"description": {
"short": "SWAN Bot App for Microsoft Teams",
"full": "This sample app provides a very simple app for Microsoft Teams. You can extend this to add more content and capabilities."
},
"accentColor": "#A4D344",
"configurableTabs": [
{
"configurationUrl": "https://echobot57.azurewebsites.net/configure",
"canUpdateConfiguration": true,
"scopes": [
"team",
"groupchat"
]
}
],
"staticTabs": [
{
"entityId": "com.contoso.helloworld.hellotab",
"name": "Botdemo",
"contentUrl": "https://echobot57.azurewebsites.net/hello",
"websiteUrl": "https://echobot57.azurewebsites.net/hello",
"scopes": [
"personal"
]
}
],
"bots": [
{
"botId": "330b4c4d-5f92-4053-a38f-7d4593cfd18a",
"scopes": [
"personal",
"team",
"groupchat"
],
"supportsFiles": true,
"isNotificationOnly": true
}
],
"composeExtensions": [
{
"botId": "330b4c4d-5f92-4053-a38f-7d4593cfd18a",
"canUpdateConfiguration": true,
"commands": [
{
"id": "getRandomText",
"type": "query",
"title": "Get some random text for fun",
"description": "Gets some random text and images",
"initialRun": true,
"fetchTask": false,
"context": [
"commandBox",
"compose",
"message"
],
"parameters": [
{
"name": "cardTitle",
"title": "Card title",
"description": "Card title to use",
"inputType": "text"
}
]
}
]
}
],
"permissions": [
"identity",
"messageTeamMembers"
],
"validDomains": [
"echobot57.azurewebsites.net"
]
}
Please make sure the tab configuration url is correct.
If it is correct, you should be able to access it.
https://microsoftteamssampleshelloworldweb20200107021253.azurewebsites.net/configure

Action Messageback card not rendering

I am trying to post a Messageback Adaptive card but I am below getting error in emulator:
The card could not be rendered. It is either malformed or uses features not supported by this host.
I am using AdaptiveCards 1.2.2 version. I am using C# to post this adaptive card but I am not able to figure out the issue.
My Json File:
{
"type": "AdaptiveCard",
"selectAction": {
"type": "Action.Submit"
},
"body": [
{
"type": "TextBlock",
"text": "1:1 with John Doe",
"weight": "Bolder"
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"type": "Image",
"url": "https://images.idgesg.net/images/article/2019/04/google-calendar-android-100794956-large.jpg",
"altText": "Calendar",
"size": "small"
}
],
"width": "auto"
},
{
"type": "Column",
"items": [
{
"type": "TextBlock",
"text": "Tomorrow, 30 May"
}
],
"width": "stretch"
}
]
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"type": "Image",
"url": "https://pbs.twimg.com/profile_images/3647943215/d7f12830b3c17a5a9e4afcc370e3a37e_400x400.jpeg",
"altText": "Calendar",
"height": "20px"
}
],
"width": "auto"
},
{
"type": "Column",
"items": [
{
"type": "TextBlock",
"text": "John Doe",
"spacing": "Medium"
}
],
"width": "stretch"
}
]
},
{
"type": "TextBlock",
"text": "Slots available - **1 hr duration**",
"separator": true,
"spacing": "Medium",
"isSubtle": true
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"actions": [
{
"type": "Action.Submit",
"title": "11:00 AM",
"data": {
"msteams": {
"type": "messageBack",
"displayText": "11:00 AM",
"text": "text to bots",
"value": "{\"bfKey\": \"bfVal\", \"conflictKey\": \"from value\"}"
}
}
}
]
}
],
"width": "auto"
},
{
"actions": [
{
"type": "Action.Submit",
"title": "Cancel",
"data": {
"msteams": {
"type": "messageBack",
"displayText": "Cancel",
"text": "text to bots",
"value": "{\"bfKey\": \"bfVal\", \"conflictKey\": \"from value\"}"
}
}
},
{
"type": "Action.Submit",
"title": "Confirm",
"data": {
"msteams": {
"type": "messageBack",
"displayText": "Confirm",
"text": "text to bots",
"value": "{\"bfKey\": \"bfVal\", \"conflictKey\": \"from value\"}"
}
}
}
]
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.0"
}
A great way to test your Adaptive Cards is to use the Adaptive Card Designer or the card editor in App Studio in Microsoft Teams. If a preview isn't rendered then there's something wrong with your card.
In your case, you say you want to use Adaptive Cards 1.2.2 but you're including "version": "1.0" in your JSON. You might want to say "version": "1.2" instead, but keep in mind that the higher the version of your Adaptive Card the fewer clients will be able to render it.
More importantly, you're putting an actions property in both columns and column sets and neither of those have an actions property. Please refer to the schema to see what elements have what properties. You might mean to use an action set (a 1.2 feature), or you might just want to use the actions property of the card itself outside of the card's body.
More importantly still, you have more opening brackets than closing brackets and so your JSON is invalid. I suspect you forgot to close your last column set and its columns array. Please use an editor like Visual Studio Code to automatically format your JSON and make sure it's valid. It's also good etiquette to correctly format your JSON in your Stack Overflow question so that other people can read it without formatting it for you.
Please read my latest blog post for more information about Adaptive Cards and using them with the Microsoft Bot Framework.

TFS 2015: Release Definition REST API Issue

Visual Studio 2017 15.7.5
.Net Core 2.1
TFS 2015 Update 3
I'm trying to make a POST request to create a release. This is the documentation I'm referring to. But I get the following error message:
"VS402881: No artifact version is specified corresponding to artifact
source 'example0'. Specify a valid value and try
again.\",\"typeName\":\"Microsoft.VisualStudio.Services.ReleaseManagement.Data.Exceptions.InvalidRequestException,
Microsoft.VisualStudio.Services.ReleaseManagement2.Data,
Version=14.0.0.0, Culture=neutral,
PublicKeyToken=...\",\"typeKey\":\"InvalidRequestException\",\"errorCode\":0,\"eventId\":3000}"
This is an example of my request.
{
"definitionId": 1,
"description": "Creating Sample release",
"artifacts": [
{
"alias": "example0",
"instanceReference": [
{
"id": "39194",
"name": "example"
}
]
},
{
"alias": "example0",
"instanceReference": [
{
"id": "39194",
"name": "example"
}
]
}
]
}
EDIT1: Although the documentation doesn't refer to any "artifact version", I've found the variable through this GET call which returns a "version" under the artifacts. I've updated my Request Body with the version number as seen below but I still receive the same error.
{
"definitionId": 1,
"description": "Creating Sample release",
"artifacts": [
{
"alias": "example0",
"instanceReference": [
{
"id": "123",
"name": "example0_0"
}
],
"version": {
"id": "12345"
}
},
{
"alias": "exmaple1",
"instanceReference": [
{
"id": "1234",
"name": "example1_0"
},
{
"id": "42616",
"name": "example1_1"
},
{
"id": "42617",
"name": "example1_2"
}
],
"version": {
"id": "123456"
}
}
]
}
The REST API to create a release in TFS 2015 is as below, you could check your api:
POST http://TFS2015:8080/tfs/DefaultCollection/{teamproject}/_apis/Release/releases?api-version=2.3-preview.1
{
"definitionId":1,
"description":"",
"artifacts":[
{
"alias":"CAT0604",
"instanceReference":{
"name":"20180621.2",
"id":"57",
"sourceBranch":"$/Scrum-TFVC"
}
}
],
"isDraft":false,
"manualEnvironments":[]
}
You could also press F12 and create a release in web portal to capture the api to see which part of your api is incorrect.
Found a solution to my problem. It turns out for the Instance Reference, you need to refer to the builds not the build artifacts as one of the documentation suggests.

Categories