Current location - Health Preservation Learning Network - Slimming men and women - Those pits in the development of iOS SDK framework
Those pits in the development of iOS SDK framework
Recently, the business needs to develop an SDK to integrate into a friendly App, so with these experiences in this article (falling pit->; Climb the pit-> Fall into the pit).

In fact, this does not involve technical issues, but we need to be cautious, because our SDK belongs to a relatively complete business module, so we rely on quite a few third-party libraries, among which Gaode Map is used. At first, we used the normal version, but as a result, our friends used another version. Therefore, in order to successfully integrate, we later had to change the version of Gaode map. Therefore, it is suggested that if this framework is an SDK with clear partners, we should communicate well in advance.

PS: I can't help but spit. What is the purpose of many messy frames in Gaode map? The two are incompatible with each other, and the developer doesn't know which one to choose yet.

In the development of native App, the most resource files are nothing more than pictures, which are usually placed in the asset folder in normal project development, but in the SDK, you need to create a. bundle file (it is recommended to have the same name as the project) to manage the resource files.

Examples of this method used in the project:

Simply put, both simulators. Frame and real machine. The framework has arm64 architecture, and deleting arm64 through the later command line provided on the Internet can never solve this problem. At this point, you need to configure the options as shown in the figure, which may mean that arm64 is no longer added to the framework of. The framework generated by the simulator, the later simulator library and the real library are merged, and all architectural patterns exist.

Command line for merging emulator package with real machine package.

There are many tutorials for making remote private libraries, so I won't elaborate here. IOS development: configuring CocoaPods remote private warehouse focuses on how to configure non-open source spec. Frame. Frame.

Build your own non-open source SDK

Set up resource packages related to the project SDK.

When the SDK developed by ourselves contains a class file, the compiler will prompt that it cannot be found. At this time, you need to add' -objc' in the setting page other_laflags, but you can't set it in the SDK, you can only write it in the spec file.

The following error was reported when calling podliblint-verbose-use-libraries:

Lethal dose .../build/intermediates.noindex/app.build/release-iphonesimulator/app.build/objects-normal/arm64/binary/appnormal arm64.

Solution:

Experienced the whole SDK development process, eliminated the problems step by step, and finally achieved the final result. Thanks to the colleague who solved the problem together-Bian Boss.