To simply build the XCFramework:
# From the root:
mkdir -p ./ios_wrapper/SealdSdk/Frameworks/ ./build/apple/ios/ ./build/apple/macos/
gomobile bind -target=ios -prefix=SealdSdkInternals -v -o=./build/apple/ios/SealdSdkInternals.xcframework ./mobile_sdk
gomobile bind -target=macos -prefix=SealdSdkInternals -v -o=./build/apple/macos/SealdSdkInternals.xcframework ./mobile_sdk
rm -rf ./ios_wrapper/SealdSdk/Frameworks/SealdSdkInternals.xcframework
xcodebuild -create-xcframework \
-framework ./build/apple/ios/SealdSdkInternals.xcframework/ios-arm64/SealdSdkInternals.framework \
-framework ./build/apple/ios/SealdSdkInternals.xcframework/ios-arm64_x86_64-simulator/SealdSdkInternals.framework \
-framework ./build/apple/macos/SealdSdkInternals.xcframework/macos-arm64_x86_64/SealdSdkInternals.framework \
-output ./ios_wrapper/SealdSdk/Frameworks/SealdSdkInternals.xcframeworkFor Objective-C code (the iOS SDK Wrapper + the ObjC example), linting uses uncrustify.
Linting rules are defined in uncrustify.cfg in the root directory. Configuration is shared.
To install uncrustify, use brew on macos (brew install uncrustify), or your package manager on linux.
To verify formatting, you can run in the ios_wrapper directory:
- For the Seald SDK :
uncrustify -c ../uncrustify.cfg --check -l OC ./SealdSdk/Classes/*.h ./SealdSdk/Classes/*.m - For the ObjC example:
uncrustify -c ../uncrustify.cfg --check -l OC ./example_objc/SealdSDK/*.h ./example_objc/SealdSDK/*.m
To fix formatting, you can run in the ios_wrapper directory:
- For the Seald SDK :
uncrustify -c ../uncrustify.cfg --no-backup -l OC ./SealdSdk/Classes/*.h ./SealdSdk/Classes/*.m - For the ObjC example:
uncrustify -c ../uncrustify.cfg --no-backup -l OC ./example_objc/SealdSDK/*.h ./example_objc/SealdSDK/*.m
For Swift code (the Swift example), linting uses SwiftLint.
To install, simply run brew install swiftlint.
To verify formatting, you can run swiftlint lint in the ios_wrapper/example_swift/ folder.
To fix formatting, you can run swiftlint lint --fix in the ios_wrapper/example_swift/ folder.
You can use the local version in a project instead of one from a repo, by using the following line in its Podfile:
pod 'SealdSdk', :path => 'LOCAL_PATH/go-seald-sdk/ios_wrapper'