1

I’m working on creating an iOS SDK or framework for a mobile application that users will integrate into their projects. The goal is to make sure the source code is hidden from the user. Here’s what I want to accomplish:

  • The user should initialize the SDK by calling an init method at a specific point in their project.
  • The user will be prompted to enter an API key or similar credential.
  • Once initialized, the user should be able to access various API features, display specific screens, and utilize AI- based image generation models.

Since I haven’t worked on a similar project before, I’m unsure about the exact steps involved and the best practices for achieving this.

I have a few questions about the process:

1. Should I create this as a framework?

I’m not sure if I should create the SDK as a framework or some other type. Xcode has various options for this:

  • XCode Menu -> File -> New -> Package -> Library
  • XCode Menu -> File -> New -> Project -> Framework
  • XCode Menu -> File -> New -> Project -> Static Library

Which option is best suited for my use case where the source code needs to be hidden and users will integrate the SDK with an API key for access?

2. Should I develop this in Objective-C or Swift? The size of the SDK is a major consideration for me, and I want to ensure that the SDK is as lightweight as possible. Which language would be better in terms of size and performance?

3. How should the user integrate this framework into their project? Can they add it using Swift Package Manager (SPM), CocoaPods, or manually? Which integration method would be the most appropriate for this type of SDK?

4. Where and how should the SDK be initialized? Should I create an initialization method at the app’s entry point, or is there a better way to ensure the SDK is initialized properly in different types of projects?

Any advice or resources on how to create a hidden-source SDK for iOS would be greatly appreciated!

asked Nov 6, 2024 at 8:27

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.