| Hi, I haven’t tried building for macOS, but I have managed to build and run IoTivity 1.3-rel branch on iOS. In order to build it I had to make a few modifications to the build system. I then manually added the generated .a files and relevant headers to my project. I’ve attached a patch with the changes to this email and will submit the changes to the Gerrit review system. Additionally, I'll be happy to update the Wiki. My time is a little limited this week since I’m attended the OCF Plugfest. One major issue that I encountered is that IoTivity would crash when the App is backgrounded and then returns to the foreground. This seems to be related to IoTivity assuming that the sockets it opens remain valid. However, iOS aggressively closes sockets soon after an App is backgrounded. The work-around that I implemented is to stop the IoTivity stack when the OS notifies that the App is being background and re-starting it when it is foregrounded. After applying the patch, you should be able to build for 64-bit devices using the following command: scons TARGET_OS=ios TARGET_ARCH=arm64 RELEASE=false SECURED=1 For 64 bit simulator builds replace arm64 with x86_64. For 32 bit device builds (e.g. for iPhone 5) replace arm64 with armv7. I also have a very basic script put together by one of my colleagues that joins the various targets into combined .a files which I will be happy to share. In the long term I’d ideally like to see the build system supporting bit-code and outputting a framework that can simply be dropped into people’s Xcode project. Best regards, Jonny |
ios-build-patch.diff
Description: Binary data
|
_______________________________________________ iotivity-dev mailing list [email protected] https://lists.iotivity.org/mailman/listinfo/iotivity-dev
