client-sdk-swift icon indicating copy to clipboard operation
client-sdk-swift copied to clipboard

[Cocoapods] Fixed `podspec` `source_files` and `CHeaders` import

Open amseddi opened this issue 3 years ago • 1 comments

Added source_files property to the podspec and fixed CHeaders import

amseddi avatar Aug 30 '22 16:08 amseddi

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Aug 30 '22 16:08 CLAassistant

Looks like pod spec lint fails.

 -> LiveKit (1.0.3)
    - ERROR | xcodebuild: Returned an unsuccessful exit code. You can use `--verbose` for more information.
    - NOTE  | xcodebuild:  note: Using new build system
    - NOTE  | xcodebuild:  note: Using codesigning identity override: -
    - NOTE  | xcodebuild:  note: Build preparation complete
    - NOTE  | xcodebuild:  note: Planning
    - NOTE  | xcodebuild:  note: Building targets in dependency order
    - ERROR | xcodebuild:  LiveKit/Sources/LiveKit/Broadcast/BroadcastServerSocketConnection.swift:11:8: error: no such module 'CHeaders'
    - NOTE  | [iOS] xcodebuild:  Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.5.99. (in target 'Logging' from project 'Pods')
    - NOTE  | xcodebuild:  warning: no rule to process file 'LiveKit/Sources/CHeaders/module.modulemap' of type 'sourcecode.module-map' for architecture 'arm64' (in target 'LiveKit' from project 'Pods')
    - NOTE  | xcodebuild:  warning: no rule to process file 'LiveKit/Sources/CHeaders/module.modulemap' of type 'sourcecode.module-map' for architecture 'x86_64' (in target 'LiveKit' from project 'Pods')
    - NOTE  | xcodebuild:  note: Using codesigning identity override: 
    - NOTE  | xcodebuild:  <module-includes>:1:9: note: in file included from <module-includes>:1:
    - NOTE  | xcodebuild:  /Users/hiroshi/Library/Developer/Xcode/DerivedData/App-dzlcqifdbcxvtkfkptxirqgtepvn/Build/Products/Release/XCFrameworkIntermediates/WebRTC-SDK/WebRTC.framework/Headers/WebRTC.h:84:9: note: in file included from /Users/hiroshi/Library/Developer/Xcode/DerivedData/App-dzlcqifdbcxvtkfkptxirqgtepvn/Build/Products/Release/XCFrameworkIntermediates/WebRTC-SDK/WebRTC.framework/Headers/WebRTC.h:84:
    - WARN  | xcodebuild:  /Users/hiroshi/Library/Developer/Xcode/DerivedData/App-dzlcqifdbcxvtkfkptxirqgtepvn/Build/Products/Release/XCFrameworkIntermediates/WebRTC-SDK/WebRTC.framework/Headers/RTCNSGLVideoView.h:29:47: warning: 'NSOpenGLView' is deprecated: first deprecated in macOS 10.14 - Please use MTKView instead.
    - NOTE  | xcodebuild:  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSOpenGLView.h:18:12: note: 'NSOpenGLView' has been explicitly marked deprecated here
    - WARN  | xcodebuild:  /Users/hiroshi/Library/Developer/Xcode/DerivedData/App-dzlcqifdbcxvtkfkptxirqgtepvn/Build/Products/Release/XCFrameworkIntermediates/WebRTC-SDK/WebRTC.framework/Headers/RTCNSGLVideoView.h:34:32: warning: 'NSOpenGLPixelFormat' is deprecated: first deprecated in macOS 10.14 - Please use Metal or MetalKit.
    - NOTE  | xcodebuild:  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSOpenGL.h:115:12: note: 'NSOpenGLPixelFormat' has been explicitly marked deprecated here

Analyzed 1 podspec.

[!] The spec did not pass validation, due to 2 errors and 2 warnings.

hiroshihorie avatar Sep 04 '22 06:09 hiroshihorie

The pod spec lint command will get the source code from the specified source (tag 1.0.3 from github). For it to succeed (with warnings and no errors) we need to merge the fix of CHeaders import or target the fix branch in the podspec.

For instance when I change the source:

-  spec.source         = { :git => 'https://github.com/livekit/client-sdk-swift.git', :tag => '1.0.3' }
+  spec.source         = { :git => '[email protected]:amseddi/client-sdk-swift.git', :branch => 'fix-podspec' }

I get the following output

 -> LiveKit (1.0.3)
    - WARN  | source: Git sources should specify a tag.
    - WARN  | source: Git SSH URLs will NOT work for people behind firewalls configured to only allow HTTP, therefore HTTPS is preferred.
    - NOTE  | xcodebuild:  note: Using new build system
    - NOTE  | xcodebuild:  note: Using codesigning identity override: -
    - NOTE  | xcodebuild:  note: Build preparation complete
    - NOTE  | xcodebuild:  note: Planning
    - NOTE  | xcodebuild:  note: Building targets in dependency order
    - WARN  | xcodebuild:  LiveKit/Sources/LiveKit/Track/AudioManager.swift:131:42: warning: 'onShouldConfigureAudioSession' is deprecated: Use AudioManager.shared.customConfigureFunc instead
    - NOTE  | [iOS] xcodebuild:  Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.5.99. (in target 'Logging' from project 'Pods')
    - NOTE  | xcodebuild:  warning: no rule to process file 'LiveKit/Sources/CHeaders/module.modulemap' of type 'sourcecode.module-map' for architecture 'arm64' (in target 'LiveKit' from project 'Pods')
    - NOTE  | xcodebuild:  warning: no rule to process file 'LiveKit/Sources/CHeaders/module.modulemap' of type 'sourcecode.module-map' for architecture 'x86_64' (in target 'LiveKit' from project 'Pods')
    - NOTE  | xcodebuild:  note: Using codesigning identity override:
    - NOTE  | xcodebuild:  <module-includes>:1:9: note: in file included from <module-includes>:1:
    - NOTE  | xcodebuild:  /Users/amseddi/Library/Developer/Xcode/DerivedData/App-bzoqpxcvkvbqwvfjclabrbxzqjtb/Build/Products/Release/XCFrameworkIntermediates/WebRTC-SDK/WebRTC.framework/Headers/WebRTC.h:84:9: note: in file included from /Users/amseddi/Library/Developer/Xcode/DerivedData/App-bzoqpxcvkvbqwvfjclabrbxzqjtb/Build/Products/Release/XCFrameworkIntermediates/WebRTC-SDK/WebRTC.framework/Headers/WebRTC.h:84:
    - WARN  | xcodebuild:  /Users/amseddi/Library/Developer/Xcode/DerivedData/App-bzoqpxcvkvbqwvfjclabrbxzqjtb/Build/Products/Release/XCFrameworkIntermediates/WebRTC-SDK/WebRTC.framework/Headers/RTCNSGLVideoView.h:29:47: warning: 'NSOpenGLView' is deprecated: first deprecated in macOS 10.14 - Please use MTKView instead.
    - NOTE  | xcodebuild:  /Applications/Xcode-13.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSOpenGLView.h:18:12: note: 'NSOpenGLView' has been explicitly marked deprecated here
    - WARN  | xcodebuild:  /Users/amseddi/Library/Developer/Xcode/DerivedData/App-bzoqpxcvkvbqwvfjclabrbxzqjtb/Build/Products/Release/XCFrameworkIntermediates/WebRTC-SDK/WebRTC.framework/Headers/RTCNSGLVideoView.h:34:32: warning: 'NSOpenGLPixelFormat' is deprecated: first deprecated in macOS 10.14 - Please use Metal or MetalKit.
    - NOTE  | xcodebuild:  /Applications/Xcode-13.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSOpenGL.h:115:12: note: 'NSOpenGLPixelFormat' has been explicitly marked deprecated here
    - NOTE  | xcodebuild:  /Users/amseddi/Library/Developer/Xcode/DerivedData/App-bzoqpxcvkvbqwvfjclabrbxzqjtb/Build/Products/Release/LiveKit/LiveKit.framework/Headers/LiveKit-Swift.h:497:9: note: while building module 'WebRTC' imported from /Users/amseddi/Library/Developer/Xcode/DerivedData/App-bzoqpxcvkvbqwvfjclabrbxzqjtb/Build/Products/Release/LiveKit/LiveKit.framework/Headers/LiveKit-Swift.h:497:
    - NOTE  | xcodebuild:  /Users/amseddi/Library/Developer/Xcode/DerivedData/App-bzoqpxcvkvbqwvfjclabrbxzqjtb/Build/Products/Release/LiveKit/LiveKit.framework/Headers/LiveKit-Swift.h:203:9: note: while building module 'WebRTC' imported from /Users/amseddi/Library/Developer/Xcode/DerivedData/App-bzoqpxcvkvbqwvfjclabrbxzqjtb/Build/Products/Release/LiveKit/LiveKit.framework/Headers/LiveKit-Swift.h:203:

Analyzed 1 podspec.

[!] The spec did not pass validation, due to 5 warnings (but you can use `--allow-warnings` to ignore them).

amseddi avatar Sep 05 '22 07:09 amseddi

You're right! LG .

hiroshihorie avatar Sep 07 '22 05:09 hiroshihorie