I am using RxCocoa in custom framework, so I am trying to inject dependencies with SPM and make that .xcframework. I made the .xcframework, but the following error keeps appearing.
The process of creating and configuring the framework project and creating the xcframework was as follows.
Development Environment
CPU : Apple slicon (M1 PRO)
MacOS : Ventura 13.1
Xcode : 14.1
Step
Create framework project (sdk-sample)
Set Build Active Architecture Only YES from NO
Mach-O Type is Dynamic Library
Write simple code using RxSwift, Rxcocoa
Create .xcarchive and .xcframework
xcodebuild archive \
-scheme sdk-sample \
-archivePath ./archive/sdk-sample.framework-iphoneos.xcarchive \
-sdk iphoneos \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
xcodebuild archive \
-scheme sdk-sample \
-archivePath ./archive/sdk-sample.framework-iphonesimulator-arm64.xcarchive \
-sdk iphonesimulator \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
xcodebuild -create-xcframework \
-framework './archive/sdk-sample.framework-iphoneos.xcarchive/Products/Library/Frameworks/sdk_sample.framework' \
-framework './archive/sdk-sample.framework-iphonesimulator arm64.xcarchive/Products/Library/Frameworks/sdk_sample.framework' \
-output './MySDK.xcframework'
Created Package.swift as below and uploaded it to git
let package = Package(
name: "MySDK",
platforms: [
.iOS(.v13)
],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "MySDK",
targets: ["sdk-sample-target"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(
url: "https://github.com/ReactiveX/RxSwift.git",
.upToNextMajor(from: "6.5.0")
)
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
// .bin
.binaryTarget(name: "MySDK", path: "MySDK.xcframework"),
.target(
name: "sdk-sample-target",
dependencies: [
.target(name: "MySDK"),
.product(name: "RxSwift", package: "RxSwift"),
.product(name: "RxCocoa", package: "RxSwift"),
],
path: "Sources"
),
],
swiftLanguageVersions: [
.v5
]
)
When I download the SDK I made with spm, an error occurs
Is there any way to solve it?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hi, guys
I am making a project that plays video using Swift AVPlayer. There is a problem that the video stops, or there is only sound but no video. When a video URL is received and played through AVPlyer, the file extension is HLS (.m3u8) Same issue with both AVPlayer and Safari. However, it plays normally in Chrome.
Is it a video file problem? Or is there something the app needs to handle?
This is the sample video URL I am using
https://demo.unified-streaming.com/k8s/features/stable/video/tears-of-steel/tears-of-steel.ism/.m3u8
https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/master.m3u8
http://d3rlna7iyyu8wu.cloudfront.net/skip_armstrong/skip_armstrong_stereo_subs.m3u8
self.playerItem = AVPlayerItem(url: URL(string: urlString)!)
self.playerItem?.addObserver(self, forKeyPath: #keyPath(AVPlayerItem.status), options: [.initial, .new], context: &self.playerItemContext)
self.playerItemObserver = true
if self.player == nil {
self.player = AVPlayer(playerItem: self.playerItem)
self.playerLayer = AVPlayerLayer(player: self.player)
self.player?.play()
return
}
I am using the above code to insert the url and play it.
After Archive in Xcode, I checked the message that it was uploaded successfully. However, when I check in AppStoreConnect, the version is displayed, but after a while it disappears.
Even if you archive and upload a new archive while increasing the build number, it continues to repeat.
There is no confirmation of any testflight upload failure and no mail.
Do you have the same issue?