-1

I want to write a iOS SDK. But I am stuck with the process in which category I need to create it under Frameworks & Library like Framework, Static Library & Metal Library and why?

Queries:- Suppose I create under Framework then how can I deliver it to the client. I mean what is the build process so I can bundled it into a single file? Which language will be better for the SDK Development (Obj-c OR Swift) and why?

  • Check this tutorial it really helped me out! https://www.raywenderlich.com/5109-creating-a-framework-for-ios – Sanad Barjawi Jan 22 '20 at 11:55
  • @SanadBarjawi Yes, I have checked it and want to know after create a framework I need to share it with client. So, I want to share the single file only not the whole file, means don't want to give the acess of the source code. How it's possible? – Puneet Mahali Jan 22 '20 at 14:05
  • single file? just upload that specific file to oneDrive, dropbox, email instead – Sanad Barjawi Jan 22 '20 at 14:07
  • No, it doesn't mean like this. I mean to say after create a project under Framework then adding some Swift files then I don't want to deliver the whole files with client. Or in other words somehow he should not be able to see the source code. – Puneet Mahali Jan 22 '20 at 14:17
  • If it's not possible then he can see the code and edit also according his requirement. – Puneet Mahali Jan 22 '20 at 14:19
  • https://stackoverflow.com/questions/43989818/hide-source-code-in-swift-framework-when-distributing check this, if it helped upvote – Sanad Barjawi Jan 22 '20 at 14:23
  • Thanks @SanadBarjawi. I will check it. After creation the framework I am unable to access the Swift files into my testing app. Do you have any idea of that? – Puneet Mahali Jan 22 '20 at 15:20
  • try accessing the ..xcworkspace instead of the normal .xcodeprej – Sanad Barjawi Jan 22 '20 at 16:17

1 Answers1

1

OS X makes extensive use of frameworks to distribute shared code and resources, such as the interfaces to the system itself. You can create frameworks of your own to provide shared code and resources to one or more of your company’s applications. You can also create frameworks containing class libraries or add-on modules with the intention of distributing them to other developers.

The information in this document provides the background you need to create frameworks and the steps needed to create them in Xcode. Although creating frameworks is not difficult, there are some guidelines you should follow when doing so. Xcode simplifies the creation process by helping you create the framework bundle and manage the information and placement of files in that bundle. However, this document also provides additional information about how to perform many less obvious tasks. source

There is an guide on Stackoverflow which will help you to create a framework with Swift - "How Do I Create a Development Framework In iOS Including Swift?"

Blazej SLEBODA
  • 8,936
  • 7
  • 53
  • 93
  • After building the SDK, I am getting an error: "Could not find module for target 'arm64-apple-ios'; found: x86_64-apple-ios-simulator, x86_64" and then Icreate the FAT file through lipo command but after that also I am getting the same error. – Puneet Mahali Jan 24 '20 at 11:13