Skip to content

Commit a3a2f2b

Browse files
committed
chore(apple): support local dev in podspec
1 parent 7ba9dcb commit a3a2f2b

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

packages/apple/openiap.podspec

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ Pod::Spec.new do |s|
3131
s.tvos.deployment_target = '16.0'
3232

3333
s.swift_version = '5.9'
34-
s.source_files = 'packages/apple/Sources/**/*.swift'
34+
35+
# Support both local development (:path) and distribution (git)
36+
# When podspec is in packages/apple/ (local :path), use 'Sources/**/*.swift'
37+
# When podspec is in repo root (git distribution), use 'packages/apple/Sources/**/*.swift'
38+
sources_dir = File.join(File.dirname(__FILE__), 'Sources')
39+
s.source_files = File.directory?(sources_dir) ? 'Sources/**/*.swift' : 'packages/apple/Sources/**/*.swift'
3540

3641
s.frameworks = 'StoreKit'
3742
s.requires_arc = true

0 commit comments

Comments
 (0)