[swift-users] .apinotesc file placement?

Rick Mann rmann at latencyzero.com
Wed Nov 29 18:05:43 CST 2017


FWIW, I submitted an Xcode feature request via Radar:

	https://bugreport.apple.com/web/?problemID=35757360

I also have this Framework:

$ ls -Rl lgscolibri.framework 
total 18128
drwxr-xr-x  3 rmann  staff    96B Nov 21 16:41 Headers/
-rwxr-xr-x  1 rmann  staff   888B Nov 21 16:41 Info.plist*
-rwxr-xr-x  1 rmann  staff   8.9M Nov 21 16:41 lgscolibri*
-rw-r--r--@ 1 rmann  staff   1.7K Nov 29 14:07 lgscolibri.apinotes
-rw-r--r--@ 1 rmann  staff    69B Nov 29 15:21 module.modulemap

With the attached .apinotes and module map, and it doesn't seem to be picked up by Xcode:

	BLK360API.swift:10:8: error: no such module 'lgscolibri'
	import lgscolibri
	       ^


-------------- next part --------------
A non-text attachment was scrubbed...
Name: lgscolibri.apinotes
Type: application/octet-stream
Size: 1735 bytes
Desc: not available
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20171129/30f4623d/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: module.modulemap
Type: application/octet-stream
Size: 69 bytes
Desc: not available
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20171129/30f4623d/attachment-0001.obj>
-------------- next part --------------


Note that this is Swift 3.2; does that matter? Is 4.0 better?


> On Nov 2, 2017, at 13:22 , Rick Mann <rmann at latencyzero.com> wrote:
> 
> 
>> On Nov 1, 2017, at 14:27 , Jordan Rose <jordan_rose at apple.com> wrote:
>> 
>> Yep, you can! In fact, you don't even need to compile it. You can just put the apinotes file itself into the Headers/ directory and it will work, as long as
>> 
>> - the file has the same name as the framework, i.e. "MyKit.apinotes"
>> - the framework has a proper module map
>> 
>> (I have a task on me to write up documentation on this but haven't gotten around to it. It's not something most people need to do, but adapting an existing library is one of the more likely cases.)
> 
> I'd sure appreciate this. We get this binary iOS Framework from a vendor and need to integrate it. They know nothing of Swift, and their header is cross-platform, so they don't have any of the proper naming conventions or macros included. I don't really know how to write a robust and complete module map or apinotes file.
> 
> I'd love to be able to include both of those *outside* of the framework, so that I don't have to modify their provided items in any way. But for now, I can drop both files into the Framework they provide.
> 
> Thanks!
> 
>> 
>> Jordan
>> 
>> 
>>> On Oct 30, 2017, at 18:31, Rick Mann via swift-users <swift-users at swift.org> wrote:
>>> 
>>> I'm using a third-party C library shoehorned into a Framework. It does not have proper ENUM macros nor an apinotes file. I'd like to add one. I'm using Xcode 9. 
>>> 
>>> • Can I put the .apinotesc file in the Framework somewhere?
>>> • Can I make Xcode automatically compile it?
>>> 
>>> Thanks.
>>> 
>>> -- 
>>> Rick Mann
>>> rmann at latencyzero.com
>>> 
>>> 
>>> _______________________________________________
>>> swift-users mailing list
>>> swift-users at swift.org
>>> https://lists.swift.org/mailman/listinfo/swift-users
>> 
> 
> 
> -- 
> Rick Mann
> rmann at latencyzero.com
> 
> 


-- 
Rick Mann
rmann at latencyzero.com





-- 
Rick Mann
rmann at latencyzero.com




More information about the swift-users mailing list