Skip to main content
Code samples

CocoaPods Distribution

Podfileโ€‹

platform :ios, '16.0'
use_frameworks!

target 'YourApp' do
pod 'NCKit',
:git => 'https://<YOUR_TOKEN>@github.com/5Exceptions-Mobile-Team/NCKit.git',
:tag => '1.1.1'
end
pod install
open YourApp.xcworkspace
GitHub Token

Generate at GitHub โ†’ Settings โ†’ Developer Settings โ†’ Personal Access Tokens (Classic). Grant repo scope. Replace <YOUR_TOKEN> in the Podfile.

Local Development Podfileโ€‹

pod 'NCKit', :path => '../NCKit-iOS'

Podspecโ€‹

NCKit's podspec vendors the prebuilt XCFramework:

Pod::Spec.new do |s|
s.name = "NCKit"
s.version = "1.0.1"
s.platform = :ios, "16.0"
s.swift_versions = "5.9"
s.vendored_frameworks = "NCKit.xcframework"
s.frameworks = "AVFoundation", "Accelerate"
end

No source compilation occurs โ€” CocoaPods embeds the prebuilt framework.

Common Issuesโ€‹

pod install fails with SSL error:

pod install --no-repo-update

Framework not found at build time:

pod deintegrate
pod install

Simulator build fails (Intel Mac):

# Add to Podfile to exclude x86_64 simulator
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'x86_64'
end
end
end

CI/CDโ€‹

- name: Install pods
run: pod install --repo-update
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}