Hasan Yatar
Hasan Yatar

Reputation: 1

How to Secure an XCFramework

I have an XCFramework that I plan to distribute to my clients using CocoaPods. I want to ensure that my clients cannot reverse-engineer the code and only use the framework. Is it possible to secure an XCFramework in this way, or is this a limitation by nature? My goal is to hide my code.

my generating xcframework:

xcodebuild archive -workspace ExampleSDK.xcworkspace -scheme ExampleSDK -configuration Release -destination 'generic/platform=iOS' -archivePath './build/ExampleSDK.framework-iphoneos.xcarchive' SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES

xcodebuild archive -workspace ExampleSDK.xcworkspace -scheme ExampleSDK -configuration Release -destination 'generic/platform=iOS Simulator' -archivePath './build/ExampleSDK.framework-iphonesimulator.xcarchive' SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES

xcodebuild -create-xcframework -framework './build/ExampleSDK.framework-iphonesimulator.xcarchive/Products/Library/Frameworks/ExampleSDK.framework' -framework './build/ExampleSDK.framework-iphoneos.xcarchive/Products/Library/Frameworks/ExampleSDK.framework' -output './build/ExampleSDK.xcframework'

From what I’ve researched, it seems that I need to be careful with the dSYM file. However, I’m not sure if this alone is enough.

Upvotes: 0

Views: 32

Answers (0)

Related Questions