Shiny Job issue on iPhone #1486
Replies: 4 comments 1 reply
-
Step 8 is where everything went downhill for you. Please use the application builder on shinylib.net and pick "periodic jobs". If will show you how to register a job. There is also AddJobs off the service collection if you need to dynamically register |
Beta Was this translation helpful? Give feedback.
-
Yes, I have used a builder https://shinylib.net/client/appbuilder/.
And now I got:
@aritchie Sorry, not clear to me what I did wrong. |
Beta Was this translation helpful? Give feedback.
-
On the service builder in MauiProgram.cs, use AddJob or AddJobs. You don't manually register the services, you use the extension method I created that puts in all of infrastructure necessary. It is shown in the app builder, so you've missed a step |
Beta Was this translation helpful? Give feedback.
-
Added Job:
And now I get:
|
Beta Was this translation helpful? Give feedback.
-
I am currently experiencing an issue with running jobs in Shiny on an iPhone and would appreciate your assistance in resolving it.
Issue Description:
Steps to Reproduce:
Added references in my *.csproj file:
Aded
.UseShiny()
in myMauiProgram.cs
file.Created
PrivacyInfo.xcprivacy
file insidePlatforms/iOS
and added a reference in the *.csproj file:In my Info.plist I have added:
Added permissions in AndroidManifest.xml
My Job:
Also I added:
Yes, I was forced to add:
Otherwise there
var access = await _jobManager.RequestAccess();
would result in aNullReference
.Everything works correctly on Android devices. I can see the
"Shiny Job has run"
alert.However, on iPhone, I see the
"Job permissions failed: NotSetup"
alert.If I remove the
RequestAccess
check, I get a crash at the line -_jobManager.Register(job);
StackTrace:
What I did wrong?
Thank you for your help and support.
Best regards
Beta Was this translation helpful? Give feedback.
All reactions