Writing Safari Extensions

Discussion in 'Mac Programming' started by BuleepMan, Jun 17, 2017.

  1. BuleepMan macrumors member

    BuleepMan

    Joined:
    Jun 5, 2008
    Location:
    San Diego
    #1
    I am interested in trying my hand at writing some Safari extensions to add features like are available for Firefox. I have found many websites with directions on writing extensions and even have followed some of them. ;) I learn by example or rather by dissecting other people's work. I want to add some commands to the Safari Context Menu but cannot find any examples of how to do it. Does anyone know:

    Q1: Do I have to be a registered Apple developer in order to play around with writing extensions just for my personal use?

    I have read there are free developer registrations for people like me who want to dabble a bit but I can only find the page where I have to register for $99 a year. That's too much for me to just "dabble around."

    Q2: Can anyone point me to the page where I can register free of charge?

    Q3: Does anyone know of any Safari and/or Safari Extension User Groups or a website with samples I could dissect or a website by a Safari Guru?

    Thanks all,

    James
     
  2. maculateConception, Jun 17, 2017
    Last edited: Jun 17, 2017

    maculateConception macrumors 6502

    maculateConception

    Joined:
    May 28, 2017
    Location:
    Die Bundesstaat Kalifornien
    #2
    Hi James,

    I don't know about Safari Extensions, but I did want to tell you about the Apple developer program and "code signing", since I had to deal with that myself recently. I struggled with it too; they really want your money so they don't make it clear how to get the free membership.

    You do not need a paid membership just to create what's called a "Developer ID" and more importantly, to code-sign your apps on your local machine, just for dabbling and testing.

    Follow the instructions here: https://livecode.com/how-to-create-a-free-ios-development-provisioning-profile/

    (Ignore the fact that it talks about developing specifically for iOS. The same process applies, regardless of your target platform)

    That will tell you how to set up your developer ID as well as create a code-signing identity in your local keychain, using XCode 7, so that you can code-sign your local apps. Then, when it comes time to code-sign your apps/extensions in XCode or Automator, you can select your newly created developer ID for code-signing.

    But, remember that if you want to distribute your apps someday later, you'll have to pay the money.

    Now, on the membership signup page, once you sign up, and it prompts you to "Enroll", just don't enroll. At that point, you should have the free ID.

    Let me know if you still have trouble.
     
  3. superscape macrumors 6502a

    superscape

    Joined:
    Feb 12, 2008
    Location:
    East Riding of Yorkshire, UK
    #3
  4. maculateConception macrumors 6502

    maculateConception

    Joined:
    May 28, 2017
    Location:
    Die Bundesstaat Kalifornien
    #4
    Hi, I was working on a personal project using XCode, when I happened to see something you'd be interested in. XCode has, built in, a Safari application extension "companion". I don't know exactly what it is, but I'm pretty sure it will aid in Safari extension development.

    See the attached picture. I'm using XCode 7.0. Hope this helps. Cheers.

    SafariExtensionCompanion.png
     
  5. superscape macrumors 6502a

    superscape

    Joined:
    Feb 12, 2008
    Location:
    East Riding of Yorkshire, UK
    #5
    Intriguing. I hadn't seen that. Thanks for the heads up!
     

Share This Page