Does app widget extension need a separate provision profile? - widgetkit

Does app widget extension need a separate provision profile ?
When I add an Widget extension(if I want to manager the code sign manually in Xcode), do I need to create a new provision profile beside the app's provision profile on
https://developer.apple.com/account/resources/profiles/list
Or, how can I include the Widget extension in the app's provision profile ?

For distribution App Widget Extension.
I do need a separate distribution profile with different bundle id too to distribution successfully.
Both extension bundle id & extension profile need to create manually on apple's developer site.
If there's ones created by Xcode. just delete it, and create manually.
The ones created by Xcode can debug on devices, But not work when distribution the app.

Related

Core audio user space driver, How to start a xcode project?

I am trying to start a project to create a virtual audio device which will mirror the system's default sound output, I want to create a .driver to place under /Library/Audio/Plug-Ins/HAL , but I am not able to figure out how to setup the .driver project, I could find Kext, Dext, but not driver,am I missing something. I use xcode 11.3.
If I choose IOkit Driver the product is a .kext.
If i choose Driverkit Driver the output is a .dext.
I am not able to get .driver as output.the project types I see
You should start by creating a new XCode project with a Bundle template. After clicking next you can choose the extension you want to give the plugin.
Or you could add a new target with the Bundle template in an existing XCode project which will give you the same options as mentioned above.
This project should give you a very good example.

How do I add IN-APP PURCHASE capability when doing a build (ios)

How do I add IN-APP PURCHASE capability when doing a build.
I'm specifying the development provision file name when doing the build and I can't see my purchases when I run the app.
I've added the IAP to my APP-ID in itunes.
Do I need to edit the xcodeproj file manually to add the in-app purchase capability.
If so - any way to add it on the command-line.
If not - when should the xcodeproj file be edited - before which TNS command.
Thanks
You may do it the first time - edit Xcode project to enable in app purchases, then copy the entitlements file from Xcode project folder and place it in your App_Resources. Finally you will have to update build.xcconfig with the name of the file. For example,
CODE_SIGN_ENTITLEMENTS = appname/filename.entitlements

How to create a hosted content package without Xcode?

I was wondering if there is any other way to create a hosted content package for an in-app purchase without using X-Code.
We could use a terminal to do so, and we even don't need to create an in-app purchase using Xcode. Here are the steps.
1- Create a folder, let's call it "zzz"
2- Add your .plist file similar to the .plist file which the in-app purchase project created from Xcode would have generated, make sure to update the version and the product identifier fields.
3- Create a contents folder inside of it, and in the contents folder place your in-app purchase contents.
4- Open your terminal and write
productbuild --content "zzz" "zzz/nameOfPackage.pkg"
so basically after --content you write the full path of your folder, then the full path of where you want you package to be and the name of package.
I used this answer as reference Converting a xcodeproj in-app purchase to a pkg file from terminal (Bash) or how to convert a xcarchive file to a pkg file?
if you're referring to having a content bundle (i.e. a .zip file) with contents pertaining to your app, then yes.
I refer to the App Store Review Guidelines here from Apple themselves: (https://developer.apple.com/app-store/review/guidelines/)
IN terms of functionality, if the bundle downloads code in any way or form, your app will be rejected (Apple guidelines 2.7).
That's the main one that's mentions. Other than that, there's the general guidelines mentioned as per their website...

Adding preferences to Mac app

I have created a Mac app, now I want to add a Preferences to this. I looked up and came to know that I need to use NSPreferencePane. I have created a separate Xcode project for this and it will get generate a .prefPane file. On running this it will ask whether to add to system preferences or not and adds it if selected.
How can I bundle my app and preferences together ?
If I package this as a dmg file should I put both .app anf .prefPane file in the dmg file ?
It sounds like you want to magically (or programmatically) copy the preference pane into the right place (~/Library/PreferencePanes or /Library/PreferencePanes).
If you're going to copy it into your user's Preference Pane folder (i.e. ~/Library/PreferencePanes), you should be able to simply copy it from your Application bundle into there.
If you want to copy it into a system-wide Preference Pane folder (i.e. /Library/PreferencePanes), you'll need to write a privileged tool or helper app that gets Administrator priviledges so it can do the copy. Creating these things is not the most trivial of tasks.
If you are not distributing via the Apple App Store, you could use an installer package to install both your application and your preference pane. The newest option from Apple is "productbuild", which is a command line tool. PackageMaker is Apple's older tool for creating installers, and you can get it as part of the Auxillary Tools for Xcode, available from the Downloads section of developer.apple.com, and there are a bunch of other installer-building tools you could use to ship your Preference Pane with your app, such as "Iceberg".
It would be much easier to simply add the preferences interface to the app itself.

Command line tool to add resources to an Xcode project

I've got an Xcode project that creates a standard application that can be branded in multiple ways and contain some custom content. At the moment I have a Resource "Resources > Tour Packages" with the custom files under this. At the moment every time I want to brand the app a different way I have to delete the old files from this resource and then manually add the new versions via the XCode UI. I can't post and image but it is here - http://img.skitch.com/20100121-xub48r6e1p857c84hdrgg25dw6.jpg).
My Question: Is there a command line tool that performs the same operation?
You'd probably be better off just creating multiple targets in your Xcode project, and associating the resources for each branded version of the app with one target.
To do this, just right-click on your target and select Duplicate. You should then remove the custom resources from the Copy bundle resources build phase. You can then add a new set of resources to the Copy bundle resources build phase that are specific to the new target. You can then build any target you like by selecting it from the Active Target popup in the Xcode toolbar or by selecting it in the Project > Set Active Target menu.
This way, you can easily build different versions of your app without having complete duplicates of all your source, difference Xcode projects etc.
Yes, the xcodeproj ruby gem allows you to add resources. https://rubygems.org/gems/xcodeproj/versions/0.28.2

Resources