Setting an Alarm

I want to set an alarm using the clock app in my IOS app. Cocoa pods has AlarmKit but I can’t get it to work. Is there a tutorial showing how to access other apps from an IOS app?
Thank you

Looks like that GitHub Repo has not been updated in the last 5 years so there will be some issues with trying to get it to work (as you have already discovered) with the later versions of Xcode and Swift.

What sort of error messages are you getting back from the complier?

Thank you very much for your reply.

These are the errors I’m getting. I was getting something about building the object but it seems to have gone away.

This is the error I was getting. Could not build Objective-C module ‘AlarmKit’
Thank you very much for your help.

I renamed everything. Now I’m getting these errors.

All of that is related to converting Swift 3 code to whatever version you are currently running (Swift 5 if you are using Xcode 11.6) which is not easy if you are new to Xcode.

I’m using xcode 11.6. I don’t know how to fix those errors. Can they be fixed?
Thanks again.

Yes they can, but they can be difficult for a beginner.

I’d suggest find a different more updated cocoapod

Does Alarmkit have to be uninstalled? I can’t get rid of the errors so I took import AlarmKit out of the view controller file and took AlarmKit out of the podfile. I’m still getting AlarmKIt errors. Please help.
Thanks

When you remove the entry in Podfile through terminal you must then run ‘pod update’ which will remove the AlarmKit pod from your project. Removing the entry from Podfile does not take effect until you re-run ‘pod update’

Pod update worked. Thank you very much. I can’t find a different more updated cocoapod. Alarmkit was the only one I could find.

That was what I thought you would encounter. If you want to share your project I am happy to have a look at it and see if I can convert it to the latest revision of Swift under Xcode 11.6.

Compress the project at the root level which will create a zip file and share it via DropBox or perhaps Google Drive and post a link here.

Cheers

OK I will do that. Thanks again for your help.


I want to set an alarm for the time I display.
Thank you

This is proving to be difficult.

What do you think? Any ideas?

Hi Robert,

To be honest I gave up last night since I could not resolve the remaining 5 errors in the AlarmKit.swift file. I spent a couple of hours on doing some research but in the end I wasn’t confident that the errors fixed have not introduced some other issues which is why I can’t resolve the remaining errors.

Sometimes the order in which you update the code elements to the latest version makes a difference so a short while ago I took a different approach and ended up with exactly the same result.

I’ve contacted the owner of the AlamKit GitHub repository (there is an email address for him) and asked if he has considered updating it. I’ll see if I get a response. If I don’t hear from him in a few days I’ll let you know. There has been no activity on his GitHub page since December 2019 so I’m not holding my breath.

Thank you very much for all your help. I really appreciate it.